Commit Graph

75 Commits

Author SHA1 Message Date
wmayer
6acfe3475b Part: Use Base::toRadians to convert degree to radian 2024-10-22 22:37:01 -05:00
bgbsww
608c80b5a3 Toponaming: Remove remaining FC_USE_TNP_FIX defines 2024-08-31 13:21:10 -05:00
bgbsww
e4a509cc77 Toponaming: Remove all FC_USE_TNP_FIX protected old code 2024-08-26 11:12:48 -05:00
Max Wilfinger
86b1c2e863 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
3c112b466d Toponaming: Missing code for shapebinder 2024-05-23 09:47:25 -04:00
bgbsww
db85748e7d Toponaming: fix shapebinder selection error 2024-05-21 21:41:26 -04:00
wmayer
c2e3d61059 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
f3637096e3 PD: Fix linter warnings 2024-05-10 15:06:22 +02:00
bgbsww
bd406dbcfd TopoNaming/PartDesign: Implement shapebinders 2024-04-14 17:13:14 -05:00
André Caldas
89dbab9b0e 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
5c21351608 Fix various typos 2023-11-30 14:58:06 +01:00
Florian Foinant-Willig
24934d7843 PartDesign: modernize type checking 2023-10-23 18:08:16 +02:00
wmayer
948cbfccd9 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
52e1c7c33b modernize C++: move from boost::bind to std::bind 2023-08-08 17:36:13 +02:00
Pesc0
c65f049d20 [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
316ce9f13b PD: [skip ci] disable undo/redo for the tmp. document created by the SubShapeBinder 2022-10-24 16:50:50 +02:00
0penBrain
611b86e4a9 PartDesign: improve offset handling of SubShapeBinder 2022-09-11 21:17:22 +02:00
berniev
5fa05ab83d Mod: Redundant_string_initialization 2022-08-08 16:52:42 +02:00
berniev
f4ffd15864 Mod: redundant void 2 2022-08-08 10:27:50 +02:00
berniev
53ba98d636 Mod: use empty 2022-08-06 19:30:13 +02:00
berniev
47ac049e14 Mod: use emplace_back 2022-08-05 10:36:16 +02:00
wmayer
a93082bc06 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
3e6d0e775f PD: allow to clear the shape when nullifying the Support property 2022-06-12 14:01:19 +02:00
Uwe
153fa35bdb [PD] shape binder: code style improvements
all done by MSVC
2022-03-27 21:48:09 +02:00
Uwe
8a8fe98454 fix some occurrences where size() is misused as Boolean
- as suggested by @wwmayer: 70714eedc9 (r69648152)
2022-03-27 21:38:15 +02:00
wmayer
d1d4b996e7 PD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
wmayer
09259451d2 PD: Fix coverity issue:
* CID 350645: Uncaught exception
2022-03-13 17:24:07 +01:00
mwganson
eaf36231eb PartDesign::SubShapeBinder add 2D offsetting 2022-03-12 23:30:09 +01:00
Zheng, Lei
2a28ad5cef PD: add SubShapeBinder 'Refine' property
Respect setting in BaseApp/Preferences/Mod/PartDesign/RefineModel
2022-03-12 02:45:13 +01:00
Zheng, Lei
8d6b06bc86 PD: fix SubShapeBinder 'Fuse' function 2022-03-12 02:45:13 +01:00
Uwe
19bdfc16b8 [PD] more work to remove unused includes 2022-02-21 02:18:17 +01:00
wmayer
0c583fb7fa Part: fix typos in make* functions 2022-02-16 12:48:02 +01:00
wmayer
ad30b7dbc8 PD: [skip ci] remove unused variable 2022-01-07 15:50:09 +01:00
Zheng, Lei
a349765893 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
73d0de60ae PartDesign: expose SubShapeBinderPython 2021-12-21 21:41:02 -07:00
Zheng, Lei
11f9d1c472 PartDesign: support CopyOnChange in SubShapeBinder 2021-12-21 21:41:02 -07:00
wmayer
9f2b6c5ec6 PD: 0004699: ShapeBinder still touched after recompute 2021-12-09 12:33:09 +01:00
wmayer
fa86b0216e Mod: make sure to call the base class' handleChangedPropertyType 2021-09-15 14:07:32 +02:00
wmayer
acf3b5a256 boost: [skip ci] fix for boost < 1.60 2020-06-15 21:33:56 +02:00
wmayer
d6169d6478 boost: fix for boost < 1.60 2020-06-15 19:38:39 +02:00
wmayer
730154a684 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
a657e54450 PartDesign: fix SubShapeBinder solids fuse 2020-03-20 15:02:20 +01:00
Zheng, Lei
7ee0ccbcf3 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
af119b9ca6 PartDesign: improve SubShapeBinder property documentation 2020-03-20 15:02:20 +01:00
Zheng, Lei
4364efca47 PartDesign: change SubShapeBinder claim children behavior 2020-03-20 15:02:20 +01:00
luz.paz
ebe194a9e9 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
ecfcc30fee PartDesign: [skip ci] replace int with proper enum type 2019-12-30 17:19:59 +01:00
Zheng, Lei
3b8ed7a791 PartDesign: improve SubShapeBinder transformation cache 2019-12-30 17:17:14 +01:00
Zheng, Lei
2034323bf4 PartDesign: fix SubShapeBinder lost of placement 2019-12-30 17:17:14 +01:00
Zheng, Lei
c146fbbdba Replace use of Matrix.inverse() with inverseGauss()
Because of possible scaling involved.
2019-10-07 17:24:30 +02:00