* Sketcher: Fix is active.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Sketcher: Delint and compiler warning cleanup
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@gmail.com>
* Sketcher: Scale: Reorder operations and delete original modified constraints to ensure validity
* Sketcher: replace boolean parameters for deletion with enum and expose solver override on some deletion functions in the python API
* Use correct flag in ::delGeometry
* Set default value of false to noSolve
* Sketcher: autoscale: use deleteAllGeometry
* Sketcher: Scale: revert to checking constraints for geoId validity and handle horizontal&vertical
* Sketcher.Split: Avoid early solve that can break sketch
* Avoid reintroducing a typo
* [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>
"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
* Make prevCursorPosition protected so tools can use it
* DrawSketchHandlerCircle : Position constraint on prevCursorPosition
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* [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>
* Sketcher: improve Make Internals property tooltip
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Sketcher: reword final MakeInternals tooltip
* Sketcher: apply final code review suggestion
Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
* Sketcher: titles of parameter sections to Title Case
* Update src/Mod/Sketcher/Gui/DrawSketchHandlerBSpline.h
Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Sketcher: Change "By control points" and "By knots" texts
Elsewhere in the Sketcher GUI texts, "By" has been replaced by "From". For example "Arc From Center". It makes sense to also do that for the B-spline modes "By control points" and "By knots".
* [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>
* Sketcher: QMessageBox titles to Title Case
* Sketcher: QMessageBox titles to Title Case
* Sketcher: QMessageBox titles to Title Case
* Update Command.cpp
* [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>
* Sketcher: Coin resize when screen change. Fix#23267
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update ViewProviderSketch.cpp
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Fix B-spline keyboard focus issue (#23859)
- Restore keyboard focus after command restart in changeConstructionMethode()
- Fixes M key mode switching and R toggle periodic functionality
- Uses direct MDI view focus restoration instead of private ensureFocus() method
Fixes issue where keyboard shortcuts stop working after first mode switch.
* Address Copilot feedback: Add null check for activeDocument()
- Use ternary operator for cleaner null safety
- Prevents potential crash if activeDocument() returns null
- More idiomatic C++ code style
* Improve variable scope per @chennes feedback
- Use if-with-initialization to scope doc and mdi variables
- Variables now only exist where needed instead of leaking into function scope
- More idiomatic C++ code style
* Sketcher: Bspline tool: prevent double click failure
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update DrawSketchHandlerBSpline.h
* [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>
* Sketcher: Fix Freeze in Offset with too large negative value
* Remove ErrorMessages when offsetting circles with too large negative value
* fix linting comment
* Add Error feedback
---------
Co-authored-by: Matthias Danner <28687794+matthiasdanner@users.noreply.github.com>
only 4 of these warnings are still relevant, CMake shall be used to disable them
Compiler definitions:
NOMINMAX:
* is already globally defined in SetGlobalCompilerAndLinkerSettings.cmake
WIN32_LEAN_AND_MEAN:
* use CMake target_compile_options on relevant targets
Warnings that still occur:
C4251, C4273, C4275: all related to dllimport / export
* use CMake target_compile_options on relevant targets
C4661: no suitable definition provied for explicit template instantiation request
* triggered in Mesh because of Vector3D in Base - not all functions are defined in header
* use CMake target_compile_options on relevant targets
Warnings that are Currently not triggered (fix code if they appear again):
C4005: macro redefinition
C4244: argument conversion, possible loss of data
C4267: conversion from size_t to type, possible loss of data
C4305: truncation from type1 to type2
* only occurrence disabled in Reader.cpp
C4522: multiple assignment operator specified
C5208: unnamed class in typedef name
Obsolete Compiler warnings:
C4181: not mentioned in Microsoft docs anymore
C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
* throw(optional_type_list) deprecated in C++17
C4482: nonstandard extension used: enum 'enumeration' used in qualified name
* not generated for compilers that support C++11
C4503: 'identifier': decorated name length exceeded, name was truncated
* obsolete since Visual Studio 2017
C4786: not mentioned in Microsoft docs anymore
- Add missing U (rounded corners) and J (frame) hints to ThreePoints method
- Add missing U (rounded corners) and J (frame) hints to CenterAnd3Points method
- Now all four construction methods show consistent keyboard shortcut hints
- Addresses Copilot feedback on PR
- M key for switching between Fillet and Chamfer modes
- U key for toggling preserve corner option
- Hints are shown in all states (SeekFirst, SeekSecond, End)
- Addresses issue #23815 for missing keyboard shortcuts in hints
- Control Points mode: U/J for degree control (+ degree, - degree)
- Knots mode: R for periodic toggle
- Hints are now context-aware based on construction method
- Addresses issue #23815 for missing keyboard shortcuts in hints
- Add switchModeHint constant with M key
- Include mode shortcut in all arc slot states (SeekFirst through SeekFourth)
- Addresses issue #23815 for missing keyboard shortcuts in hints
- Add roundedCornersHint and frameHint constants
- Include U and J shortcuts in all rectangle construction method states
- Addresses issue #23815 for missing keyboard shortcuts in hints
* Sketcher: Update DrawSketchHandlerSymmetry.h
* [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>
* Sketcher: Constraint symbol size follow-up
* Update SketcherSettings.cpp
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update SketcherSettingsDisplay.ui
* Update EditModeCoinManager.cpp
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* remove enabled property
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Sketcher: Scale: Reorder operations and delete original modified constraints to ensure validity
* Sketcher: replace boolean parameters for deletion with enum and expose solver override on some deletion functions in the python API
* Use correct flag in ::delGeometry
* Set default value of false to noSolve
* Sketcher: autoscale: use deleteAllGeometry
* Sketcher: Scale: revert to checking constraints for geoId validity and handle horizontal&vertical
User defined precision and fractional inch are stored on QuantityFormat
construction making changes persistent to object life time.
Change that so until not explicitely overriden, user defined values
are always returned.
Co-authored-by: Matthias Danner <28687794+matthiasdanner@users.noreply.github.com>
* Sketcher: Initial wiring up of independent contraint symbol size.
* Sketcher: Align constraint symbol size controls with other preferences
- Refactored the Sketcher preferences UI to place the "Constraint symbol size" checkbox and spinbox in separate grid columns, matching the layout of other settings.
- Ensured the spinbox aligns visually with other value fields for a more consistent and professional appearance.
- Preserved the enable/disable behavior of the spinbox based on the checkbox state.
* Update constraint size label
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* style: simplify constraint icon size logic and remove stray blank line
* Sketcher: optional constraint symbol size defaults to font size preference (per PR comment)
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
As the title says - we can get into a scenario where user can specify
constraint equal to 0.0, or similar small value and the scale factor
will become 0 as well, resulting in all geometry trying to be rescaled
to degenerate geometry.
So this patch filters those values out, and bails out from auto-scaling
leaving only solver to handle this value.