Before 0aed23c (PR #19582), external geometry projection used a different algorithm and produced slightly different geometry for some kinds of projections (B-splines in particular). This adds a backwards-compatibility path that allows old files to continue to use the old algorithm, while using the new and improved algorithm with new files.
Commit a346c266 (PR #21794) was a major refactoring of the extrusion code, and one consequence of it was that the 'TwoLengths' extrusion was deprecated and replaced. The code that replaced it generated the same final geometry, but in the opposite direction, changing the face order and breaking the element names. This commit adds a backwards-compatibility branch to the file loading code that flips the direction of the inputs, so the final output matches the original.
* PD: Hole Thread texture
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* refactor: vp-texture remove logging
* refactor: vp-hole cleanup unused declaration
* refactor: vp-hole remove logging
* refactor: vp-hole use convertTo
* refactor: vp-hole use freecad_cast
* refactor: make unwrapsurface private
* fix: logic error with model-thread handling
* fix: modelthreadchanged issues
threaddepth doesnt depend on modeled or not so remove it
* fix: model thread getting disabled when it shouldnt
* revert: use base-0 poly triangulation
previously had issues, but all is good now
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Gui: fix quantity spinbox size not adapting to number of decimals
* Gui: fix quantity spinbox units getting cut (force max chars)
* Gui: editableDatumLabel remove hardcoded values
* fixes
* Gui: sketcher ovp auto adjust size
* Gui: ovp fix cursor jumping behind the unit
* Gui: Refactor changes to QuantitySpinBox
The QuantitySpinBox uses d-pointer (pimpl) to store its private data -
this commit ensures that all state is stored here and exposed via
getters and setters + qproperties.
* Gui: sketcher ovp fix cursor jumping after the unit
* Gui: allow quantitySpinBox to set max digits allowed
Useful for adjustable width in the Sketcher OVP
---------
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
* Sketcher: Fix: Arc of Hyperbola
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added minor grater than major radius support
* Fixed merge errors
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Improved comments and added a confused points check for S1 and S2 distance.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added compile check for occ version and check before getting minor radius.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Apply suggestions from code review
OCC version check
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
When Part2DObject (e.g., Sketch) is created, it calls setAttacher() to
set up AttachEnginePlane. This updated the internal AttacherType property
but left the user-visible AttacherEngine enum at its default "Engine 3D".
Now setAttacher() also updates AttacherEngine for non-base attachers,
keeping the visible property in sync with the actual engine type.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Core: Fix freecad when Windows username has non ASCII characters
* Update ApplicationDirectories.cpp
* Tests: Add tests of pathToString/stringToPath
Validates the fix for non-ASCII characters in filesystem paths (e.g.
Windows usernames with umlauts). Includes Windows-specific tests that
verify pathToString produces UTF-8 from wide-string paths and that
the naive fs::path::string() does not. On Linux these functions are
effectively a no-op, so the tests themselves are only really useful
on Windows.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Python interface to the setCamera() is using 's' format string, which
converts Unicode object to C string using 'utf-8' encoding. Reflect
that for QString conversion as well.
CAM: CircularHoleBase - Fix onDocumentRestored
Removed the expermental "Automatic TSP" sorting mode and ensured legacy
files are migrated to "Automatic". Start using C++ TSP sorting for
"Automatic" mode for better performance. Refactored natural sorting for
table columns, relocating the utility class for reuse and using a robust
sort key.
src/Mod/CAM/Path/Op/CircularHoleBase.py:
- Removed "Automatic TSP" from SortingMode options and logic
- Added migration logic for legacy "Automatic TSP" values
- Cleaned up redundant assignments
src/Mod/CAM/Path/Op/Gui/CircularHoleBase.py:
- Updated to use relocated NaturalSortTableWidgetItem for feature and
diameter columns
- Improved sorting behavior for mixed text/number columns
src/Mod/CAM/Path/Base/Gui/Util.py:
- Added NaturalSortTableWidgetItem using the existing natural_sort_key
for robust sorting
This update enhances the GUI with new sorting modes and manual reordering, and
adds migration logic to ensure robust property
src/Mod/CAM/Gui/Resources/panels/PageBaseHoleGeometryEdit.ui:
- Add Sorting mode combo box with "Automatic", "Automatic TSP", and "Manual" options
- Add UI improvements for hole sorting, selection, and filtering
src/Mod/CAM/Path/Op/CircularHoleBase.py:
- Add migration logic to ensure SortingMode property exists and is up to date
- Use sort_locations_tsp when SortingMode is "Automatic TSP"
src/Mod/CAM/Path/Op/Gui/CircularHoleBase.py:
- Add RowMoveTableWidget for manual row reordering in the GUI
- Update TaskPanelHoleGeometryPage to support new sorting modes and improved UI behavior
CAM: Add template dropdown below machine name in editor
Adds a template selection dropdown to the Machine Editor dialog,
positioned below the machine name field. Dropdown lists user and
built-in templates for new machines only. Adds MachineFactory
template discovery and ensures templates are copied to build directory.
src/Mod/CAM/CMakeLists.txt:
- Copy machine templates to build directory for runtime access
src/Mod/CAM/Machine/models/machine.py:
- Add MachineFactory.list_builtin_templates() for template discovery
- Use FreeCAD install path for built-in templates
src/Mod/CAM/Machine/ui/editor/machine_editor.py:
- Add template dropdown below name field for new machines
- Populate dropdown with user and built-in templates
- Update UI fields when template is selected
Major improvements to the GenericPlasma postprocessor with new dialog-based
mode selection and robust plasma cutting features.
New Features:
- Add pre_processing_dialog() for interactive mode selection
- Replace persistent mark_entry_only property with runtime dialog
- User-friendly choice between Normal Cutting and Mark Entry Points Only
- Enhanced torch control with pierce height movement
- Complete mark_entry_only implementation with proper marking sequence
- Improved error handling and state management
Technical Improvements:
- Add _reset_plasma_state() for clean per-operation tracking
- Fix Z direction detection with proper null checking
- Enhanced height extraction from StartDepth/FinalDepth/ClearanceHeight
- Better error handling with debug logging
- Graceful fallback when GUI not available
Bug Fixes:
- Fix torch control to move to pierce height before ignition
- Fix force_rapid_feeds to remove F parameters (revert from override)
- Fix state tracking initialization and null value handling
- Add proper state reset for each operationUses a dialog to set mark_only.
Co-authored-by: tarman3 <joice501790018@tutamail.com>