Commit Graph

75 Commits

Author SHA1 Message Date
wmayer
14cd061809 Part: Use Base::toRadians to convert degree to radian 2024-10-22 22:37:01 -05:00
bgbsww
2a541c9536 Toponaming: Remove remaining FC_USE_TNP_FIX defines 2024-08-31 13:21:10 -05:00
bgbsww
ecf7e51ab3 Toponaming: Remove all FC_USE_TNP_FIX protected old code 2024-08-26 11:12:48 -05:00
Max Wilfinger
e490531510 Activate Part/Part Design check and refine preferences by default (#14406)
* Activate Part/Part Design check and refine preferences by default

* added bool in .ui

* Update tests

* Fix Sketcher tests
2024-07-01 10:50:42 -05:00
Zheng, Lei
b7bbc2ed11 Toponaming: Missing code for shapebinder 2024-05-23 09:47:25 -04:00
bgbsww
febe5c3d9e Toponaming: fix shapebinder selection error 2024-05-21 21:41:26 -04:00
wmayer
7d738f161a PD: Fix ShapeBinder::execute() if Support is empty
This fixes the reported regression: https://forum.freecad.org/viewtopic.php?t=87229
2024-05-10 15:06:22 +02:00
wmayer
35b70acb33 PD: Fix linter warnings 2024-05-10 15:06:22 +02:00
bgbsww
3d1f6199c4 TopoNaming/PartDesign: Implement shapebinders 2024-04-14 17:13:14 -05:00
André Caldas
560898907b Avoids using getNameInDocument() to test if DocumentObject is attached to a Document.
This patch substitutes by isAttachedToDocument() (almost) everywhere where
getNameInDocument() is used for this purpose.

The very few places not touched by this patch demand a (just a little) less trivial change.
When we change the returning type of getNameInDocument() to std::string,
those places will be easily found, because they shall generate a compiler error
(converting std::string to bool).

Rationale:
The fact that getNameInDocument() return nullptr to indicate
that the object is not attached to a document is responsible for lots of bugs
where the developer does not check for "nullptr".

The idea is to eliminate all those uses of getNameInDocument() and, in the near future,
make getNameInDocument() return always a valid std::string.
2023-12-11 17:37:58 +01:00
luzpaz
faef0c6f27 Fix various typos 2023-11-30 14:58:06 +01:00
Florian Foinant-Willig
6adc675a12 PartDesign: modernize type checking 2023-10-23 18:08:16 +02:00
wmayer
d150fa7164 modernize C++: avoid bind
In many cases std::bind() is kept because the code is much simpler
2023-08-08 21:10:16 +02:00
wmayer
68d22d864b modernize C++: move from boost::bind to std::bind 2023-08-08 17:36:13 +02:00
Pesc0
4a8d3853ba [Toponaming] create ElementMap class (#9175)
* Copypaste ElementMap
* Add MappedNameRef
* Fix missing include
* Copypaste `findTagInElementName`
* fix error introduced _somewhere_
* refactor toponaming constants
* Move `findTagInElementName` in `MappedName`
* reintroduce workaround to compile ElementMap
* Added missing functions copied from complexgeodata
* fix last compile errors, reorder and format files
* remove recursive refs to ComplexGeoData
* Add more comments
* fixed comments and added tests
* added FIXME, make functions private, misc fixes
* Move static functions from complexGeoData to PostfixStringReferences. Rename to ElementNamingUtils
* Fix broken includes due to previous change
* Revert constants from string to const char*
* added childmap tests and made hasher public
* Make functions private
* Added remaining tests
* removed bool return from `erase` functions
* fix missing appexport

Co-authored-by: John Dupuy <jdupuy98@gmail.com>
2023-06-15 09:05:24 -05:00
wmayer
c98545b6ca PD: [skip ci] disable undo/redo for the tmp. document created by the SubShapeBinder 2022-10-24 16:50:50 +02:00
0penBrain
4bfc6a082a PartDesign: improve offset handling of SubShapeBinder 2022-09-11 21:17:22 +02:00
berniev
915369d8a2 Mod: Redundant_string_initialization 2022-08-08 16:52:42 +02:00
berniev
da9ebc572f Mod: redundant void 2 2022-08-08 10:27:50 +02:00
berniev
b796a0d376 Mod: use empty 2022-08-06 19:30:13 +02:00
berniev
2d4c5a4cfb Mod: use emplace_back 2022-08-05 10:36:16 +02:00
wmayer
88accdb421 PD: [skip ci] Fix several clazy issues:
* Maybe you meant to call base method instead [-Wclazy-skipped-base-method]
* Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference]
* Mixing iterators with const_iterators [-Wclazy-strict-iterators]
* Unused QByteArray [-Wclazy-unused-non-trivial-variable]
* C++11 range-loop might detach Qt container (QList) [-Wclazy-range-loop-detach]
2022-07-25 13:40:19 +02:00
wmayer
5a432fe9ac PD: allow to clear the shape when nullifying the Support property 2022-06-12 14:01:19 +02:00
Uwe
c27e016521 [PD] shape binder: code style improvements
all done by MSVC
2022-03-27 21:48:09 +02:00
Uwe
66e4c37a25 fix some occurrences where size() is misused as Boolean
- as suggested by @wwmayer: 4d51d1d0b1 (r69648152)
2022-03-27 21:38:15 +02:00
wmayer
3608ee7f51 PD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
wmayer
55f8d68b4e PD: Fix coverity issue:
* CID 350645: Uncaught exception
2022-03-13 17:24:07 +01:00
mwganson
3e18c76d4f PartDesign::SubShapeBinder add 2D offsetting 2022-03-12 23:30:09 +01:00
Zheng, Lei
b47e6723dc PD: add SubShapeBinder 'Refine' property
Respect setting in BaseApp/Preferences/Mod/PartDesign/RefineModel
2022-03-12 02:45:13 +01:00
Zheng, Lei
e56bcbc924 PD: fix SubShapeBinder 'Fuse' function 2022-03-12 02:45:13 +01:00
Uwe
fd19d1a7b0 [PD] more work to remove unused includes 2022-02-21 02:18:17 +01:00
wmayer
95f583a677 Part: fix typos in make* functions 2022-02-16 12:48:02 +01:00
wmayer
4e1f2d5015 PD: [skip ci] remove unused variable 2022-01-07 15:50:09 +01:00
Zheng, Lei
d286a54fc1 PartDesign: show error on SubShapeBinder CopyOnChange failure
The failure is not obivous as it would have been occurred in a
hidden temporary document.
2021-12-21 21:41:02 -07:00
Zheng, Lei
2bd4404afb PartDesign: expose SubShapeBinderPython 2021-12-21 21:41:02 -07:00
Zheng, Lei
39c04e4877 PartDesign: support CopyOnChange in SubShapeBinder 2021-12-21 21:41:02 -07:00
wmayer
5ddefe56fb PD: 0004699: ShapeBinder still touched after recompute 2021-12-09 12:33:09 +01:00
wmayer
4327cd5ccb Mod: make sure to call the base class' handleChangedPropertyType 2021-09-15 14:07:32 +02:00
wmayer
76aac3a221 boost: [skip ci] fix for boost < 1.60 2020-06-15 21:33:56 +02:00
wmayer
f3b460e42e boost: fix for boost < 1.60 2020-06-15 19:38:39 +02:00
wmayer
4ec45b545e boost 1.73.0: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated 2020-06-12 17:51:33 +02:00
Zheng, Lei
5eb298ddcd PartDesign: fix SubShapeBinder solids fuse 2020-03-20 15:02:20 +01:00
Zheng, Lei
b3835cd69d PartDesign: remove SubShapeBinder.Support hidden status
Change Immutable status to ReadOnly, which makes it easy to set value
in script, but still block editing in property view by default. This is
to discourage user editing support using property editor, because
SubShapeBinder requires relative link correction.
2020-03-20 15:02:20 +01:00
Zheng, Lei
179a2c2547 PartDesign: improve SubShapeBinder property documentation 2020-03-20 15:02:20 +01:00
Zheng, Lei
d949447f89 PartDesign: change SubShapeBinder claim children behavior 2020-03-20 15:02:20 +01:00
luz.paz
180805c55e Fix typos
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,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,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
```
2020-03-06 14:50:35 +01:00
wmayer
977f5c28f2 PartDesign: [skip ci] replace int with proper enum type 2019-12-30 17:19:59 +01:00
Zheng, Lei
c9f6e5c37f PartDesign: improve SubShapeBinder transformation cache 2019-12-30 17:17:14 +01:00
Zheng, Lei
7dffaf43c8 PartDesign: fix SubShapeBinder lost of placement 2019-12-30 17:17:14 +01:00
Zheng, Lei
7a74093432 Replace use of Matrix.inverse() with inverseGauss()
Because of possible scaling involved.
2019-10-07 17:24:30 +02:00