Commit Graph

2880 Commits

Author SHA1 Message Date
Paddle
83db40179b Circle DSH : Implement tool parameters. 2023-11-13 14:00:18 +01:00
Paddle
28744a9bbc Ellipse DSH : add cursor texts and remove showInternal checkbox. 2023-11-13 14:00:18 +01:00
Paddle
ccbe4c1c49 Ellipse DSH : Implement tool parameters. 2023-11-13 14:00:18 +01:00
Paddle
314449cef9 Arc DSH : implement tool parameters. 2023-11-13 14:00:18 +01:00
Paddle
c2bb84de8e DSH : modify drawDoubleAtCursor so that it can draw an angle. 2023-11-13 14:00:18 +01:00
Paddle
dfd4d6a6d9 Adds areColinear function to Utils. 2023-11-13 14:00:18 +01:00
Paddle
d8d1692bcb Adds CircleEllipseConstructionMethod. 2023-11-13 14:00:18 +01:00
Abdullah Tahiri
cd601fb488 Sketcher: DSH Default - improve return value of ShapeGeometry functions
=======================================================================

Previous version return an reference to the smart pointer to generic Part::Geometry.

This version returns a type specific naked pointer, while ShapeGeometry keeps ownership
and memory management, so if an arc is created a Part::ArcOfCircle is returned.
2023-11-12 17:53:36 +01:00
Abdullah Tahiri
99889ac487 Sketcher: Box Selection - refactor
==================================

Full refactor of this function without change of functionality (hopefully).
2023-11-11 21:19:12 +01:00
Abdullah Tahiri
6eb55822a0 Sketcher: Box selection - Hyperbola/Parabola endpoint fix 2023-11-11 21:19:12 +01:00
Abdullah Tahiri
2d499873b0 Sketcher: DSH - improving geo creation helpers for ShapeGeometry
================================================================

In some DSHs instead of the convenience function, the code is being duplicated because
of the need to access the geometry after pushing it to the std::vector.

This commit leverages emplace_back return reference to improve code reuse.
2023-11-11 21:18:20 +01:00
Abdullah Tahiri
c4085b0a8f Sketcher: Adapt DSHs to new dynamic cursor 2023-11-11 11:15:54 +01:00
Abdullah Tahiri
1d0c72a685 Sketcher: DSHController - extend framework to make cursors OVP visibility dependent 2023-11-11 11:15:54 +01:00
Abdullah Tahiri
c863f2f341 Sketcher: DSH - new cursor drawing functions 2023-11-11 11:15:54 +01:00
Chris Hennes
f25af97811 Update translations 2023-11-09 12:23:56 -06:00
Abdullah Tahiri
f56eebea64 Sketcher: Fix lints 2023-11-08 17:46:34 +01:00
Abdullah Tahiri
2f40dd34c8 Sketcher: Encapsulate function to ensure MDI focus 2023-11-08 17:46:34 +01:00
Paddle
fd0f300415 Line DSH : hide widget if OVP disabled. 2023-11-08 15:20:13 +01:00
Paddle
c7f0b19eaa Remove moveCursorToSketchPoint on init. 2023-11-08 15:20:13 +01:00
Paddle
8be614abcc Fix bug where M key stop working in some cases by giving focus to MDI on reset. 2023-11-08 15:20:13 +01:00
Paddle
fc55350abf Rectangle DSH : set OVP Functions. 2023-11-08 15:20:13 +01:00
Paddle
379ab4cd90 Polygon DSH : set OVP Functions. 2023-11-08 15:20:13 +01:00
Paddle
80d4a9b2ab Offset DSH : set OVP Functions. 2023-11-08 15:20:13 +01:00
Paddle
0984b6e7dc Line DSH : set OVP Functions. 2023-11-08 15:20:13 +01:00
Paddle
988aecea6c Add preference for OVP visibility. 2023-11-08 15:20:13 +01:00
Abdullah Tahiri
9db65bbf9a Sketcher: Update DSHs to set value via framework only when they are visible 2023-11-08 15:20:13 +01:00
Abdullah Tahiri
ed9e6d104b Sketcher: DrawSketchController - Extend framework to support hiding OVPs via preference 2023-11-08 15:20:13 +01:00
Abdullah Tahiri
dca052bd9d Fix Compiler warnings of previous merged PRs 2023-11-08 15:20:13 +01:00
Abdullah Tahiri
d0f9869f6d Sketcher Gui: DrawSketchController - lints 2023-11-08 15:20:13 +01:00
Abdullah Tahiri
13e3491148 Sketcher: Handling of right mouse button during handler execution
=================================================================

    Instead of terminating the handler, as mandated before this PR by ViewProviderSketch, ViewProviderSketch
    delegates the action to DrawSketchHandler.

    DrawSketchHandler implements by default this terminating behaviour, but allows to override it.

    DrawSketchDefaultHandler (and all tools deriving from it) implement as default behaviour to cancel if
    in initial state, otherwise to reset.
