Benjamin Nauck
22120fa597
Use Base::toDegrees() instead of manually converting
2025-04-15 07:16:39 +02:00
Benjamin Nauck
f932c7e4e0
Use Base::toRadians() instead of manually converting
2025-04-15 07:16:36 +02:00
Benjamin Nauck
d9af862627
Base: Add #include <limits> where used
2025-03-31 23:50:30 +02:00
Benjamin Nauck
ae686942a7
Base: Use std::numeric_limits and std::numbers instead of defines
2025-03-29 13:32:37 +01:00
Benjamin Bræstrup Sayoc
dda05369c4
Base: remove unneeded includes
2025-02-18 11:07:57 -06:00
Kacper Donat
1df3b5be6c
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
88141d6dce
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
019adbb846
Base: add missing axis and angle update for Rotation::setEulerAngles
2024-03-04 11:07:21 -06:00
wmayer
08b10cd287
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
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
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
767647a05f
fix readability-avoid-const-params-in-decls
2023-11-16 01:22:08 +01:00
wmayer
e85c383bff
Base: apply clang format
2023-11-13 12:01:26 -05:00
Jolbas
2d8c280528
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
d453672ab8
[BASE] Removed dead code ( #10330 )
2023-08-28 10:41:20 -05:00
wmayer
010dca8303
Base: C++ core guidelines: init variables
2023-08-24 18:48:52 +02:00
wmayer
8f08d8c7cd
Lint: fix several issues discovered by clazy
2023-08-18 08:44:49 -05:00
wmayer
2bc90e6090
Base: modernize C++: return braced init list
2023-08-18 00:36:24 +02:00
Jolbas
6c3efbdb3b
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
bb566c7777
Base: add overloaded method isIdentity() to Rotation and Placement that accepts a tolerance
2023-01-03 10:54:47 +01:00
marioalexis
1972dfe5a3
Base: Replace C cast
2022-09-18 11:06:51 -05:00
wmayer
d2168f51b9
Base: modernize C++: replace 'typedef' with 'using'
2022-08-29 11:42:09 +02:00
wmayer
91ea39a5c0
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
4d00faeceb
Base: add methods to transform a Vector3f with a Rotation or Placement
2022-08-04 11:45:39 +02:00
wmayer
2e3f3bab7e
Base: [skip ci] use Precision class in Rotation::makeRotationByAxes
2022-07-30 17:21:59 +02:00
wmayer
c7c43fcf4b
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
f64916dc5e
Base: Set angle in Rotation::inverse function
2022-06-19 15:44:05 +02:00
wmayer
cd65de7e44
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
882e34f2ce
Base: modernize C++11
...
* use nullptr
2022-03-23 16:57:25 +01:00
wmayer
e4435cdcba
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
f20840442f
[Base] Quantity, Rotation, Stream: remove unused includes
2022-03-01 11:27:54 +01:00
wmayer
4d87039635
Base: modernize C++11
...
* remove redundant void-arg
* use nullptr
* replace deprecated headers
2022-01-25 20:21:30 +01:00
wmayer
b159144e13
Base: [skip ci] handle gimbal lock when computing Euler angles
2021-10-27 17:02:07 +02:00
0penBrain
e1dc69f56d
[Core] Rotation : improve gimbal lock handling
...
Tolerance copied from OCC "gp_Quaternion.cxx"
2021-09-27 16:52:21 +02:00
0penBrain
59a4a4c361
[Core] Rotation : fix gimbal lock handling
...
+ fix Euler representation on GUI
2021-09-13 18:34:58 +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
d5f6c096b8
Base: Fix header uniformity, whitespace, and doxygen
...
[skip ci]
2020-11-22 18:12:16 +01:00
luz.paz
d36c3ebe57
Trivial code formatting for some {.cpp,.h} files
2020-04-06 12:55:27 +02:00
wmayer
1f3d2389bc
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
9b15d01b29
fix implementation of Rotation::isSame(const Rotation& q, double tol) and extend Python bindings
2019-09-10 14:17:07 +02:00
Zheng, Lei
3fcbf71fb5
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
df05840212
handle gimbal lock when converting between quaternion and Euler angles (issue #0004062 )
2019-07-22 16:31:42 +02:00
wmayer
28b195d6e2
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
11b8f91c5d
Misc. typos
2018-01-27 19:43:18 +01:00
wmayer
83fe8f8c36
fix OpenSCAD importer
2018-01-01 16:45:06 +01:00
wmayer
b22f231345
fix invalid syntax
2017-12-13 17:24:39 +01:00
wmayer
25bf33077e
rename Placement.isNull to Placement.isIdentity
...
implement Rotation.isNull and Rotation.isIdentity
2017-12-13 17:00:38 +01:00
wmayer
a19faf16f7
preserve length of rotation axis
2017-12-13 17:00:38 +01:00
wmayer
aa201cba9c
improve whitespaces
2017-12-13 17:00:38 +01:00