Commit Graph

57 Commits

Author SHA1 Message Date
wmayer
fadfc7e270 App: Apply clang format (part 2) 2024-11-21 21:17:42 +01:00
wmayer
effbe1e873 App: Prepare for clang-format 2024-06-03 12:52:30 +02:00
ppphp
8863b9ac4c fix: c++20 deprecate [=] 2024-03-31 10:47:32 +02:00
Zheng, Lei
09a5ceca03 Toposhape/Part: Transfer in PropoertyTopoShape and related 2024-03-01 07:55:12 -05:00
sliptonic
97added19c Merge pull request #11273 from chennes/complexGeoDataSerialization
ComplexGeoData and PropertyComplexGeoData serialization
2023-11-20 09:55:39 -07:00
Chris Hennes
e2938e7b62 App/Toponaming: Add TNP code to PropertyComplexGeoData 2023-11-04 11:07:52 -05:00
Florian Foinant-Willig
741296b82e Core: modernize type checking 2023-10-23 18:07:07 +02:00
wmayer
d305f306df Core: Revert superfluous changes made with PR #9521 2023-10-09 15:06:45 +02:00
AgCaliva
3da00e36a3 Merge Master 2023-08-30 16:24:16 -03:00
AgCaliva
704a5bd10a Fixed working with tests 2023-08-29 14:41:58 -03:00
wmayer
4991475341 App: modernize C++: use range-based for loop 2023-08-14 16:40:25 +02:00
wmayer
d60f2e291f Core: fixes #8119: Make axis values in Property view persistent 2023-01-02 12:48:40 +01:00
wmayer
8a48e0bf6c App: [skip ci] improve error message 2022-12-19 17:08:26 +01:00
wmayer
42ec9a2033 App: when using Yaw, Pitch or Roll angle in expressions make sure that they are in range 2022-12-19 14:48:30 +01:00
wmayer
9fac4a79ee App: handle sub-components in PropertyRotation 2022-12-14 21:21:02 +01:00
wmayer
6bccd52cd0 App: handle sub-components in PropertyPlacement 2022-12-14 15:41:49 +01:00
marioalexis
209c78d43e App: Replace C cast 2022-09-18 11:06:51 -05:00
wmayer
a7172cd730 App: improve whitespaces 2022-08-01 01:29:47 +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
wmayer
1a20b7f119 App: modernize C++11
* use nullptr
2022-03-23 17:29:23 +01:00
Uwe
d88397f3d6 [App] Placement and Property: remove unused includes 2022-02-24 01:09:00 +01:00
wmayer
c74d2b8dd5 App: add class PropertyRotation 2021-10-29 12:40:32 +02:00
luz paz
a1fc733ddf App: remove Py2 code from several src/App .cpp files 2021-04-19 15:27:06 +02:00
wmayer
dd4dd204d0 App/Gui: fix memory leaks:
+ add function to cleanup units and quantities in debug build
+ fix reference leak in PropertyVector::getPyPathValue()
+ fix reference leak in PropertyPlacement::getPyPathValue()
+ in InterpreterSingleton::init() use a static std::vector<wchar_t*> instead of a C array
  to free memory at program end
+ in MainWindow::closeEvent() explicitly delete all task watchers
+ in ReportOutputObserver constructor pass parent to QObject
+ in PropertyEditor destructor explicitly delete QItemEditorFactory
2021-02-27 10:56:19 +01:00
wmayer
a709ac2f03 App: [skip ci] handle types long and unsigned long in PropertyPlacement::setPathValue() 2020-04-03 12:02:46 +02: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
wmayer
9fa56345cf core system
force strict ISO C++ (-Wpedantic)
TODO: still a lot of variadic macros are not valid ISO C++
2019-09-18 01:01:14 +02:00
Zheng, Lei
ced27a69c6 PropertyExpressionEngine: convert to link type property
PropertyExpressionEngine is changed to derived from a new class
PropertyExpressionContainer, which is in turn derives from
PropertyXLinkContainer. This makes PropertyExpressionEngine a link type
property that is capable of external linking. It now uses the unified
link property APIs for dependency management and tracking of object
life time, re-labeling, etc.

ObjectIdentifier is modified to support sub-object reference, but is
not exposed to end-user, because expression syntax is kept mostly
unchanged, which will be submitted in future PR. There is, however,
one small change in expression syntax (ExpressionParser.y) to introduce
local property reference to avoid ambiguity mentioned in
FreeCAD/FreeCAD#1619

Modified Expression/ExpressionModifier interface to support various link
property API for link modification.
2019-08-17 14:52:09 +02:00
Zheng, Lei
be6ec3fdfc App: Property related API changes
Property:

* Extended property status bitset. Mirror most of PropertyType and
  allow dynamic change property type.

* Cache property name and type to improve performance

* Centralize property status change signalling

* Change aboutToSetValue()/hasSetValue() to virtual

* Add new API getFullName() to obtain full quanlified name of the property

AtomicPropertyChangeInterface:

* Allow calling aboutToSetValue()/hasSetValue() when actually changed

PropertyLists:

* Refactor implementation by an abstract class PropertyListBase and a
  template class PropertyListsT, to allow better code reuse.
  PropertyListT is derived from AtomicPropertyChangeInterface to allow
  more efficient change on individual elements.

* All list type property now accept setting python value as a dictionary
  with index as key to set individual element of a list.

* Add touch list for more efficient handling of value changes. The list
  contains the index of changed value. And empty touch list should be
  treated as the entire list is changed. PropertyContainerPy expose this
  functionality with getPropertyTouchList().

