Commit Graph

50 Commits

Author SHA1 Message Date
Max Wilfinger
e3dce25e00 Surface: Update UI strings for consistency 2025-06-30 10:35:00 -05:00
Chris Hennes
7f1c43a335 Merge pull request #19636 from kadet1090/color-in-base
Base: Move App::Color to Base
2025-03-02 16:36:40 -06:00
Kacper Donat
12a69fe296 Base: Add isNullOrEmpty string helper
This adds isNullOrEmpty string helper that cheks if string is... well
null or empty. It is done to improve readability of the code and better
express intent.
2025-02-21 15:04:43 +01:00
Kacper Donat
a72a63232a Base: Move App::Color to Base
Every basic data type is stored in Base module, color is standing out as
one that does not. Moving it to Base opens possibilities to integrate it
better with the rest of FreeCAD.
2025-02-17 21:10:26 +01:00
Benjamin Bræstrup Sayoc
e0fb77bcdc Surface: Use QStringLiteral 2025-02-10 18:34:57 +01:00
tritao
65466d580b Gui: Reorganize the selection files into a top Selection folder. 2025-02-03 17:56:57 +01:00
Benjamin Nauck
dd6aa9f3c7 Prefer to use BaseClass's isDerivedFrom<T> over non template or Base::Type's
Regex based changes, manually verified
2025-01-27 16:08:18 +01:00
Kacper Donat
651cefde4d Gui: Use getObject<T>() helpers in classes
This commit is generated using regex based find and replace:

```
s/[\w:]+_cast\s*<([^>]+)\*>\s*\(\s*getObject\(\s*\)\)/getObject<$1>/
s/[\w:]+_cast\s*<([^>]+)\*>\s*\(\s*([^)]*)\s*->\s*getObject\(\s*\)\)/$2->getObject<$1>()/
```

To regenerate if needed.
2024-12-06 18:29:39 +01:00
David Carter
8b5a3b1124 Material: Appearance Updates 2
Improves the use of the ShapeAppearance property for the Part workbench.

    removes DiffuseColor property
        adds Python compatibility using custom attributes
        transitions DiffuseColor to ShapeAppearance on open
    Improved UI elements for setting object appearance, and appearance per face
    Lays the foundation for future texture support
2024-06-01 19:57:16 -05:00
David Carter
495a96a0f5 Material: Material appearance
Uses new material system for appearance

Each feature object now has a property called ShapeMaterial that
describes its physical properties. If it has a shape, it has a
material.

The ShapeColor attribute is replaced by a ShapeAppearance attribute.
This is a material list that describes all appearance properties, not
just diffuse color. As a list in can be used for all elements of a
shape, such as edges and faces.

