Commit Graph

49 Commits

Author SHA1 Message Date
Kacper Donat
46372a54d3 App: Fix GeoFeature::getGlobalPlacement when rootObj is Link
This fixes a case when in case of rootObj being Link placement was not
calculated correctly due to not changing of the document. While for
original use it was fine as this was mostly used in case where there was
defined non-link root for general case Links can be root objects of the
document.
2025-01-04 16:32:52 +01:00
Kacper Donat
4702c72fb8 Gui: Rework TaskCSysDragger into new Transform Dialog
This commit refactor ViewProviderDragger and TaskCSysDragger to be more
modern and to support selecting TransformOrigin.
2025-01-04 16:32:52 +01:00
PaddleStroke
bb4f86586d TaskAttacher: Fix the string maker such that it does not show TNP string. 2024-12-13 18:04:10 +01:00
PaddleStroke
489b24ef10 Core: GetGlobalPlacement: empty subname should not return. 2024-11-26 10:59:48 -05:00
wmayer
fadfc7e270 App: Apply clang format (part 2) 2024-11-21 21:17:42 +01:00
bgbsww
48c65aed76 Support macros and console logs in Assembly 2024-09-23 14:10:55 -05:00
bgbsww
39c469fa04 Correct error in resolveElement 2024-09-21 10:36:20 -05:00
Bas Ruigrok
29de03a098 Move isLink and isLinkGroup from AssemblyObject to DocumentObject 2024-09-08 11:56:14 +02:00
Bas Ruigrok
069ea6a68e App: Return root object placement if target and root object are the same in getGlobalPlacement 2024-09-07 13:27:59 +02:00
Bas Ruigrok
174846a665 Move getGlobalPlacement from AssemblyObject to GeoFeature 2024-09-07 13:27:59 +02:00
bgbsww
e4a509cc77 Toponaming: Remove all FC_USE_TNP_FIX protected old code 2024-08-26 11:12:48 -05:00
bgbsww
1eda66dfd8 Cleanup, format 2024-07-24 16:41:15 -04:00
Zheng, Lei
38269241e6 Toponaming: Transfer in getHigherElement 2024-07-24 15:10:42 -04:00
bgbsww
19e450a667 Refactor all element name pairs into clearer struct names - renames 2024-07-20 16:32:12 -04:00
bgbsww
82db79b699 Toponaming: remove unused method with compile warnings 2024-06-02 18:55:13 -05:00
wmayer
40b6b847eb Fixes #14349: GeoFeature::getElementTypes causes undefined behaviour 2024-05-31 11:42:01 +02:00
Bas Ruigrok
4c45f38574 App: Add getCameraAlignmentDirection() to GeoFeature 2024-05-13 19:01:38 +02:00
bgbsww
53ad95b382 Toponaming: bring in missing code fragments in App 2024-05-12 17:21:49 -04:00
bgbsww
b80d628c69 Merge branch 'main' into bgbsww-toponamingMissingAppMethods 2024-05-02 22:43:36 -04:00
bgbsww
4a0df0ea6d Test for changed Sketches avoiding TNP 2024-05-01 20:29:26 -04:00
Zheng, Lei
56e32b9c98 Methods to support Toponaming element maps 2024-05-01 18:02:04 -04:00
CalligaroV
11bed3b8da App/Toponaming: GeoFeature - fixes #13009 - fixes #13248
* Restored previous logic of GeoFeature::getElementName()
 * Added precompiler directive to use the old logic if FC_USE_TNP_FIX isn't defined, otherwise use the new logic
 * Reworked SketchObjectTest::getElementName() as a consequence of the previous points

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-04-04 22:09:12 -05:00
David Carter
ba20441935 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
Chris Hennes
4fb058f6af Toponaming/Part: Clang-format cleanup 2024-02-28 19:18:45 -06:00
bgbsww
db38a7eb7e Toposhape/Part: cleanup and test getElementName 2024-02-28 17:07:36 -05:00
Zheng, Lei
1d9fcfea9a Toponaming/Part: trasnfer in getElementName 2024-02-28 17:06:09 -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
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
berniev
22dcf5866f App: use empty 2022-08-06 19:29:59 +02:00
berniev
b6cae3bfdf App: Modernise ctors dtors defs etc 2022-08-01 00:34:46 +02:00
berniev
85170b2879 remove redundant void 2022-07-31 10:27:44 +02:00
Chris Hennes
f7edc74eee App: PR6497 move return statement to new line 2022-03-29 12:33:37 -05:00
wmayer
1a20b7f119 App: modernize C++11
* use nullptr
2022-03-23 17:29:23 +01:00
wmayer
f1f68db55b App: Optimize includes to reduce compile time 2022-03-07 15:53:58 +01:00
Uwe
9d30b0af6a [App] Feature: remove unused includes 2022-02-27 16:37:29 +01:00
luz.paz
019f73852c 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
8448d0d8c5 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
a432bafbdb 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
869fb99595 improve whitespaces 2018-10-18 23:31:55 +02:00
wmayer
90653787a6 various fixes:
+ fix typos
+ fix const correctness
+ whitespace improvements
2017-06-19 17:18:16 +02:00
Stefan Tröger
61020c0b27 Introduce global placement calculations 2017-06-19 15:37:09 +02:00
wmayer
2ea183e629 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
63943e4bb8 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
57d4edab07 implementing Plane visual 2016-04-12 18:11:44 +02:00
Mateusz Skowroński
05f95c0506 Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
wmayer
9fb670ae16 + fixes #0001794: new defined as a macro sometimes conflicts with boost 2014-10-22 12:39:43 +02:00
jriegel
61914bc772 Add all base system changes from the Assembly branch 2013-02-10 20:02:33 +01:00
logari81
7755a00d5d 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