Commit Graph

26 Commits

Author SHA1 Message Date
Chris Hennes
a4efcf0533 Toponaming/Part: Clang-format cleanup 2024-02-28 19:18:45 -06:00
bgbsww
7d0afaec54 Toposhape/Part: cleanup and test getElementName 2024-02-28 17:07:36 -05:00
Zheng, Lei
59b563ca69 Toponaming/Part: trasnfer in getElementName 2024-02-28 17:06:09 -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
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
berniev
1cc6329eab App: use empty 2022-08-06 19:29:59 +02:00
berniev
65a356835b App: Modernise ctors dtors defs etc 2022-08-01 00:34:46 +02:00
berniev
b40de7a509 remove redundant void 2022-07-31 10:27:44 +02:00
Chris Hennes
132a1d7e55 App: PR6497 move return statement to new line 2022-03-29 12:33:37 -05:00
wmayer
749361d2f3 App: modernize C++11
* use nullptr
2022-03-23 17:29:23 +01:00
wmayer
4977e55e51 App: Optimize includes to reduce compile time 2022-03-07 15:53:58 +01:00
Uwe
8bedc25344 [App] Feature: remove unused includes 2022-02-27 16:37:29 +01:00
luz.paz
4f308dc03c src/App: [skip ci] fix header uniformity
This PR fixes header uniformity across all `src/App` files
2019-12-25 11:38:43 +01:00
Zheng, Lei
29eb1a4299 App: GeoFeature/ComplexGeoData API changes
These are the bare minimum set of APIs for future new topogical naming
feature (see [here](https://git.io/fj6hy) for a overview of the new
APIs).

These APIs are added early to avoid too much code change for the new
features introduced in the current patch set.
2019-08-17 14:52:10 +02:00
wmayer
6186a310d7 Add a new PropertyType enum Prop_NoRecompute to reduce possible inconsistencies between touched and recomputed features.
At the moment many feature classes lack of the mustExecute() method and thus can cause a touched feature not to be recomputed and causes the feature to be in a broken state.
Now this new enum value virtually makes the mustExecute() superfluous and thus guarantees to recompute a feature if a modified property has not set the Prop_NoRecompute flag.

On the other hand there are properties that should only touch a feature but not enforce a recompute. This guarantees a better performance and avoids unnecessary recomputes.
For example this is useful for placements where a change can be applied on-the-fly and the feature is up-to-date. Other features that depend on the touched feature will still be recomputed.
2018-11-08 10:20:50 +01:00
wmayer
3a6afac8b2 improve whitespaces 2018-10-18 23:31:55 +02:00
wmayer
989fe4028e various fixes:
+ fix typos
+ fix const correctness
+ whitespace improvements
2017-06-19 17:18:16 +02:00
Stefan Tröger
80e74aec06 Introduce global placement calculations 2017-06-19 15:37:09 +02:00
wmayer
03bf3ac606 Expose method to Python to get property name of main geometry
fix inheritance of MeshFeaturePy
fix inheritance of PartFeaturePy
remove useless test() method
implement getPyObject in GeoFeature in case a sub-class doesn't implement it
2017-05-10 10:36:22 +02:00
wmayer
35e8edeb08 extend interface to get actual property with geometric data, get center of gravity of a geometry 2017-03-05 18:05:11 +01:00
jriegel
4f0f3e8c94 implementing Plane visual 2016-04-12 18:11:44 +02:00
Mateusz Skowroński
43a4a5938c Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
wmayer
8fb596221f + fixes #0001794: new defined as a macro sometimes conflicts with boost 2014-10-22 12:39:43 +02:00
jriegel
d739a2e41b Add all base system changes from the Assembly branch 2013-02-10 20:02:33 +01:00
logari81
85585cf49e PartDesign: Enable manual alignment tool for PartDesign features 2012-12-10 13:58:44 +01:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00