Commit Graph

20 Commits

Author SHA1 Message Date
wmayer
985def3416 Base: apply clang format 2023-11-13 12:01:26 -05:00
Jonas Bähr
34b176c1db Remove C++ escaping from *Py.xml templates
Now all escaping required for the C++ code generation is done when the
.cpp/.h files are generated. Previously, only newlines were escaped
automatically. This was a) inconsistent and b) leaked c++ details into
the xml data.
In addition, the escaping is now done in one central place, harmonizing
the three previous implementations.

Pre-existing c++ escape sequences in the XML files have been replaced by
their literal equivalent so that the resulting python doc sting remains
unchanged.
2023-08-16 13:17:25 +02:00
wmayer
f039789d0b Base: add overloaded method isIdentity() to Rotation and Placement that accepts a tolerance 2023-01-03 10:54:47 +01:00
wmayer
00bdd16dff Base: extend Placement/Rotation API
* Add Placement::isSame() and expose to Python
* Add Placement::multRight/Placement::multLeft
* Fix PlacementPy::rotate
* Add Rotation::multRight/Rotation::multLeft
* Add a test feature FeatureTestPlacement for uni tests
* Add unit tests
2022-08-09 11:54:05 +02:00
wmayer
b35f66e7c6 Base: [skip ci] improve whitespaces 2022-08-09 08:25:59 +02:00
Markus Fröschle
0c06f0d01d Fix Placement.rotate() to match documentation
Documentation for Placement.rotate() claims this function would be
compatible to TopoShape.rotate() which isn't exactly correct as the
generated placements differ because of backwards multiplication.

This commit adds a "comp" (as in "compatible") keyword argument that -
when "True" (default is False) - produces a Placement that is interchangable with the one
that is generated from TopoShape.rotate().
2022-08-09 07:22:46 +02:00
marioalexis
0273d7e1a8 Base: Minor changes in some Python docstrings 2022-06-25 17:12:06 +02:00
marioalexis
d6981c228a Base: Improve docstrings in RotationPy.xml 2022-05-29 10:34:59 +02:00
marioalexis
941ea70507 Base: Improve docstrings in PlacementPy.xml 2022-05-27 09:53:29 +02:00
wmayer
b656301c9b expose Placement.slerp to Python 2019-10-12 23:58:54 +02:00
DeepSOIC
6f5fa8e305 Base: Placement: change argument order of slerp() in Py
to be consistend with that of C++ one, and of RotationPy
2019-10-12 20:35:20 +02:00
DeepSOIC
048671a507 Base: Placement: expose ScLERP to python 2019-10-12 15:39:39 +02:00
Zheng, Lei
ff3ec0c7fd Base: add Python number protocol support to Placement/Rotation 2019-09-28 15:32:00 +02:00
Zheng, Lei
1efadc928e Base: improve base python object number protocol 2019-09-28 15:30:23 +02:00
Zheng, Lei
2d9ca92594 Base: misc patches
Convenience macros/function (in Interpreter.h)

* FC_PY_GetObject/Callable(), look for callables in a python object,
  which will be used in future patch to improve performance in various
  python observer/features.

* pyCall(WithKeywords)(), helper function to invoke the callable

Matrix4D:

* hasScale(), check if there is any scale in the transformation. If so,
  further check if the scale is uniform or not. This will be used in
  future patch for Part::TopoShape to decide which type of transform to
  apply.

Placement:

* translate/rotate(), new convenience API

Rotation:

* isSame/multiVec(), new convenience API

Polygon2d:

* Intersect(), GetCenter(), new convenience API.

FlagToggler:

* New class for exception safe flag toggling, similar to StateLocker
  but with template (actually, FlagToggler is added earlier by me).

BitsetLocker:

* New class for exception manipulation of a std::bitset variable.
2019-08-17 14:52:08 +02:00
wmayer
df0a3ded78 rename Placement.isNull to Placement.isIdentity
implement Rotation.isNull and Rotation.isIdentity
2017-12-13 17:00:38 +01:00
wmayer
c3c11a9b81 + implement rich compare protocol of Python interface for Placement & Rotation 2016-05-18 11:26:27 +02:00
wmayer
9ef32aab8e + fixes #0001536: Feature.Placement.Rotation.isNull() touches the Feature 2014-05-08 18:52:08 +02:00
Yorik van Havre
a5e5389745 Added 0000650 - Placement.isNull() function 2012-03-28 10:39:10 -03: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