Commit Graph

56 Commits

Author SHA1 Message Date
Benjamin Nauck
1301b58296 MeshPart: Use std::numeric_limits and std::numbers instead of defines 2025-03-29 13:32:38 +01:00
Kacper Donat
13fbab9e42 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
Chris Hennes
a3004c2c0a Merge pull request #19142 from hyarion/refactor/add-template-addobject
Add new addObject<T>() function
2025-02-11 09:42:47 -06:00
Benjamin Nauck
265b58c034 Mod: Use new addObject<T>(...) using regex 2025-02-10 18:35:38 +01:00
Benjamin Bræstrup Sayoc
2ea8b4b635 MeshPart: Use QStringLiteral 2025-02-10 18:32:45 +01:00
tritao
551c2e48fb Gui: Reorganize the selection files into a top Selection folder. 2025-02-03 17:56:57 +01:00
Benjamin Nauck
6f535f19fb 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
954b729b56 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
FEA-eng
683dae98b0 MeshPart: Update Tessellation.cpp 2024-07-28 12:11:21 +02:00
David Carter
5feb963f9d 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
wmayer
ba638d204c Mesh: Make colors persistent if meshing option 'Apply face colors to mesh' is used 2024-05-10 15:03:20 +02:00
wmayer
6e575c4dd2 MeshPart: use of TaskDialog::addTaskBox 2024-03-26 15:57:20 +01:00
wmayer
0e1b38d0e4 MeshPart: apply clang format 2023-09-02 11:30:04 +02:00
wmayer
da00501288 Mod: modernize C++: use equals default 2023-08-22 11:16:49 +02:00
wmayer
dc12c839f2 MeshPart: fix -Wclazy-connect-by-name 2023-04-05 00:44:13 +02:00
wmayer
c252e611f2 Mesh: move to new style connect() 2023-01-13 16:30:58 +01:00
Uwe
8620c1a730 [MeshPart] Gui: remove unused includes
- also some sorting
2022-11-24 02:21:38 +01:00
berniev
47ac049e14 Mod: use emplace_back 2022-08-05 10:36:16 +02:00
wmayer
4c0b62555e MeshPart: [skip ci] 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:34:51 +02:00
wmayer
0b2c73cf32 Gui: clean-up Selection API
Replace the int of the 'resolve' argument of several functions with a proper enum class.
* This avoids the inconsistencies in client code where often true/false is passed when an int is expected
* This avoids the use of magic numbers like 0, 1, 2 or the undocumented 3
2022-04-09 17:03:43 +02:00
wmayer
8c7213e847 MeshPart: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
wmayer
91e4e468dd Base: move ILogger sub-classes to their own source files in order to reduce including stream classes in client code 2022-03-06 10:13:47 +01:00
Uwe
da1831e9d7 [Mesh] rename gmsh -> Gmsh
I was informed that Gmsh names itself with a capital G. I had a look and in FEM it is already named Gmsh, but not in the Mesh WB. Therefore this PR.

(The other changes than the pure renaming was automatically done by Qt's designer.)
2021-12-25 20:39:47 +01:00
wmayer
703b824526 MeshPart: show a more useful error message if the currently selected object cannot be tessellated 2021-09-15 17:09:54 +02:00
donovaly
58b0dd38c2 [FEM] proper support for Gmsh HighOrder optimization
There are 4 optimizers available while we only supported 1. This PR adds support for all.
2021-04-08 13:29:50 +02:00
wmayer
1d867d9b9d MeshPart: refactor class Tessellation 2021-03-27 01:29:21 +01:00
donovaly
3f3ce8ff90 [Mesh] fix Gmsh mesh algorithms
the numbers written to the geo file were wrong

- also update the list of currently supported algorithms (as of Gmsh 4.6 or newer)
2021-03-25 17:20:15 +01:00
wmayer
2a78d5821a MeshPart: add gmsh as another option to create mesh from shape 2020-02-28 21:15:17 +01:00
wmayer
0450dc07bb Mesh: replace stacked widget of meshing panel with tabbed widget 2020-02-27 23:41:21 +01:00
wmayer
5a92af3cf0 fix usability regression of Mefisto mesher cuased by cc1f7de8
The maximum edge length for the Mefisto mesher is always set in the accept() method so that effectively user input is always ignored.
There is now a button Estimate to guess a good default value. And user input is no longer ingored
2019-12-10 16:43:10 +01:00
luz.paz
ea0868a433 Fix typos and some trailing whitespace
Found via:  
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,currenty,dof,doubleclick,dum,eiter,elemente,feld,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,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
```
2019-12-03 12:22:59 +01:00
Zheng, Lei
17b65d536b MeshPart: support link in Tessellation 2019-11-21 11:30:02 +01:00
wmayer
23b9dfcd59 remove the built-in tree widget from the tessellation task panel 2019-10-13 18:12:05 +02:00
wmayer
143b994ecd when creating mesh from shape do not set a fix crease angle but instead user preferences should be used 2019-08-28 11:43:52 +02:00
wmayer
fbade76af5 save&restore standard meshing parameters 2019-07-09 13:05:45 +02:00
wmayer
60b2234565 take care of global placement when creating mesh from shape 2018-09-05 00:10:07 +02:00
sL1pKn07
6674467254 [For v018] Fix build with Qt5 beta
Seems need add some headers for build with incoming Qt 5.11 (Tested with 5.11.0beta2)
2018-04-10 12:59:41 +02:00
wmayer
f8728a008f fixes #0001906: add Parameters isRelative, theAngDeflection of BRepMesh_IncrementalMesh in MeshFromShape Gui command 2017-09-30 16:15:24 +02:00
wmayer
e8554cc77a do not use doCommand without using format string, add overloaded method of runCommand 2016-09-15 18:53:37 +02:00
wmayer
de1fbc4615 improve handling of face colors when creating a mesh with segments 2016-09-08 14:01:34 +02:00
wmayer
4d0d90d498 support coloring of mesh segments 2016-09-07 21:51:05 +02:00
wmayer
7248683f11 create mesh segments by face colors 2016-09-07 19:20:33 +02:00
wmayer
f899847f5d add OCC standard meshing algorithm to Mesher class 2016-09-07 16:39:54 +02:00
wmayer
b500af9afa + set range for quantity boxes 2016-02-29 12:29:02 +01:00
wmayer
85e2f6cc81 + use quantity box in tessellation dialog 2016-02-27 16:02:37 +01:00
Mateusz Skowroński
c275b35d48 QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().
This change is Qt4/Qt5 neutral.
2016-01-05 16:07:25 +01:00
Mateusz Skowroński
0695552cff QString::toAscii() is obsolete in Qt5. Replace it with toLatin1().
This change is Qt4/Qt5 neutral.
2016-01-05 16:06:48 +01:00
wmayer
6b3340e7b5 + include missing header files 2015-07-01 13:02:29 +02:00
wmayer
05b921df0d + fix bug in read-only InputField, minor Utf-8 issue in meshing dialog 2015-04-22 14:01:27 +02:00
wmayer
938f623b8e + Re-enable Mefisto for MSVC 2014-04-03 10:23:30 +02:00