Commit Graph

2619 Commits

Author SHA1 Message Date
Chris Hennes
04e0fdd012 Merge pull request #9199 from Ondsel-Development/image_task
Image: Merge taskboxes into one 'Image plane Settings'.
2023-04-17 14:24:35 -05:00
Edoardo Morandi
3a6464d3ba fix: uninitialized class variable
This specific boolean variable could be used uninitialized. Assigning it
a default value is cheap and it avoids the issue.
2023-04-16 00:59:16 +02:00
Paddle
271e3bec4a Move SoDatumLabel from Sketcher to Core so that it can be reused anywhere. 2023-04-12 16:48:07 +02:00
0penBrain
b21b18a5c6 [Bugfix]Sketcher: edge/point colors in preferences aren't took into account
Regression introduced by 0f28f26 (PR #9151)
2023-04-10 11:13:02 +02:00
wmayer
e9a9413c71 Gui: rename getPointOnScreen() to getPointOnViewport() 2023-04-08 13:51:32 +02:00
André Caldas
82900b2417 Deletes GCS::Constraint directly instead of calling GCS::free(). 2023-04-06 16:29:48 +02:00
wmayer
68ea9fb561 [skip ci] Sketcher: disable button fixDegenerated when opening the dialog 2023-04-05 11:22:27 +02:00
wmayer
dd32810167 Sketcher: fix -Wclazy-connect-by-name 2023-04-05 00:44:13 +02:00
wmayer
43c3a31da9 Sketcher: restore toolbars when changing between workbenches in edit mode
This partially fixes issue #9135
2023-04-03 17:36:06 +02:00
luzpaz
5444a4a0cb Fix trailing whitespace 2023-04-02 12:18:13 +02:00
0penBrain
d31cd90d00 Sketcher: do not apply line/edge color preference to existing sketches, fixes #8188 2023-04-01 16:31:17 +02:00
0penBrain
4cc2a1af62 Gui: prevent crashes on MacOS using boost::format 2023-03-31 15:22:03 +02:00
Paddle
ba0e28bcbd Sketcher: Grid pref: Change names. 2023-03-27 15:22:32 +02:00
Uwe
53de24ae2d [Sketch] placecgs: remove unused includes
- also sort includes
- also fix too long lines etc. (done by clang formatter)
2023-03-26 20:27:18 +02:00
wmayer
651029e774 Sketch: fix trailing whitespaces of recorded sketcher commands 2023-03-26 18:41:56 +02:00
xtemp09
73929ad90f [Sketcher] Fix segmentation fault in ViewProviderSketch::setEdit
Closes #8979
2023-03-25 00:02:32 +01:00
Ajinkya Dahale
453acce2f7 [Sketcher] Fix some coincidence issues in B-spline drawing
See https://github.com/FreeCAD/FreeCAD/pull/8530#issuecomment-1474824366.

When there are already existing points and coincidence auto-constraints are
added in the process of making a B-spline (either by control points or
interpolation), unintended behaviour can happen.

Additionally, when creating B-spline by interpolation, if consecutive points are
coincident (or very close to each other), the OCCT algorithm fails. This is also
prevented in this commit.
2023-03-24 16:30:48 +01:00
Ajinkya Dahale
1ac4800869 [Sketcher] Fix corner-case issue creating periodic b-splines
See: https://github.com/FreeCAD/FreeCAD/pull/8530#issuecomment-1474824366.
2023-03-24 16:30:48 +01:00
Ajinkya Dahale
7446c19c08 [Sketcher] Run clang-format on DrawSketchHandlerBSplineByInterpolation.h 2023-03-24 16:30:48 +01:00
Ajinkya Dahale
c66ed794f9 [Sketcher] Clear out some TODOs and other comments 2023-03-24 16:30:48 +01:00
Ajinkya Dahale
8803404d88 [Sketcher] Fix and support periodic B-spline by interpolation
This commit is part of a project funded by the Open Toolchain Foundation under
the title "Open Toolchain Foundation - Curve drawing tool in Sketcher
Workbench".
2023-03-24 16:30:48 +01:00
Ajinkya Dahale
68d67ecb87 [Sketcher][planegcs] Fix knot position in non-uniform B-spline
The default factors set in `addConstraintInternalAlignmentKnotPoint` does not
work if the knots around a C1 knot are not equally far.
2023-03-24 16:30:48 +01:00
Ajinkya Dahale
5fee6608ea [Sketcher] Disable degree setting in B-spline by interpolation
This commit is part of a project funded by the Open Toolchain Foundation under the title "Open Toolchain Foundation - Curve drawing tool in Sketcher Workbench"
2023-03-24 16:30:48 +01:00
Ajinkya Dahale
f340b4104b [Sketcher] Add missing GUI elements for B-spline by knots
Commented out the periodic version for now since they don't work completely well.

This commit is part of a project funded by the Open Toolchain Foundation under the title "Open Toolchain Foundation - Curve drawing tool in Sketcher Workbench"
2023-03-24 16:30:48 +01:00
Ajinkya Dahale
357a3c0692 [Sketcher] Add icon for B-Spline by interpolation tool
This commit is part of a project funded by the Open Toolchain Foundation under the title "Open Toolchain Foundation - Curve drawing tool in Sketcher Workbench"

[Sketcher] Add better icons for `CreateBSplineByInterpolation`

Courtesy @paddlestroke.
2023-03-24 16:30:48 +01:00
Ajinkya Dahale
4b61edf470 [Sketcher] Support variable multiplicities in B-splines
As a side-effect also prevents a segfault possible by providing just 3 points.

[Sketcher] Clarify that mults might not be followed

Some examples when this may be ignored include:
1. A number higher than 3 is given (because cubic B-splines are created)
2. If the knots just before and just after have multiplicities >=3, the piece
between these two is fully continuous, and this (middles) point will only be
constrained with point-on-object.

This commit is part of a project funded by the Open Toolchain Foundation under the title "Open Toolchain Foundation - Curve drawing tool in Sketcher Workbench"
2023-03-24 16:30:48 +01:00
Ajinkya Dahale
d14daed442 [Sketcher] Constrain first pole weight in exposeInternalGeometry
This commit is part of a project funded by the Open Toolchain Foundation under the title "Open Toolchain Foundation - Curve drawing tool in Sketcher Workbench"
2023-03-24 16:30:48 +01:00
Ajinkya Dahale
94db5271b3 [Sketcher] [WIP] Add periodic B-spline support for interpolation DSH
This commit is part of a project funded by the Open Toolchain Foundation under the title "Open Toolchain Foundation - Curve drawing tool in Sketcher Workbench"
2023-03-24 16:30:48 +01:00
Ajinkya Dahale
69a56bc3fa [Sketcher] Fix typos caused by copying content in new DSH
Some parts of `DrawSketchHandlerBSplineByInterpolation` were taken from
`DrawSketchHandlerBSpline` but not modified to reflect the differences.

This commit is part of a project funded by the Open Toolchain Foundation under the title "Open Toolchain Foundation - Curve drawing tool in Sketcher Workbench"
2023-03-24 16:30:48 +01:00
Ajinkya Dahale
d2349f29db [Sketcher] Clarify keyboard input for B-spline DSH
Specifically, when drawing by interpolation, only cubic splines are currently
supported.

Some related "TODO" comments are also removed or modified.

This commit is part of a project funded by the Open Toolchain Foundation under the title "Open Toolchain Foundation - Curve drawing tool in Sketcher Workbench"
2023-03-24 16:30:48 +01:00
Ajinkya Dahale
e83a9804c1 [Sketcher] Create DSH for drawing B-splines by interpolation
Only creates 1-degree splines by describing knots.

This commit is part of a project funded by the Open Toolchain Foundation under the title "Open Toolchain Foundation - Curve drawing tool in Sketcher Workbench"
2023-03-24 16:30:48 +01:00
0penBrain
6bf7c137ea Sketcher: use default palette text color for normal solver messages
These messages had a forced black color which is a problem when using
 OS dark themes.
2023-03-23 10:50:01 +01:00
Uwe
6bf09c512d [Sketch] Constraints.cpp: formatting fixes
- fix too long lines
- also let clang reformat the file to uniform the formatting
2023-03-20 16:53:41 +01:00
Florian Foinant-Willig
c23f6a9221 Fix circles distance constraint for concentrics 2023-03-20 16:02:08 +01:00
Abdullah Tahiri
40ed989991 Missing overrides 2023-03-19 19:14:22 +01:00
Abdullah Tahiri
1db929e702 Refactor of CmdSketcherSnap and SnapSpaceAction to reduce verbose calls to retrieve preference parameters 2023-03-19 19:14:22 +01:00
Abdullah Tahiri
53304af62c Refactor parameter in a single place 2023-03-19 19:14:22 +01:00
Abdullah Tahiri
669b2d0993 Prevent unnecessary update of snapAngle, block signals when auto updating 2023-03-19 19:14:22 +01:00
Abdullah Tahiri
3975d4bb34 Remove unnecessary ViewProvider retrieving and checking, as it is unused 2023-03-19 19:14:22 +01:00
Abdullah Tahiri
485d4f3194 Rename angleSnapEnabled to angleSnapRequested for consistency with the other snap flags 2023-03-19 19:14:22 +01:00
Abdullah Tahiri
b2e7883462 Remov warning -squash group by meaningful groups 2023-03-19 19:14:22 +01:00
Abdullah Tahiri
7903fa4e87 Remove warning - SnapManager initialisation order in constructor different from class declaration 2023-03-19 19:14:22 +01:00
Abdullah Tahiri
7036939f17 Encapsulate interface data members 2023-03-19 19:14:22 +01:00
Abdullah Tahiri
febaca9070 Rename preference parameter 2023-03-19 19:14:22 +01:00
Abdullah Tahiri
e5e1f54729 Remove left-over code 2023-03-19 19:14:22 +01:00
Paddle
67615d6222 Sketcher: Snap: Add 'Snap at angle' to Arc of Ellipse DSH. 2023-03-19 19:14:22 +01:00
Paddle
a1255d11f8 Sketcher: Snap: Add 'Snap at angle' to Ellipse DSH. 2023-03-19 19:14:22 +01:00
Paddle
881d27d82f Sketcher: Snap: Add 'Snap at angle' to Line DSH. 2023-03-19 19:14:22 +01:00
Paddle
8bca9f0c36 Sketcher: Snap: Add 'Snap at angle' to Arc DSH. 2023-03-19 19:14:22 +01:00
Paddle
849fdd6956 Sketcher: Snap: Add 'Snap at angle' support to DrawSketchHandler. 2023-03-19 19:14:22 +01:00