Arc segments with extremely large radius compared to chord length can
cause floating-point precision issues in simulation. This change
introduces ARC_LINEARIZATION_THRESHOLD to treat such arcs as linear,
improving numerical stability in the simulator.
The following g-code was causing erractic behavior in the simulator due
to large-radius arcs:
```
G2 I88775.835760 J-1936991.545892 K0.000000 X102.063107 Y100.102815 Z12.700001
```
src/Mod/CAM/PathSimulator/AppGL/MillPathSegment.cpp:
- Added ARC_LINEARIZATION_THRESHOLD constant
- Updated arc motion detection to treat large-radius arcs as linear
- Improved handling of arc vs. linear segment classification
* Add None check before constraining new_point
* [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>
* Gui: Add common types to Add Property dialog
Add a preselection of commonly used types in the Add Property dialog.
The dialog supports now all properties that have an editor. This
doesn't necessarily mean that the editor is shown in the Add Property
dialog; some properties should not show their editor in the Add Property
dialog, such as vector and placement.
* Gui: Make Add Property dialog Qt 6 compatible
This change stops using a Qt 6.10 feature and makes it compatible with
all of Qt 6.
* Update src/Gui/Dialogs/DlgAddProperty.cpp
---------
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
* added a copy button which copies all the errors and traceback to clipboard
* removed unused variable
* removed space at end of Copy string
* copied text notification in status bar
* removed unwanted header
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Test: Address review comments
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
This is followup for https://github.com/FreeCAD/FreeCAD/pull/26563 which
fixed previews for a given file but broke it for others.
This approach should be more robust as it is applied in the Feature
itself and not on view provider level which should give us more precise
control and per feature transform ability.
This commit introduces PreviewUpdateScheduler class that is responsible
to schedule the true recompute of the preview. View Providers (or other
components) can use this service to ask for the preview recompute to
happend at a time that is convinent for a program and that won't impact
performance.
The provided implementation uses Queued Connections in Qt to calculate
preview essentially on next run of the event loop. It allows business
logic in FreeCAD (like property propagation) to execute fully and then
recompute preview once. This greately reduces number of recompute calls
for previews.
- The initial commit to block shortcuts in text edit fields
(particularly for MacOS, where those shortcuts would activate FreeCAD
functionality rather than text edit functionality) made a wrong
assumption.
- It assumed that there were no text edit fields where we would want to
actually use application shortcuts. In retrospect, this was very
wrong, and I completely missed the macro editor.
- For now, it should be fine to change the field to only cover
'LineEdit'. I cannot imagine a case where you'd want to (e.g.) save
text/document from a LineEdit, but if anyone knows of one then please
let me know.
- This does mean there are some quirks. For example in the materials
editor, the description is a TextEdit field. Some text editing
shortcuts won't work in here now (similar to how they didn't before
the original commit that I made).
- I've since learned that freecad also has a text editor functionality,
I've tested that now Cmd+S works for save as it should.
Major refactor of the Machine Editor to use QTabWidget for section
navigation. Added tabbed spindle management with add/remove
functionality, split machine configuration into Output Options, G-Code
Blocks, and Processing Options tabs. Updated preferences UI to use tabs
instead of QToolBox.
src/Mod/CAM/Gui/Resources/preferences/PathJob.ui:
- Replace QToolBox with QTabWidget for preferences tabs
src/Mod/CAM/Path/Dressup/Gui/Preferences.py:
- Use QWidget with vertical layout instead of QToolBox for dressup
preferences
src/Mod/CAM/Path/Machine/ui/editor/machine_editor.py:
- Refactor to use QTabWidget for editor sections
- Implement tabbed spindle management with add/remove
- Split configuration into Output Options, G-Code Blocks, and Processing
Options tabs
- Update post processor selection logic
src/Mod/CAM/Path/Main/Gui/PreferencesJob.py:
- Update to use tabWidget instead of toolBox
src/Mod/CAM/Path/Tool/assets/ui/preferences.py:
- Use QWidget and direct layout instead of QToolBox for asset
preferences
This recompute seemed unnecessary, and caused slowdowns when opening the file and recomputing. This decreases the time necessary to both open and recompute files that use boolean operations, and should not change anything regarding preview computation when the dialog is open.
* Adding retract annotation to drilling commands
checkpoint
* [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>
* CAM: Dropped trailing percent from fanuc post processor output.
A trailing percent cause one Fanuc controller to hang when the program
is completed when drip feeding G code, and the minicom ascii upload
was unable to complete the upload.
Had to use emergecy stop to get the machine out of the hang.
* CAM: Adjust Fanuc post processor test to no longer expect trailing percent.
* Patch for DXF without CODE30 (Z for POINT)
Time to time I use DXF file from measurement microscope without Z for POINT.
This patch help me for download this files without errors.
* [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>
Removed explicit colons from all form labels.
Fixed lint warnings and replaced wildcard imports with explicit
imports for clarity and maintainability.
src/Mod/CAM/Path/Machine/ui/editor/machine_editor.py:
- Removed ':' from all form labels
- Fixed lint warnings (missing docstrings, empty except, etc.)
- Replaced wildcard imports with explicit imports
src/Mod/CAM/Path/Machine/models/__init__.py:
- Updated __all__ and imports for explicit API
src/Mod/CAM/Path/Tool/assets/ui/preferences.py:
- Updated imports to use package-level import
src/Mod/CAM/Path/Machine/models/machine.py:
- Added explanatory comments to empty except blocks
- Fixed duplicate variable assignment
- Added missing class docstrings
src/Mod/CAM/CAMTests/TestMachine.py:
- Fixed unused variable warning by using returned filepath
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>