PropertyPersistentObject:

* New property to allow dynamic creation of any FreeCAD object derived
  from Base::Persistence, and use it as a property.

DynamicProperty:

* Use boost multi_index_container for efficient property lookup while
  keeping order.

* Modify to be allowed to use in PropertyContainer directly

PropertyContainer:

* Use boost multi_index_container for efficient property lookup while
  keeping order.

* Allow adding/removing dynamic property on all property container

* Modify Save/Restore() to persist property status, and better handle
  transient property which can now be dynamically enabled/disabled per
  object.

* Add new API getFullName() to obtain full quanlified name of the property.
  Implemented by Document, DocumentObject, and also
  ViewProviderDocumentObject if future patch

DocumentObject and FeaturePython are modified to accommondate the
dynamic property changes.

Removed get/setCustomAttribute() implementation from DocumentObjectPy,
and rely on PropertyContainerPy for the implementation, because of the
additional dynamic property support in property container.

Gui::ViewProviderDocumentObject, which is derived from
PropertyContainer, is also modified accordingly
2019-08-17 14:52:09 +02:00
wmayer
f004858fe5 implement a direct way to set single or double precision when writing/reading properties using floating point numbers 2018-10-23 19:38:03 +02:00
wmayer
5f6a6cde9c fix bug in PropertyPlacementList::RestoreDocFile 2018-10-22 12:06:54 +02:00
luz.paz
424cd49398 Typos and whitespace fixes 2018-08-07 11:13:31 -04:00
wmayer
3692861136 improve whitespaces 2017-12-13 17:00:38 +01:00
plgarcia
a0ea3ceec9 Improvement of rotations
Rotation:
-	Add a private attribute Vector to store the direction of the rotation, and manage not to erase this direction when the angle id 0.
-	Add a private attribute to store the angle as defined (no modulo etc)
-	Keep the quaternion for calculations

PropertyGeo
-	Saves the rotation with angle and direction instead of saving the quaternion.
-	Attribute name chosen: Ox, Oy and Oz for the coordinates of the axis and A for the angle in radians. This has to be validated.
-	Backward compatibility with the saved files with quaternion (test presence of A to determine which of  the Quaternion (old way) or the direction and angle is stored (new way). New files can be opened by old FreeCAD and vice-versa.

The only side effect I can imagine is that it was possible to set a vector to 0, 0, 0 if the angle was not 0, what is somehow non sense. Now when setting to 0, 0 0 the last not null vector is kept. The vector can not be null any longer.
2017-12-13 17:00:38 +01:00
wmayer
6c0fe8a947 when resetting expression on angle convert value back to radian 2017-10-19 23:47:51 +02:00
Eivind Kvedalen
c7afdbc391 Fix for issue #3200: Convert angle to degrees when used in an expression. 2017-10-07 11:28:02 +02:00
Eivind Kvedalen
03c39f3a13 Added PropertyPosition and PropertyDirection classes. Basically PropertyVector classes with units. 2017-07-23 22:14:05 +02:00
Eivind Kvedalen
3a8ceb2929 Added PropertyVectorDistance::getPathValue() to return vector elements with correct unit. 2017-07-23 22:14:05 +02:00
Eivind Kvedalen
705bb1c56e Added getPaths(...) to PropertyVector class. 2017-07-23 22:14:05 +02:00
looooo
e6202f46e9 py3: App: files D-Z ported to python3
issue 0000995
diff to py3-branch will remain in the following files in src/App:
- ExtensionContainer.cpp
- FeaturePythonPyImp.h +.inl
most likely these files depend on Tools and Base
2017-05-11 19:19:17 +02:00
Yorik van Havre
779d2658aa Added App::PropertyPlacementList 2017-04-05 17:22:51 -03:00
wmayer
9c349523de py3: adapt scripts to work with Python3 2017-01-17 09:24:59 +01:00
Eivind Kvedalen
ca74154619 PropertyPlacement: Convert x, y, z values to Quantities when using them in expressions. 2016-04-02 12:01:04 +02:00
Eivind Kvedalen
af9d9be117 PropertyPlacement: Fixed setting of angle (missing deg to radian conversion). 2015-12-18 22:05:31 +01:00
Mateusz Skowroński
05f95c0506 Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
Eivind Kvedalen
a45a663655 Added setValue/getValue/canonicalPath/getPaths/verifyPath methods to various Property classes. 2015-09-21 14:51:03 +02:00
Yorik van Havre
4fd3a15b98 Added new property type: App::PropertyVectorDistance
This works exactly as a normal PropertyVector, but it
uses the Units-enabled GUI editor instead.
2015-08-31 22:57:29 -03:00
jriegel
ec0a5ccb0c Merge branch 'refs/heads/double-precision-werner'
Conflicts:
	src/App/Document.cpp
	src/App/PropertyGeo.cpp
	src/App/PropertyStandard.cpp
	src/Base/Reader.cpp
	src/Base/Reader.h
	src/Gui/propertyeditor/PropertyItem.cpp
	src/Mod/Fem/Gui/ViewProviderFemMesh.cpp
	src/Mod/Inspection/Gui/ViewProviderInspection.cpp
	src/Mod/Mesh/App/MeshProperties.cpp
	src/Mod/Part/App/TopoShapeFacePyImp.cpp
	src/Mod/PartDesign/App/FeatureRevolution.cpp
2013-09-26 00:05:05 +02:00
jriegel
abf1623f07 Add SchemaVersion to RestoreDocFile to distinquish double from float binary 2013-09-24 11:01:09 +02:00