This PR introduces a machine object and a machine library, along with a
new machine editor dialog for creating and editing *.fcm machine asset
files. The editor is integrated into the CAM preferences panel, with new
Python modules for the dialog and minimal model validation. Machine
management (add, edit, delete) is now available in the CAM asset
preferences panel.
Key Features:
- Machines now have a type and units property. The machine type can be
used to distinguish between different classes of machines (e.g., mill,
lathe, laser).
- Machine units are stored internally and in the .fcm JSON file as
metric. Note: This differs from how toolbits work (which store units in
their native units)
- Support for 2-5 axis machines.
- Support for multiple spindles (up to 9)
- Processor defaults
- JSON Text Editor with basic validation and line numbers.
* Part: Fix orientation of internal shells of a solid
If a solid consists of multiple shells then it can happen that the
internal shells have incorrect orientation that leads to a broken solid.
This fixes issue https://github.com/FreeCAD/FreeCAD/issues/24994
* Part: Add method Feature::fixSolids
This method explicitly checks for solids with the error
'BRepCheck_EnclosedRegion' that means that internal shells of a solid
are wrong.
Using ShapeFix_Solid fixes the solid.
---------
Co-authored-by: wwmayer <wmayer@freecad.org>
* Gui: Handle exception in showValidExpression
If an exception is raised inside showValidExpression() because the
expression cannot be evaluated then handle the exception and show it as
invalid expression.
This fixes issue: https://github.com/FreeCAD/FreeCAD/issues/26501
---------
Co-authored-by: wwmayer <wmayer@freecad.org>
Currently, the selection batching optimization introduced in #26663
stores ElementItem/ConstraintItem pointers in a buffer to be processed
on the next event loop cycle via `QTimer::singleShot`.
When a constraint is applied,
`slotElementsChanged()/slotConstraintsChanged()`
rebuilds the list widget, destroying all items. However, the selection
buffer was not cleared, leaving dangling pointers. When
`processSelectionBuffer()`
executed, it attempted to call `QListWidget::row()` on deleted items,
causing a segmentation fault.
So, this patch fixes it by clearing `selectionBuffer` when the list is
rebuilt, since the buffered pointers are invalidated anyway.
This reverts commit 527b2de560.
The `bakeInTransform()` call uses `transformGeometry()` which converts
planar faces to BSplineSurfaces. This prevents the refine algorithm
(BRepBuilderAPI_RefineModel) from detecting and merging coplanar faces,
breaking the Refine option for Boolean operations.
This matches Part WB's Boolean behavior which does not use
`bakeInTransform()` and has working refine functionality.
Fixes the following issue:
```
Warning:
/Users/runner/work/FreeCAD/FreeCAD/src/3rdParty/FastSignals/libfastsignals/include/fastsignals/connection.h:76:32:
warning: macro 'ATOMIC_VAR_INIT' has been marked as deprecated
[-Wdeprecated-pragma]
76 | std::atomic<bool> m_blocked = ATOMIC_VAR_INIT(false);
| ^
```
* Sketcher: Support Bezier and Offset curves as external geometry
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Sketcher: Fix adding projection of external arc of circle
In processEdge() it's checked if first and last point of the projected arc of circle are almost equal. If yes then a full circle
is assumed but this conclusion is not necessarily correct because it's still possible that the external arc of circle is very
short. The better criterion is to check the parameter range of the arc of circle.
See also: https://github.com/FreeCAD/FreeCAD/pull/25144#issuecomment-3502916685
---------
Co-authored-by: wwmayer <wmayer@freecad.org>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* PartDesign: Enable drag and drop of shapeBinders
* [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>
* Add diameter measurement support
* change author name and change icon
* correct svg size to 64x64
* Update src/Mod/Measure/App/MeasureDiameter.cpp
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
* somehow to icon color is undefine in inkscape, change to black
* Revert "somehow to icon color is undefine in inkscape, change to black"
This reverts commit 2277c1b9f4a7ab7519856986e2d6aec6e37ebf3e.
modified: src/Mod/Measure/Gui/Resources/icons/Measurement-Diameter.svg
* fix black color icon
---------
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
Add `SoDepthBuffer` nodes around the constraint group to disable depth
testing for constraint icons. This ensures icons render on top of
geometry lines regardless of Z position, improving visibility and
selectability.
Add Z offset for arrowheads and explicitly enable depth testing for
constraint lines in SoDatumLabel. This ensures constraint lines render
below geometry (respecting zConstr level) while text and arrowheads
render on top for better visibility and selection.