Commit Graph

3019 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
5829c3a058 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-02-28 12:58:07 +01:00
Roy-043
dcc41bf80c Sketcher: improve GUI texts for arcs and conics
The descriptions were sometimes not accurate (major/minor radius for ellipses). I have also tried to improve the constistency a little.

Forum topic:
https://forum.freecad.org/viewtopic.php?t=85396
2024-02-28 12:58:07 +01:00
pre-commit-ci[bot]
8f1b8b1f1f [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-02-28 12:55:40 +01:00
Roy-043
5cc566bb98 Sketcher: improve GUI texts for rectangles
The texts for the modes were changed to match those of the line tool.
2024-02-28 12:55:40 +01:00
pre-commit-ci[bot]
6a3c689d40 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-02-28 12:54:11 +01:00
Roy-043
86726f21b7 Sketcher: Change Sketcher_CreatePointFillet button text to match menu text
The menu text is "Create corner-preserving fillet" it makes sense to use a similar text for the button and not "Constraint-preserving sketch fillet".
2024-02-28 12:54:11 +01:00
PaddleStroke
dfa1b94c83 Sketcher: Line DSH: Harmonize width/length behavior with rectangle. 2024-02-27 21:46:41 -06:00
Ed Williams
f88f48f64f Change the calculation of the b parameter of the hyperbolic arc (#12467)
* Change the calculation of the b parameter of the hyperbolic arc
so that it does not give 0/0 when cos(phi) = 0

This gave problems if the first two points defined in the sketcher had
the same x-coordinate.
2024-02-27 14:38:05 -06:00
wmayer
51a01b9e2b Fix compiler warnings:
fix [-Winconsistent-missing-override]
fix [-Wunused-lambda-capture]
fix [-Wunused-variable]
fix [-Wswitch]
2024-02-26 11:01:37 -06:00
Chris Hennes
7f8d6e2bb1 Update translations (#12557)
* Update 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-02-24 21:38:37 -06:00
wmayer
a38e73135e Sketcher: fixes #12343: Undo/Redo for sketcher constraints doesn't work correctly 2024-02-25 00:59:35 +01:00
wmayer
53b512da1c MSVC: fix compiler warnings 2024-02-25 00:12:34 +01:00
wmayer
a2315503fa Sketcher: expose the LabelDistance and LabelPosition members of Constraint to Python 2024-02-25 00:10:56 +01:00
Max Wilfinger
3e47de6d92 fix typo in polygon task dialog 2024-02-19 15:51:25 -06:00
czinehuba
7a025e4e60 Updated space in dashed lines 2024-02-19 18:39:58 +01:00
Huba Czine
e20a07653c Update icons for Sketcher_ToggleConstruction & Sketcher_ToggleConstruction_Constr 2024-02-19 18:39:58 +01:00
Max Wilfinger
e135f68e8a add new Sketcher commands translate and scale to context menu 2024-02-12 21:50:07 +01:00
Chris Hennes
a1fcb66536 Merge pull request #11267 from Ondsel-Development/pw_translate
[Sketcher] Translate DSH : replacement for rectangular array / move / copy / clone
2024-02-12 13:24:08 -06:00
Yorik van Havre
638e398bec Crowdin translations (#12313)
* 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-02-12 11:59:08 -06:00
LemonBoy
aa977648c3 Fix icon order in constraint menu
Closes #12264
2024-02-12 11:50:41 -06:00
wmayer
df7e783513 Mod: fix several compiler warnings:
* fix -Wsometimes-uninitialized
* fix -Wunused-parameter
* fix -Wunused-variable
* fix -Winconsistent-missing-override
* fix -Wsign-compare
* fix -Wreorder-ctor
* fix -Wtautological-overlap-compare
2024-02-12 11:39:32 -06:00
PaddleStroke
ada76964c3 Sketcher: CommandConstraint.cpp : modernize for loops and use some auto 2024-02-12 11:14:22 -06:00
PaddleStroke
f06bcf3163 Sketcher: Parallel: Ignore selected points instead of throwing an error. 2024-02-12 11:14:22 -06:00
Max Wilfinger
4164919e58 Improvements to contextual right click menu in Sketcher.
Consider preselection, external geo and copy/cut/paste commands.
2024-02-12 11:04:06 -06:00
PaddleStroke
b7656abfc5 Sketcher: change DSH framework so that tab cycle through OVP and widget parameters. 2024-02-12 17:48:35 +01:00
PaddleStroke
b3e4bf1031 Sketcher: DSH: add two shortcuts for DSH to use. Fix a small syntax error in polygon/rotate. 2024-02-12 17:48:29 +01:00
Paddle
f8b57283e5 Remove Copy/clone/move and RectangularArray from the toolbar/menu. But does not remove the code of these. 2024-02-12 17:48:29 +01:00
Paddle
c4720e56c1 Translate DSH : A replacement for rectangular array. 2024-02-12 17:48:22 +01:00
Ajinkya Dahale
3f1f6387d1 [Sketcher] Handle spline selection in Dimension tool 2024-02-08 23:46:17 +05:30
Ajinkya Dahale
73434e008a [planegcs] Simplify GCS::BSpline::CalculateNormal() 2024-02-08 23:46:17 +05:30
Ajinkya Dahale
1e19926a77 [planegcs] Add SketcherExport macro to classes in Geo.h
...for use in tests.
2024-02-08 20:15:17 +05:30
Ajinkya Dahale
da48a72269 [planegcs] Implement BSpline::Value()
Needed for gtests currently.
2024-02-08 20:04:28 +05:30
Ajinkya Dahale
b1ef4be6fa [planegcs] Remove some numerical testing
If needed this can be moved to a gtest,
2024-02-08 20:04:28 +05:30
Ajinkya Dahale
65b4dd10ae [Sketcher] Expose general tangency with B-splines to Sketcher
The following commits were squashed into this

[Sketcher] Handle some corner cases in AngleViaPoint

[Sketcher] Avoid redundant constraints with B-splines...

When involving tangent, perpendicular and angle constraints.

[Sketcher] Add pre-commit changes

[Sketcher] Do not allow 2-selection tangent with B-spline

Also...

[Sketcher] Report error when using direct tangency with B-splines

[Sketcher] Fix malformed constraint when B-spline is selected second

To clarify, this means the second curve selected. The position of the point in
selection order does not matter in angle-via-point.

[Sketcher] Fix wrong number for B-Spline tangent on redundancy

[Sketcher] Remove existing point-on-object in some redundant cases

Particularly when point constrained on a B-spline is being used for
tangent, perpendicular or angle via point with the same B-spline.

[Sketcher] Fix direction issue with B-spline tangents.

Without these changes the solver might try to "twist" the B-spline to make the
angle between curves be 0 instead of PI (which may be closer to the initial shape).
2024-02-08 20:04:28 +05:30
Ajinkya Dahale
82f03593fd [planegcs] Implement calculateAngleViaParams
For use in angle-via-point with complex curves.
2024-02-08 20:04:27 +05:30
Ajinkya Dahale
5ba050b467 [Sketcher][planegcs] Implement parametric BSpline::CalculateNormal
As opposed to "punctual" that already exists for curves.
2024-02-08 20:04:27 +05:30
Ajinkya Dahale
6a3c0555d0 [Sketcher][planegcs] Support angle via point with params
These are intended to use when calculating normal simply with points could be
numerically expensive or otherwise nonviable.
2024-02-08 20:04:27 +05:30
Adrian Insaurralde Avalos
963652c6a7 Avoid sending unescaped quotes to python console 2024-02-04 16:44:25 -06:00
PaddleStroke
8afa940ca2 [Sketcher] Scale DSH : adds a tool to scale geometries. (#11265)
* Scale DSH : sketcher tool to scale geometries.
* Sketcher: Rotate and Scale : Move indexInVec to Utils.h as indexOfGeoId

---------

Co-authored-by: Paddle <PaddleStroke@users.noreply.github.com>
2024-02-01 09:08:58 +01:00
Chris Hennes
a54840c2c5 Sketcher: Add check for handler's existence 2024-02-01 09:08:16 +01:00
PaddleStroke
d7ee978e42 Sketcher: Fix sketcher_Copy bug when a single geometry was copied, geoId was not correct in constraints. 2024-01-30 17:26:42 +01:00
Roy-043
98712d228b Sketcher: minor fixes to 2 prefs ui files
* Titles in sentence case.
* No space before colon.
* Choose instead of chose.
* Vertex item first in "Colors outside Sketcher" as well.
2024-01-30 17:25:34 +01:00
Chris Hennes
5662c51ab4 Merge pull request #12054 from kadet1090/styling-elements-and-constraints-ui
Sketcher: Apply styling to elements and constraints UI
2024-01-23 08:40:48 -06:00
Max Wilfinger
0bef2e927b [Sketcher] enable BSpline commands in contextual right click menu 2024-01-22 12:21:01 -06:00
Chris Hennes
5f743aa36b Merge pull request #12012 from Ondsel-Development/radius_render_fix
[Sketcher] Improve rendering of arc-angle, line-angle, arc-distances and fix radius
2024-01-22 11:21:53 -06:00
Paddle
b140feabaf Sketcher: Edges pattern and width by type. 2024-01-22 11:12:42 -06:00
Chris Hennes
6dfbdfc09e Merge pull request #11537 from Ondsel-Development/copy_paste_2023
[Sketcher] Add copy/cut/paste sketcher commands
2024-01-22 10:45:22 -06:00
Kacper Donat
34b6b36547 Sketcher: Disable visibility checkbox for external geometry 2024-01-21 20:33:49 +01:00
Kacper Donat
2fac012226 Sketcher: Fix checkbox behavior for Element checkboxes
This creates new method overload for changing layer of exact
ElementItem. This fixes strange behavior of the checkboxes for elements
that were dependent not on what user clicked but on what is selected.

Fixes: #8814
2024-01-21 20:33:37 +01:00
Kacper Donat
da6a4fe57b Sketcher: Make Elements UI style aware
This commit like previous one introduces ability to style list of
elements in the sketcher. It also completely refactors the rendering
delegate introducing dedicated method for calculating rects of each
element and method for rendering each sub control. Thanks to this
refactor we can be sure that areas drawn are the same as areas checked
for events in editorEvent.
2024-01-21 20:33:34 +01:00