Benjamin Nauck
f22f3705db
Use Base::toDegrees() instead of manually converting
2025-04-15 07:16:39 +02:00
Benjamin Nauck
21fbf8e539
Use Base::toRadians() instead of manually converting
2025-04-15 07:16:36 +02:00
Benjamin Nauck
cb51f3fd2c
Base: Add #include <limits> where used
2025-03-31 23:50:30 +02:00
Benjamin Nauck
3253f2c2de
Base: Use std::numeric_limits and std::numbers instead of defines
2025-03-29 13:32:37 +01:00
Benjamin Bræstrup Sayoc
6f619b5f1c
Base: remove unneeded includes
2025-02-18 11:07:57 -06: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
Kacper Donat
e12bdfc29c
Part: Add midpoint attachement mode
...
This adds midpoint attachement mode to Attacher. It works just like
method for finding placement of JCS in Assembly.
2025-01-04 16:32:52 +01:00
bdieterm
b552ea7dbf
Base: add missing axis and angle update for Rotation::setEulerAngles
2024-03-04 11:07:21 -06:00
wmayer
3ac4dc0686
fix cppcoreguidelines-*
...
* cppcoreguidelines-init-variables
* cppcoreguidelines-c-copy-assignment-signature
* cppcoreguidelines-macro-usage
* cppcoreguidelines-non-private-member-variables-in-classes
* cppcoreguidelines-pro-type-member-init
* cppcoreguidelines-slicing
* cppcoreguidelines-special-member-functions
* cppcoreguidelines-virtual-class-destructor
2023-11-16 01:22:09 +01:00
wmayer
365e7136cd
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
a602003747
fix readability-isolate-declarations
2023-11-16 01:22:08 +01:00
wmayer
bd88162b9d
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
0633129b83
fix readability-avoid-const-params-in-decls
2023-11-16 01:22:08 +01:00
wmayer
985def3416
Base: apply clang format
2023-11-13 12:01:26 -05:00
Jolbas
31637adaa0
Create rotation from any matrix
...
To help find a matrix components a decompose method is added to Matrix class
2023-09-28 15:25:29 -05:00
mosfet80
cb607ffe1e
[BASE] Removed dead code ( #10330 )
2023-08-28 10:41:20 -05:00
wmayer
097d5d6fee
Base: C++ core guidelines: init variables
2023-08-24 18:48:52 +02:00
wmayer
ff1981fcdc
Lint: fix several issues discovered by clazy
2023-08-18 08:44:49 -05:00
wmayer
59760c723f
Base: modernize C++: return braced init list
2023-08-18 00:36:24 +02:00
Jolbas
554a40f91c
Fix create Rotation from scaled matrix
...
Support for creation of Rotation from matrices which is a combination of non uniform scale and a rotation
Fixes according to review
Scale -1 is Uniform, Not NoScaling
Fix hasScale() when negative scale
2023-02-24 20:33:40 -06:00
wmayer
f039789d0b
Base: add overloaded method isIdentity() to Rotation and Placement that accepts a tolerance
2023-01-03 10:54:47 +01:00
marioalexis
be8b5f345c
Base: Replace C cast
2022-09-18 11:06:51 -05:00
wmayer
4e42ff7baa
Base: modernize C++: replace 'typedef' with 'using'
2022-08-29 11:42:09 +02: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
513ef44a13
Base: add methods to transform a Vector3f with a Rotation or Placement
2022-08-04 11:45:39 +02:00
wmayer
8abd40a788
Base: [skip ci] use Precision class in Rotation::makeRotationByAxes
2022-07-30 17:21:59 +02:00
wmayer
97f9320bb3
Core: fix minor issues:
...
+ fix issues found by clang's clazy tool
+ fix cppcoreguidelines-pro-type-member-init
* Make sure that all class members are initialized in the constructor
2022-06-30 16:31:16 +02:00
marioalexis
af94c6c9b7
Base: Set angle in Rotation::inverse function
2022-06-19 15:44:05 +02:00
wmayer
80c900cf52
Base: fix conversion from Placement to Matrix
...
See also: https://forum.freecadweb.org/viewtopic.php?f=3&t=61000
2022-04-29 13:45:50 +02:00
wmayer
4183c45a01
Base: modernize C++11
...
* use nullptr
2022-03-23 16:57:25 +01:00
wmayer
4a343ab31e
Base/App: fix warnings from code analysers:
...
* convert old-style-casts to explicit C++ casts where possible
* make some implicit conversions explicit
2022-03-06 23:49:30 +01:00
Uwe
686a025416
[Base] Quantity, Rotation, Stream: remove unused includes
2022-03-01 11:27:54 +01:00
wmayer
cad0d01883
Base: modernize C++11
...
* remove redundant void-arg
* use nullptr
* replace deprecated headers
2022-01-25 20:21:30 +01:00
wmayer
b803d987b9
Base: [skip ci] handle gimbal lock when computing Euler angles
2021-10-27 17:02:07 +02:00
0penBrain
419612d63e
[Core] Rotation : improve gimbal lock handling
...
Tolerance copied from OCC "gp_Quaternion.cxx"
2021-09-27 16:52:21 +02:00
0penBrain
cdbf7acc80
[Core] Rotation : fix gimbal lock handling
...
+ fix Euler representation on GUI
2021-09-13 18:34:58 +02:00
Zheng, Lei
37d6752404
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
01b21e0d06
Base: Fix header uniformity, whitespace, and doxygen
...
[skip ci]
2020-11-22 18:12:16 +01:00
luz.paz
ae72e2c762
Trivial code formatting for some {.cpp,.h} files
2020-04-06 12:55:27 +02:00
wmayer
52916175ed
start to replace old C-style casts with static_cast or reinterpret_cast, avoid implicit casts
2019-09-16 17:59:18 +02:00
wmayer
3726006942
fix implementation of Rotation::isSame(const Rotation& q, double tol) and extend Python bindings
2019-09-10 14:17:07 +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
d1b47718cf
handle gimbal lock when converting between quaternion and Euler angles (issue #0004062 )
2019-07-22 16:31:42 +02:00
wmayer
6b37fdc1a8
PVS issues:
...
consistently define copy constructor and assignment operator
remove superfluous casts
initialize member variables in constructor
avoid double assignment
2019-03-04 11:53:49 +01:00
luz.paz
436444b424
Misc. typos
2018-01-27 19:43:18 +01:00
wmayer
b9975a5e14
fix OpenSCAD importer
2018-01-01 16:45:06 +01:00
wmayer
7991e1ae7e
fix invalid syntax
2017-12-13 17:24:39 +01:00
wmayer
df0a3ded78
rename Placement.isNull to Placement.isIdentity
...
implement Rotation.isNull and Rotation.isIdentity
2017-12-13 17:00:38 +01:00
wmayer
ab908bf22d
preserve length of rotation axis
2017-12-13 17:00:38 +01:00
wmayer
3692861136
improve whitespaces
2017-12-13 17:00:38 +01:00