Commit Graph

53 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
25c3ba7338 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
PhoneDroid
2a56489feb [ Base ]: Updated SPDX 2025-10-14 10:00:04 -05:00
Markus Reitböck
f0eca551b3 Base: 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-14 09:47:01 +02:00
Ladislav Michl
47c1565edf Base: remove explicit namespace-name qualifier from *PyImp.cpp
Explicit Base namespace-name is used randomly across PyImp sources.
Remove it.
2025-04-27 00:05:32 +02:00
Ladislav Michl
24d55dc616 Base: cleanup includes in *PyImp.cpp
Sort includes and implicitely add missing ones. While there
consistently explain where generated files some from.
2025-04-27 00:05:32 +02:00
Ladislav Michl
986a3b4f7a Base, Gui: remove lefovers from xml -> pyi conversion 2025-04-25 11:57:24 +02:00
Jacob Oursland
5b81cd741a python: apply const method annotations to impls. 2025-04-16 20:32:04 -07:00
wmayer
03a371d6e3 Core: Fix memory leaks with PySequence_GetItem 2024-05-08 23:40:27 +02:00
Ladislav Michl
95b37fa806 Base: Do not use else before return 2024-01-21 16:14:12 +01:00
Alex Neufeld
8936a4bd1b Fix Rotation constructor error msg 2024-01-05 11:10:10 -06:00
Chris Hennes
bf0b19c175 Merge pull request #11409 from wwmayer/fix_clangtidy_base
Base: Fix clang-tidy reports
2023-11-20 08:17:27 -06:00
mos
c25500fc72 fix python get value rotation are a Long .
remove old check python >=3.5 -> freecad require python 3.6
2023-11-16 14:05:30 +01:00
wmayer
39337ea12e fix bugprone-*
* bugprone-throw-keyword-missing
* bugprone-unhandled-self-assignment
* bugprone-suspicious-string-compare
* bugprone-reserved-identifier
* bugprone-narrowing-conversions
* bugprone-macro-parentheses
* bugprone-implicit-widening-of-multiplication-result
* bugprone-exception-escape
* bugprone-copy-constructor-init
2023-11-16 01:22:09 +01:00
wmayer
7c00932fa0 fix readability-isolate-declarations 2023-11-16 01:22:08 +01:00
wmayer
5c306f6e2a fix readability-*:
* readability-uppercase-literal-suffix
* readability-named-parameter
2023-11-16 01:22:08 +01:00
wmayer
f539138dd9 fix readability-*:
* readability-const-return-type
* readability-container-data-pointer
* readability-container-size-empty
* readability-delete-null-pointer
* readability-else-after-return
* readability-inconsistent-declaration-parameter-name
* readability-redundant-member-init
* readability-redundant-smartptr-get
* readability-redundant-string-cstr
* readability-use-anyofallof
* readability-static-definition-in-anonymous-namespace
* readability-static-accessed-through-instance
* readability-simplify-boolean-expr
2023-11-16 01:22:08 +01:00
wmayer
e85c383bff Base: apply clang format 2023-11-13 12:01:26 -05:00
Chris Hennes
3b79fd58b7 Base: Wrap PyArg_ParseTupleAndKeywords 2023-08-25 14:52:30 -05:00
wmayer
010dca8303 Base: C++ core guidelines: init variables 2023-08-24 18:48:52 +02:00
wmayer
da63fbaacf Base: catch exception raised by Rotation::setValue 2023-03-01 18:43:15 +01:00
wmayer
bb566c7777 Base: add overloaded method isIdentity() to Rotation and Placement that accepts a tolerance 2023-01-03 10:54:47 +01:00
berniev
4043d049bc remove redundant void from Base 2022-07-31 14:10:34 +02:00
wmayer
b39c6f62b4 Base: replace several reinterpret_cast 2022-05-11 20:01:40 +02:00
wmayer
882e34f2ce Base: modernize C++11
* use nullptr
2022-03-23 16:57:25 +01:00
wmayer
9160f06e1c Base: rename BaseExceptionFreeCADError to PyExc_FC_GeneralError 2022-03-17 14:45:48 +01:00
Uwe
f20840442f [Base] Quantity, Rotation, Stream: remove unused includes 2022-03-01 11:27:54 +01:00
wmayer
cd8ce95f53 Base: [skip ci] C++11: modernize use nullptr (replaces NULL or 0) 2021-10-27 19:26:26 +02:00
wmayer
cd91c73382 Base: [skip ci] in Rotation class allow to set angle in radian
App.Rotation(axis, angle) still defines the angle in degree
App.Rotation(axis, Degree=angle) does the same as above
App.Rotation(axis, Radian=angle) defines the angle in radian
2021-10-27 10:59:34 +02:00
wmayer
4c886771d1 Base: harmonize Python API of Rotation class 2021-10-27 10:40:35 +02:00
wmayer
951a0be9c7 Base: [skip ci] expose Rotation.fromEuler() to Python 2021-10-27 00:34:36 +02:00
Zheng, Lei
c1454dfbed Base: add new API Rotation::get/setEulerAngles()
Exposed to Python as new constructor parameters and
Rotation.toEulerAngles()