2023-11-07 16:05:08 +01:00
Abdullah Tahiri
cc5e928d74 Sketcher: Handling of ESC keypress during handler execution
===========================================================

Instead of terminating the handler, as mandated before this PR by ViewProviderSketch, ViewProviderSketch
delegates the action to DrawSketchHandler.

DrawSketchHandler implements by default this terminating behaviour, but allows to override it.

DrawSketchDefaultHandler (and all tools deriving from it) implement as default behaviour to cancel if
in initial state, otherwise to reset.
2023-11-07 16:05:08 +01:00
Paddle
95e6699a3e EditableDatumLabel : Fix issue where the spinbox would get in the way of the cursor for angle. For example line angle. 2023-11-07 15:36:21 +01:00
Paddle
72b03cb787 Offset DSH : various fixes 2023-11-07 15:36:21 +01:00
Paddle
8e3ade309d Rectangle DSH : fix a bug when trying to make inward thickness. 2023-11-07 15:36:21 +01:00
Paddle
3334ac289c Rectangle DSH : Fixes #11287. Issue where the spinbox for frame thickness doesn't get focus. 2023-11-07 15:36:21 +01:00
Paddle
fee6ba28d2 Rectangle DSH : Fixes #11285, for frames two parallels constraints were missing. 2023-11-07 15:36:21 +01:00
Paddle
e7ed8e295e Rectangle DSH : change names or modes. 2023-11-07 15:36:21 +01:00
Paddle
8f17091b8b Fix focus passing between OnViewParameters with tab. 2023-11-07 15:36:21 +01:00
Paddle
5e8701a2ca Fix bug nParameter is not initialized based on construction methode.
Also fix bug construction methode combobox is not at correct index on tool start if not first methode.
2023-11-07 15:36:21 +01:00
mosfet80
2b2a20d9d9 [planegcs] Removed unused code. (#10684)
* Revert cleanplanegcs: removed unused code, removed redefinition of pi
* Sketcher: Switch pi refs to double and constexpr
* Modify code to use the new pi constant immediately

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2023-11-06 14:35:59 -06:00
Paddle
a7e1cba6b0 Sketcher_Dimension: If radius of arc is not DoF, then offer arc angle first. 2023-11-06 14:02:54 -06:00
Chris Hennes
37a8e348c6 Merge pull request #11231 from DeflateAwning/http-cleanup
Find and replace http://freecad to https://freecad
2023-11-06 11:16:13 -06:00
Chris Hennes
590fb19f31 Merge pull request #10978 from FlachyJoe/modernize-type-check
Modernize type and derived type checking
2023-11-06 10:44:32 -06:00
Adrian Insaurralde Avalos
10b51f92eb Sketcher: fix Line tool settings mode name 2023-11-05 07:36:22 +01:00
Abdullah Tahiri
3eda026ecb Sketcher Gui: Fix dead code clang-tidy 2023-11-05 07:11:57 +01:00
Abdullah Tahiri
533250bc34 Sketcher Gui: clang-tidy diagnostic errors 2023-11-05 07:11:57 +01:00
Paddle
8239483c35 Offset fix isActive function. 2023-11-04 08:58:50 +01:00
Paddle
6efe9d1fba Polygon DSH : Small syntax improvements. 2023-11-04 08:58:50 +01:00
Paddle
48c5a413a3 Line DSH : syntax and remove potential issues. For example in width+length mode, if user input 0 and 0, instead of validating it will unset the spinboxes. Preventing creation of null lines. 2023-11-04 08:58:50 +01:00
Paddle
386467e685 Rectangle DSH : Fix a bug where 3p rectangle with radius, radius would not apply. Also fix various edge cases. Improve syntax. 2023-11-04 08:58:50 +01:00