A new widget is provided to allow the user to select materials in a
consistent fashion. It can also launch the material editor with its
more advanced capabilities.
2024-04-04 07:39:58 -05:00
wmayer
c0f151104a Surface: use of TaskDialog::addTaskBox 2024-03-26 15:57:20 +01:00
Florian Foinant-Willig
6fb3984322 Surface: modernize type checking 2023-10-23 18:08:22 +02:00
pre-commit-ci[bot]
222a2520b1 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-09-12 13:02:35 -04:00
wmayer
4919fa18ff Surface: apply clang format 2023-09-04 07:21:32 -05:00
wmayer
fecc939611 Surface: modernize C++: use equals default 2023-08-22 11:16:10 +02:00
wmayer
5163c1a2f4 Surface: fix -Wclazy-connect-by-name 2023-04-05 00:44:13 +02:00
wmayer
0363ebdf8f Surface: replace slots with member function pointers 2023-02-03 00:21:38 +01:00
wmayer
9b5505fb34 Surface: move to new style connect() 2023-01-13 15:21:37 +01:00
wmayer
af33cdabe5 Surface: fix crash when canceling filling dialog 2022-12-23 11:56:00 +01:00
wmayer
6d535f834d Surface: use a single button group for all task boxes 2022-12-20 19:17:10 +01:00
wmayer
c8dd58fc20 Surface: remove unneeded includes 2022-12-20 16:22:59 +01:00
Ajinkya Dahale
f0f72d9ce3 [Surface] Allow modal adding/removal of geometric entities 2022-12-20 15:42:46 +01:00
Uwe
58d8b36dfd [Surface] Gui:: remove unused includes
- also some sorting
2022-12-08 01:32:38 +01:00
berniev
ddafb98813 Mod: Use override etc 2 2022-08-09 12:52:26 +02:00
berniev
da9ebc572f Mod: redundant void 2 2022-08-08 10:27:50 +02:00
berniev
2d4c5a4cfb Mod: use emplace_back 2022-08-05 10:36:16 +02:00
wmayer
cea60a2cb4 Surface: Fix several clazy issues:
* Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference]
* Use multi-arg instead [-Wclazy-qstring-arg]
2022-07-25 10:01:49 +02:00
wmayer
922ce46506 Gui: add convenience functions to SelectionFilterGate 2022-04-19 15:04:14 +02:00
wmayer
f19ab55b48 Surface: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
wmayer
1ca7429705 Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
luz paz
277e164657 Fix various typos
Found via `codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,apoints,ba,beginn,behaviour,bloaded,bottome,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,inout,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,ontop,orgin,orginx,orginy,ot,pard,parms,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./build/doc/SourceDocu`
2021-10-10 14:55:48 -04:00
wmayer
9c3c562f7b Surface: re-implement closed() in TaskFilling 2021-02-05 16:37:00 +01:00
Chris Hennes
612eba1b1a Fix Surface task panel shortcut use to use Widget context
The Delete key shortcut of the three different panels in the
Surface Workbench TaskFilling sidebar conflicted between
the panels if multiple were showing. This is resolved by
making the QAction's context the widget, rather than the window.
2021-02-01 19:40:33 -06:00
wmayer
72bcdf8c89 Surface: automatically start "Add edge" mode when starting the fill surface tool. Moving the order of edges is supported now. 2020-10-13 17:32:20 +02:00
wmayer
255ef44c93 Surface: rename TaskFillingUnbound to TaskFillingEdge 2020-10-13 16:23:58 +02:00
vocx-fc
7bf6f72259 Surface: new SVG icon for the workbench, rename others
Replace the hard-coded XPM icon in `InitGui.py` for the workbench
with an SVG file, which at this time is identical to the `Surface` icon.
Change `CMakeLists.txt` to properly install this new icon.

Rename all icons, so that all have the `Surface_` prefix.

Use the new icon names in the viewproviders and task panels.
2020-09-30 12:32:36 +02:00
wmayer
44f42a8e2c LGTM: [skip ci] fix: Declaration hides parameter
A local variable hides a parameter. This may be confusing. Consider renaming one of them.
2020-07-27 10:57:34 +02:00
asapelkin
e951094af9 use emplace_back instead of push_back where justified 2019-11-21 14:48:09 +01:00
tomate44
8bbcfd6dce Surface WB: add a Gui widget for unbound edges to the Filling tool. 2017-11-29 21:57:19 +01:00
wmayer
fa50729aeb reset highlighting of references if object is being deleted, fix crash with invalid sub-element names 2017-04-24 19:18:58 +02:00
wmayer
2cfb029fe5 highlighting of point constraints 2017-04-24 17:20:41 +02:00
wmayer
6a4171c243 implement highlighting of surface in filling task panel 2017-04-24 14:43:30 +02:00
wmayer
d73fd1e8ab Extend task panel for filling function 2017-04-24 11:12:12 +02:00
wmayer
e50dff0f02 Extend task panel for filling function 2017-04-24 11:12:12 +02:00
wmayer
b47805dcc6 Extend task panel for filling function 2017-04-24 11:12:12 +02:00
wmayer
29673491e9 Extend task panel for filling function 2017-04-24 11:12:12 +02:00
wmayer
e2065ec5b9 Extend task panel for filling function 2017-04-24 11:12:12 +02:00
wmayer
a4d2a9f77f Extend task panel for filling function 2017-04-22 15:07:09 +02:00
wmayer
0335e2a21c Extend task panel for filling function 2017-04-22 14:46:26 +02:00
wmayer
a76ebbcec9 Initial task panel for filling function 2017-04-22 11:12:13 +02:00