Commit Graph

160 Commits

Author SHA1 Message Date
PaddleStroke
2c1accaa59 Sketcher: Prevent non-edit toolbars from showing up when switching tab (#24202)
* Sketcher: Prevent non-edit toolbars from showing up when switching tab

* [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>
2025-09-30 11:36:27 -05:00
Markus Reitböck
45c02f7978 Sketcher: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
 should be considered an optimization, not a requirement. In particular, do not explicitly include a
 precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
 generated precompile header on the compiler command line instead. This is more portable across
 the major compilers and is likely to be easier to maintain. It will also avoid warnings being
 generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-23 00:51:00 +02:00
Max Wilfinger
e6d74e6316 Sketcher: Update missed UI strings (#22363) 2025-07-07 10:16:07 +02:00
Max Wilfinger
36659f0176 Sketcher: Update UI strings for consistency (#22167)
* Sketcher: Update UI strings for consistency

* Update src/Mod/Sketcher/App/Sketch.cpp

Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>

* Update src/Mod/Sketcher/Gui/Command.cpp

Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>

* Update src/Mod/Sketcher/App/SketchObject.cpp

Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>

* Update src/Mod/Sketcher/Gui/Command.cpp

Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>

* Update src/Mod/Sketcher/Gui/Command.cpp

Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>

* Update src/Mod/Sketcher/Gui/Command.cpp

Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>

* Apply suggestions from code review

* Apply suggestions from code review

---------

Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>
2025-06-30 22:51:46 +00:00
pre-commit-ci[bot]
f8f4ab61ef [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-03-13 11:12:48 +00:00
PaddleStroke
41bcf79d6b Sketcher: Add parameter to combine line and polyline 2025-03-13 12:08:56 +01:00
Benjamin Bræstrup Sayoc
aa43ce8cc0 Sketcher: Use QStringLiteral 2025-02-10 18:32:45 +01:00
PaddleStroke
4a15ca643b Sketcher: Rename External to Projection 2024-11-29 11:36:55 -05:00
PaddleStroke
8c6b437314 Sketcher: Intersection externals 2024-11-29 11:36:55 -05:00
Max Wilfinger
03cab3d1fc Revert UI command change in Sketcher and PartDesign 2024-05-27 11:51:02 -05:00
Max Wilfinger
06174f4693 Sketcher / UI: Update Sketcher Toolbars (#13763)
* Update Sketcher toolbar UIs.
Group all create tools for arcs, conics.
Group toggle driving/active constraints.
Update arrangement of icons.

* Change default to unified coincidence tool.
2024-05-06 18:05:56 +02:00
PaddleStroke
bad1a5c689 Sketcher: Reorganize toolbars 2024-04-22 18:33:49 +02:00
PaddleStroke
f4aa66ce44 Sketcher: Joint Line and Polyline in a command group. 2024-04-22 11:14:45 -05:00
Max Wilfinger
7c9546fdb1 Update Sketcher context menu.
Refine poposed constraints on point selection.
Add symmetry constraint to context menu.
Rearrange commands to be consistent with the toolbar.
2024-04-08 17:58:28 +02:00
PaddleStroke
58975135f4 Sketcher: Chamfer tool (and fillet refactor) 2024-03-18 13:23:54 -04:00
Roy-043
ad667811a5 Sketcher: correct position of ConstrainLock and ConstrainRadiam in GUI
Sketcher_ConstrainLock after Sketcher_ConstrainAngle.
Sketcher_ConstrainRadiam before Sketcher_ConstrainRadius.

This was not always correct.

See also #12667.
2024-03-11 12:28:28 -05:00
Chris Hennes
2b667131ef Sketcher: Fix missing translation of 'Sketcher visual' 2024-03-05 08:35:26 -06:00
Roy-043
94120db2a9 Sketcher: Sketcher_ConstrainHorizontal before Sketcher_ConstrainVertical in GUI
Changes to TaskSketcherElements.cpp are not required, but were done for consistency. The order in the file follows the GUI.
2024-03-04 11:12:38 -06:00
Paddle
010d6573d8 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
6293a2b357 Translate DSH : A replacement for rectangular array. 2024-02-12 17:48:22 +01:00
PaddleStroke
a2c1596a03 [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
Paddle
88883faaf8 Sketcher: Add copy/cut/paste sketcher commands 2024-01-19 11:13:53 +01:00
Max Wilfinger
96d3e26110 sketcher: create contextual right click menu 2024-01-08 12:39:17 -05:00
Paddle
a5a77fc0fd Rotate DSH : Polar pattern tool for sketcher. 2023-12-20 06:59:47 +01:00
Chris Hennes
bd9a210b65 Merge pull request #11494 from Ondsel-Development/Coincident
[Sketcher] Introduce an optional unified version of coincident and pointOnObject
2023-12-04 10:46:21 -06:00
Paddle
bc4605aa6a Add a setting to disable auto horizontal/vertical. 2023-11-28 09:45:35 +01:00
Paddle
d94fdf795e Introduce CmdSketcherConstrainCoincidentUnified. This is a unified version of coincident + pointOnObject.
This is disabled by default. Nothing changes by default.
2023-11-27 21:14:33 +01:00
Paddle
ad3e832576 Sketcher : remove deleteAllConstraints from toolbar. 2023-11-27 11:00:50 -06:00
PaddleStroke
cce89e4fec [Sketcher] Auto horizontal/vertical (#11330)
* Refactor sketcher horizontal / vertical constraints and adds a horizontal/vertical command.

* Sketcher : HorVer : change tool icon.

---------

Co-authored-by: Paddle <PaddleStroke@users.noreply.github.com>
2023-11-20 11:00:22 -06:00
Paddle
bd7a468a39 Group Trim/extend/split. 2023-11-20 10:58:17 -06:00
Paddle
6b89039661 ArcSlot DSH : implement the Arc slot tool with tool parameters support. 2023-11-13 15:05:36 +01:00
Paddle
513e1a46c8 Sketcher: Offset DSH 2023-11-03 14:02:25 +01:00
pre-commit-ci[bot]
d793d1c177 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-09-12 21:19:33 +02:00
pre-commit-ci[bot]
e92ed45df9 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-09-12 13:02:35 -04:00
Chris Hennes
fcedce3c42 Sketcher: Reformat to current clang-format standard 2023-09-04 07:17:28 -05:00
Paddle
3fad071760 Sketcher_Dimension : Turn the command into a group-command to have at hand individual commands. 2023-09-01 07:57:44 -05:00
Chris Hennes
d0ee2702ec Merge pull request #9810 from Ondsel-Development/v2_constrain_contextually
Sketcher: Constrain Contextual implementation V2
2023-08-28 10:52:05 -05:00
Florian Foinant-Willig
3311d6d6e3 Sketcher: Fix Visual toolbox visibility 2023-08-28 10:46:48 -05:00
Paddle
eee2f14128 Change the name to 'Dimension' instead of 'Constrain Contextual' 2023-08-26 08:35:27 +02:00
Paddle
b10b9bf22d Sketcher: Constrain Contextual implementation. 2023-08-26 07:41:09 +02:00
Florian Foinant-Willig
06cd311acd Fix the fix o:-) 2023-08-14 22:31:36 +02:00
Florian Foinant-Willig
f120c7a317 Fix menu and ressource file 2023-08-14 22:12:18 +02:00
Florian Foinant-Willig
159f82af45 Sketcher: Add command to switch arc helper 2023-08-03 13:06:05 +02:00
Abdullah Tahiri
5718efbdeb MainWindow: Fix for Automatic WB and edit mode WBs
==================================================

As described here:
https://forum.freecad.org/viewtopic.php?p=687188#p687188
2023-07-01 19:56:52 +02:00
Adrián Insaurralde Avalos
3ff1c54f11 [Sketcher] Fix incorrect toolbar name uppercase 2023-06-07 16:48:57 -04:00
Chris Hennes
f18ead6f02 Sketcher: Add missing translations 2023-06-06 15:35:12 +02:00
Abdullah Tahiri
554ede35d2 Sketcher/Gui: Extend toolbar framework and fix toolbar visibility not preserved
=================================================================================

fixes #9208

Essentially:
- The regular mechanism to save toolbar state when changing from one WB to another
is not designed to support changes within one WB (e.g. from edit mode and back).
- At creation time, toolbars can be initialised with default visible or default hidden
state. Additionally, there is third configuration "Unavailable", which refers to a
toolbar that is hidden, and the control to enable it is also hidden by default.
- The ToolBarManager is extended to enable to set the State of one or more toolbars.
- The State refers to changes to be effected on one or more toolbars by client code:
* ForceHidden allows to hide a toolbar and also hide its control (a toolbar not available
in a mode).
* ForceAvailable allows to make a toolbar available by making its control visible, the
toolbar itself is visible or not depending on user settings.
* RestoreDefault allows to bring the control visibility to the default of the toolbar, the
toolbar itself is visible or not depending on user settings.
* SaveState allows to store the current visibility state of a toolbar. It enables client
code to save the state when appropriate. It provides the only option for default "Unavailable"
toolbars, which are fully managed by client code. It provides additional flexibility to save
other toolbar visibility on request.

For the Sketcher this means:
- That edit mode toolbars are not shown outside edit mode.
- That edit mode toolbars and non-edit mode toolbars can be configured independently.
- that edit mode toolbars' state is saved when leaving edit mode if and only if, the
workbench that is selected when leaving edit mode is the Sketcher WB.
- it won't save the state if the user manually selected another WB and then left edit
mode (why? see limitation above).

Limitation:
- When switching to another WB while in edit mode, the other WB is activated before the
current WB (sketcher WB) is deactivated. This means that at sketcher level, the sketcher
has no chance to save states or do other tidy up actions before the tools of the other WB
are activated.
- This, however, is understood as not relevant enough as to warrant changing the mechanisms
in place.
2023-05-30 16:37:53 +02:00
Abdullah Tahiri
78ae9c1d7d SketcherGui: apply clang-format 2023-05-25 17:08:03 +02:00
Abdullah Tahiri
87aec0d9ed Skecher: Rendering order
========================

Recently the rendering order functionality was temporarely removed, as it interferred with the development of visual layers.

However, the release comes before visual layers are finished and can provide such functionality.

This commit reintroduces the functionality for the release.
2023-05-17 16:29:34 +02:00
Abdullah Tahiri
b2c428f13f Sketcher: New edit tools toolbar
================================

Move Grid and Snap to edit tools
2023-05-17 16:29:34 +02:00