- Add hints entry for Sketcher_ConstrainRadiam in hints array
- ConstrainRadiam now shows 'pick circle or arc' hint like other radius/diameter tools
- Fixes part of issue #22282 - missing radius constraint hints
"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
* Allow arc segment length and angle constraints to go past the center point
* fix angle helper lines
* fix linter warning
* fix arc length calculation
---------
Co-authored-by: Matthias Danner <28687794+matthiasdanner@users.noreply.github.com>
* Sketcher: Dimension: Offset the label when moving mouse
* Sketcher: Create dedicated enum for offset boolean
This improves readability because the intent must be stated explicitly.
---------
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
* Sketcher: Extend InputHints infrastructure to constraint tools
- Implement DrawSketchHandler::getToolHints() for constraint workflows
- Add centralized hint table mapping constraint commands to step-specific InputHints
- Integrate hint lookup in DrawSketchHandlerGenConstraint and dimension handler
- Provide step-by-step user guidance for:
- Coincident, PointOnObject, Distance (X/Y)
- Horizontal, Vertical, HorVer, Lock, Block
- Equal, Symmetric, Radius, Diameter, Angle
- Tangent, Perpendicular, Parallel
This continues the InputHints work started for drawing tools by enabling consistent, contextual guidance for constraint creation, including multi-step workflows like tangent-via-point.
* Call updateHint() after selection reset to re-arm the first-step prompt
when the tool stays active after apply.
* Add comments to hints table structure
* Sketcher: Update constraint hint text to use "pick" instead of "Select"
Change constraint hint text from "Select" to "pick" to maintain consistency
with existing FreeCAD UI style. This affects the DrawSketchHandlerGenConstraint
hint system for various constraint operations including coincident, distance,
horizontal/vertical, block, lock, symmetry, tangent, perpendicular, parallel,
and distance constraints.
The hints now follow the pattern:
- "%1 pick first point or edge"
- "%1 pick second point or edge"
- "%1 pick line or two points"
etc.
This provides consistent terminology throughout the sketcher constraint
creation workflow.
* - Remove redundant 'first' from initial selection hints
- Improve consistency in hint text formatting per Developer Guidelines
- Add consistent spacing in comment sections"
* Per PR feedback for DrawSketchHandlerDimension hints:
* Change 'Click to' to "pick"
* Simplify hint wording
* Combine redundant else
* Use direct return pattern instead of building hints list
* Update lookupConstraintHints() to use C++20 std:ranges::find_if form per PR review feedback
* Sketcher: Refine constraint hints per PR feedback
- Use consistent 'point or edge' phrasing in Distance and DistanceX/Y tools
- Reword Horizontal/Vertical step 0 to avoid misleading 'two points'
- Generalize Tangent and Perpendicular hints to 'edge' with optional point
- Simplify legacy Distance to 'point or edge'
* Add dynamic hint handling for PointOnObject constraint
- Implemented contextual hints in getToolHints() to generate an appropriate step 2 hint based on step 1 selection type
- Preserved static lookupConstraintHints() for all other tools
* Sketcher: Convert constraint hint table to C++20 designated initializer syntax
- Refactored static constraint hint table to follow Sketcher hint development guidelines
- Uses C++20 designated initializers for clarity and maintainability
- No changes to hint logic or behavior; content is identical to previous version
This adds isNullOrEmpty string helper that cheks if string is... well
null or empty. It is done to improve readability of the code and better
express intent.
This commit is generated using regex based find and replace:
```
s/[\w:]+_cast\s*<([^>]+)\*>\s*\(\s*getObject\(\s*\)\)/getObject<$1>/
s/[\w:]+_cast\s*<([^>]+)\*>\s*\(\s*([^)]*)\s*->\s*getObject\(\s*\)\)/$2->getObject<$1>()/
```
To regenerate if needed.
* 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.
The edit datum dialog is opened by double-clicking on a dimensional constraint in a sketch. However, the double-clicking event doesn't work realiably on
some systems. As a workaround this PR adds the command to the context-menu.
For more details see the forum thread: https://forum.freecad.org/viewtopic.php?t=71137