Commit Graph

3197 Commits

Author SHA1 Message Date
ppphp
12e8fb1695 fix unique ptr usage in sketch (#15008)
* fix unique ptr usage in sketch

* [pre-commit.ci] auto fixes from pre-commit.com hooks
2024-07-08 10:53:49 -05:00
Chris Hennes
9d2c34a1c7 Sketcher: Switch SnapManager from Win-1252 to UTF-8 2024-07-08 17:51:33 +02:00
PaddleStroke
c4bf2fb1d6 Sketcher: BSpline DSH: Fix crash: If you create new sketch, start bspline tool and change mode, it would crash. It's because it was doing a abortCommand before the command was opened. So it cancelled the create sketch command. 2024-07-08 10:50:33 -05:00
PaddleStroke
1b8af95da7 Sketcher: BSpline: Fix crash when cancelled while only one point with autoconstraint. 2024-07-08 10:41:11 -05:00
wmayer
ab66e010b9 Sketcher: Handle PyException in createGeneratedAutoConstraints
Command::doCommand may throw an exception that isn't handled by the active sketch handler. This may leave it in an inconsistent state and can cause a crash later.

See #14945
2024-07-08 10:40:04 -05:00
wmayer
e9f3178715 MSVC: Fix warning C4005: 'NOMINMAX': macro redefinition 2024-07-05 17:04:43 +02:00
wmayer
cbfd9f0d7e Sketcher: Fix format string in ExternalGeometryFacade::initExtensions()
The format string of the warnings were incorrect and caused an fmt::format_error exception
2024-07-04 22:05:22 +02:00
Yorik van Havre
56e46e5f4e Translations (#15107)
* Updated ts files

* Merged crowdin translations

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-07-02 12:21:53 +02:00
Chris Hennes
e371f7fb43 Merge pull request #14461 from AjinkyaDahale/sk-fix-12592-bsp-by-knot-trim
[Part][Sketcher] Fix some B-spline trimming issues
2024-07-01 11:28:50 -05:00
FEA-eng
bc00409a01 Sketcher: New carbon copy icons (#15074)
* Sketcher: Delete src/Mod/Sketcher/Gui/Resources/icons/geometry/Sketcher_CarbonCopy.svg

* Sketcher: Delete src/Mod/Sketcher/Gui/Resources/icons/geometry/Sketcher_CarbonCopy_Constr.svg

* Add new carbon copy icon

* Add new carbon copy constr icon
2024-07-01 11:00:07 -05:00
Max Wilfinger
86b1c2e863 Activate Part/Part Design check and refine preferences by default (#14406)
* Activate Part/Part Design check and refine preferences by default

* added bool in .ui

* Update tests

* Fix Sketcher tests
2024-07-01 10:50:42 -05:00
bgbsww
bdcdb630c0 Cleanup 2024-06-28 22:24:30 -04:00
pre-commit-ci[bot]
3d6a490003 Review cleanups 2024-06-28 11:57:43 -05:00
bgbsww
08859462ea Toponaming: Cleanups 2024-06-28 11:57:43 -05:00
Zheng, Lei
3dbc1d7393 Toponaming: Transfer in missing Code for BaseFeatures and Sketches 2024-06-28 11:57:43 -05:00
Ajinkya Dahale
bf649e2419 [Sketcher] Delete point-on-object on trimmed portion
This could cause undesirable shape change, especially in B-splines.
2024-06-24 21:56:58 +05:30
Ajinkya Dahale
ee2d324744 [Sketcher] Fix some issues with trimming splines
1. Transfer point-on-object to the correct resulting curve: Currently the
constraint remains on the "start" curve created after the trim.
2. Expose internal geometries of both resulting B-splines.
2024-06-24 21:56:58 +05:30
Ajinkya Dahale
1a6a7d07c2 [Sketcher] Rearrange directives to appease syntax highlight
Spacemacs doesn't handle the braces flow very well. This commit can be dropped
if necessary.
2024-06-24 21:56:58 +05:30
Syres916
136da90645 [Sketcher] Correct default OVP and Geometry Creation colors... (#14763)
* [Sketcher] Correct default OVP and Geometry Creation colors

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-06-24 11:08:28 -05:00
Chris Hennes
0740d9a006 Merge pull request #14386 from maxwxyz/sketcher-draw-style
Sketcher: Changes override draw style when entering sketch edit mode.
2024-06-24 10:48:19 -05:00
Chris Hennes
3bf4f00092 Merge pull request #14079 from Ondsel-Development/sk_bspline_ovp
Sketcher: BSpline DSH: implement OVP/widget
2024-06-24 10:38:15 -05:00
CalligaroV
b8cf43424e Sketcher: fix external edges selection
* fix selection from Sketcher Task Panel
 * fix selection from 3D View
 * Synchronize selection between Task Panel and 3D View

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-06-24 10:35:54 -05:00
Max Wilfinger
ce181eb15c Rename OVP preference options 2024-06-23 12:29:19 -05:00
wmayer
127f935711 Fix several compiler warnings
* -Wmaybe-uninitialized
* -Wunused-parameter
* -Wunused-variable
* -Wnonnull
* -Wstringop-truncation
* -Wstringop-overflow
2024-06-19 21:14:23 -05:00
Chris Hennes
c601438b71 Fem/Sketcher: Fix missing PreCompiled.h files 2024-06-18 08:05:32 -05:00
bgbsww
c5de6ccfc7 Toponaming: Fix crash with invalid external geometry 2024-06-17 11:31:04 -05:00
Mihail Dumitrescu
7eff7ee9d0 Fix importing arcs and elliptical arcs as external geometry.
Fix importing elliptical arcs issue #8700.
Fix importing arcs into sketches in the case where they project as elliptical arcs.
Fix a discontinuity that happens when an external arc projects down to a segment. The segment end points should not jump around if the projection angle changes from 89.9 to 90 degrees.
When handling external geometry compare points for equality in a consistent way and remove some dead code.
2024-06-17 11:04:52 -05:00
Alexandre Prokoudine
c9dba8a51e Adjust names of two Sketcher tools to make their functions discoverable
Users report that they have a hard time figuring out that 'Array transform' does
movement/translations, and 'Polar transform' does rotation. Hence this
adjustment of their user-visible names.
2024-06-17 10:57:10 -05:00
PaddleStroke
425896108f Sketcher: BSpline DSH: implement OVP/widget 2024-06-17 16:52:24 +02:00
PaddleStroke
0830360e1f Sketcher: Fix circle diameter OVP 2024-06-13 14:51:48 -05:00
PaddleStroke
b6f7fe8923 Sketcher: - Give focus to the MDI so that keyboard events are caught after starting edit. Else pressing ESC right after starting edit will not be caught to exit edit mode.
- After tool handler is purged, give back focus to MDI to make sure VPSketch receive the keyboard event. Else if user start a tool, dismiss it with ESC, then press ESC again to exit edit mode it won't be detected.
2024-06-13 14:44:30 -05:00
PaddleStroke
74f12ec340 Sketcher: polygone DSH, typo fix 2024-06-12 10:57:43 +02:00
bgbsww
42eb4fdda6 Guard all uses of basic_random_generator for thread safety 2024-06-10 11:10:57 -05:00
PaddleStroke
7e9496ecae Sketcher: Fix default value of dimConstrDeactivatedColor 2024-06-10 11:09:36 -05:00
mosfet80
e31aa5e5e3 [mod] clean (#14378)
* [mod] clean

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-06-10 11:07:14 -05:00
Emmanuel Obrien
a89fdb86f4 Speedup sketcher item selection
Selecting lots of elements in the sketcher slows down quadratically because we were redrawing the entire element list widget for each element.
2024-06-10 10:35:32 -05:00
Kacper Donat
bcb4ee21cc Gui: Update sketcher colors after file load
This commit introduces AutoColor property for sketches that when
enabled ensures that sketches are updated with the color of user
preference. It ensures that sketches from different users will be
still visible on different themes.

To ensure backward compatiblity migration strategy is to compute default
value for this property based on the color. If it is non-white (the
default value in FreeCAD) we assume that the change was inentional and
that it should be kept as-is turning automatic coloring off. In other
cases it is enabled by default.

Fixes: FreeCAD#13980
2024-06-03 11:15:36 -05:00
Chris Hennes
6404de9c21 Update translations 2024-06-03 11:04:42 -05:00
Chris Hennes
6759c72eb6 Merge pull request #14337 from wwmayer/refactor_sketch_analysis
Sketch: Refactor SketchAnalysis
2024-06-03 10:49:30 -05:00
howie-j
d22326cf52 Fixes #12384 2024-06-03 10:43:18 -05:00
Max Wilfinger
1e38cf60b5 Added preference for disabling shaded override draw style when entering sketch edit mode.
Storing previous override draw style and applying it when leaving the sketch.
2024-05-30 21:07:30 +02:00
Max Wilfinger
b53e2af837 Changes override draw style when entering sketch edit mode. 2024-05-30 11:17:35 +02:00
wmayer
560cab6f31 clang/gcc: Add build option FREECAD_WARN_ERROR to force to make warnings into errors 2024-05-29 13:37:07 +02:00
wmayer
2b108b1bb3 Sketch: Refactor SketchAnalysis
Refactor detectMissingPointOnPointConstraints()
2024-05-28 15:28:53 +02:00
wmayer
60574c6507 Sketch: Refactor SketchAnalysis
Refactor detectMissingEqualityConstraints()
2024-05-28 15:10:51 +02:00
wmayer
4b8ef4721a Sketch: Refactor SketchAnalysis
Fix linter warnings
2024-05-28 14:43:46 +02:00
wmayer
645c7acf65 Sketch: Refactor SketchAnalysis
Refactor autoconstraint()
2024-05-28 14:28:07 +02:00
wmayer
ad56548739 Sketch: Refactor SketchAnalysis
Refactor makeMissingEquality()
2024-05-28 14:19:58 +02:00
wmayer
b052470b93 Sketch: Refactor SketchAnalysis
Refactor makeMissingVerticalHorizontal
2024-05-28 14:08:44 +02:00
wmayer
7f00aad6aa Sketch: Refactor SketchAnalysis
Refactor makeMissingPointOnPoint
2024-05-28 13:40:38 +02:00