Commit Graph

11 Commits

Author SHA1 Message Date
Markus Reitböck
68114945fa Part: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
 should be considered an optimization, not a requirement. In particular, do not explicitly include a
 precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
 generated precompile header on the compiler command line instead. This is more portable across
 the major compilers and is likely to be easier to maintain. It will also avoid warnings being
 generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-24 20:08:56 +02:00
Benjamin Bræstrup Sayoc
2b1aec0041 Base: make getAttribute template 2025-05-09 15:54:57 +02:00
Zheng, Lei
c8061df71b Transfer in Geometry.x changes from RT branch 2024-02-01 17:48:32 -05:00
wmayer
b9e9fe435a Part: modernize C++: use equals default 2023-08-22 15:14:03 +02:00
berniev
53ba98d636 Mod: use empty 2022-08-06 19:30:13 +02:00
Uwe
6b00cc31c7 [Part] Geometry*: remove unneeded includes
- also sort includes
2022-07-04 10:25:05 +02:00
Abdullah Tahiri
b69b3c71c0 Part/Sketcher: Refactor Geometry Extensions copy/save/restore AND attachment notification
=========================================================================================

- Long overdue refactor to avoid repetition during save/restore and copy.
- New interface to notify an extension when it is attached. It also enables the extension to gain
a pointer to the geometry container. This is intended to extend the functionality already existing
in Part::Geometry.
2021-01-09 20:08:05 +01:00
wmayer
9e8dcbf963 Part: [skip ci] fix memory leaks
+ add convenience function GeometryExtension::copyPyObject()
+ make sure to destroy the clone when leaving getGeometry()
2020-12-11 12:05:28 +01:00
Abdullah Tahiri
8ffa978f3b Part/Sketcher: GeometryExtension/GeometryPersistentExtension split
==================================================================

GeometryExtension was originally designed to be serializable (save/restore). However,
GeometryMigrationExtension and ViewProviderSketchGeometryExtension have demonstrated the
usefulness of runtime-only GeometryExtensions.

The problem with runtime-only extensions being of a serializable type (GeometryExtension before
this commit) arises when Part::Geometry is to serialize the extensions and serialise the number
of extensions the geometry has. If runtime-only GeometryExtensions do not save a tag, then the
restore mechanism will expect more extensions that are actually in the XML file.

This commit makes GeometryExtension by default not serializable and deriving directly from
Base::BaseClass. A new class GeometryPersistentExtension is created, deriving from GeometryExtension
to provide serialisation. All Extensions requiring serialization derive from GeometryPersistentExtension
and those not requiring it from GeometryExtension directly.

This commit adapts all extensions to the new situation:
Part: GeometryDefaultExtension
Part: GeometryMigrationExtension
Sketcher: ViewProvierSketchGeometryExtension
Sketcher: SketchGeometryExtension and ExternalGeometryExtension
2020-12-10 18:34:06 +01:00
Abdullah Tahiri
aaea1285d4 Part: Extend Geometry Extension to have a name 2019-07-14 12:37:31 +02:00
Abdullah Tahiri
d082a42351 Part: Excise GeometryExtension from Geometry 2019-07-14 12:37:30 +02:00