This function uses the code from OCCT
gp_Quaternion::Get/SetEulerAngles() to support all 24 possible
generalized euler rotation sequences. Call Rotation.toEulerAngles()
without argument to obtain all possible sequence types.
2021-05-02 17:20:45 +08:00
luz paz
142c2c2c4d Base: remove Py2 code 2021-04-26 09:23:58 +02:00
luz paz
d5f6c096b8 Base: Fix header uniformity, whitespace, and doxygen
[skip ci]
2020-11-22 18:12:16 +01:00
wmayer
1cfe6d2cc7 Part: [skip ci] support of expressions of Euler angles in attachment dialog 2020-03-21 14:27:53 +01:00
wmayer
ba95cc73ad Base: [skip ci] do not normalize axis when changing angle of a Rotation object 2019-12-28 14:04:02 +01:00
wmayer
fd352c14f1 expose Roation.slerp to Python 2019-10-11 01:14:35 +02:00
wmayer
38740a0e4a add method RotationPy.toMatrix() 2019-10-07 19:27:54 +02:00
wmayer
ccbd5792e9 improve RotationPy::number_power_handler: make computation more efficient and less prone to round-off errors 2019-10-07 19:23:14 +02:00
Zheng, Lei
890bc90b0c Base: add RotationPy.RawAxis
Expose rotation raw axis
2019-10-07 17:24:31 +02:00
Zheng, Lei
12000cd490 Base: fix __pow__ operator in MatrixPy/PlacementPy/RotationPy 2019-10-07 17:24:30 +02:00
Zheng, Lei
83284a3cdd Base: add Python number protocol support to Placement/Rotation 2019-09-28 15:32:00 +02:00
wmayer
9b15d01b29 fix implementation of Rotation::isSame(const Rotation& q, double tol) and extend Python bindings 2019-09-10 14:17:07 +02:00
wmayer
401af92890 implement setting custom attributes for RotationPy to assign matrix or pair of vectors 2017-12-31 18:18:27 +01:00
wmayer
25bf33077e rename Placement.isNull to Placement.isIdentity
implement Rotation.isNull and Rotation.isIdentity
2017-12-13 17:00:38 +01:00
DeepSOIC
96f3f0fa26 Base: new Rotation constructor - on vectors
The new constructor accepts wanted directions of x,y,z axes of rotated
frame, and a priority string that affects how the vectors are made
perpendicular to each other.

Example - construct placement for sketch on XZ plane:

v = App.Vector
App.Rotation(v(1,0,0),v(0,0,1),v())
2017-09-10 18:31:40 +02:00
wmayer
885050d33e + fix == operator of Rotation class, + add method isSame() 2016-05-18 18:08:40 +02:00
wmayer
6a66073928 + implement rich compare protocol of Python interface for Placement & Rotation 2016-05-18 11:26:27 +02:00
jriegel
884ae139fa Several enhancements
+ PLMXML Reader
+ Some meta information sorting
+ Making ProductRefs invisibly in Tree
2016-04-12 18:12:03 +02:00
wmayer
52dc0dda47 + allow to modify placement via sub-attributes 2014-12-02 19:19:23 +01:00
wmayer
f5e12c74ac 0001285: update doc 2013-10-23 17:22:07 +02:00