Generalize the `extractFaceOffset` method to `getOffsetArea`, which can
handle both face offsetting and projection. Another difference is that
the new method exposes Area's ability to preserve internal holes,
defaulting to preserving. The method is moved to the PathUtils module,
reflecting its generality and fairly wide used across Path.
This method is then used to provide a drop-in alternative to
`FindUnifiedRegions` via a small wrapper in PathSurfaceSupport. The Area
implementation is generally quick, but can fail (throw) in some cases,
so the wrapper is trying the Area method as an optimization first, and
falls back to the full `FindUnifiedRegions` logic if that fails.
- Arc and circular slots available using single edge selection.
- `ExtendRadius` property to allow for tool compensation.
- Extend path start and end is available. Value is measured along the arc, not linear.
- Includes collision check for arc and circular slots.
- Add `CutPattern` feature, defaulting to `ZigZag`.
- Change inter-pass retractions to SafeHeight for multi-pass operations.
- Fix division by zero instance for particular Perpendicular use case.
- Synchronize property values with inputs in both the Property View and Tasks Editor windows.
- Change `LayerMode` default value to `Multi-pass`.
- Improve debug messaging.
- Consolidate code and remove unused code.
Path: fix exception thrown
New slotting operation:
- Accepts selection of up to two features.
- Selectable features include: faces, edges, and vertices.
- User may select a single face or edge, or a pair of features.
- The path may be extended at the start and end.
- The path may be reversed.
- The path may be altered to the perpendicular in some cases.
- A unique Slot icon is included.
- Includes simple collision detection with warning message.
Two new properties, `ExpandProfile` (length) and `ExpandProfileStepOver` (percent) added for new feature.
New feature converts the normal single offset profile into a compound profile containing multiple increasing/decreasing offsets.
The new feature clears a each layer completely before stepping down to the next layer.
Adjust sorting procedure in PathAreaOp due to `ExpandProfile` modifications to open edges code.
Implement an iterative version of the Ramer-Douglas-Peucker line
simplification algorithm
(https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm),
which reduces line complexity to a limited linear deviation from the
original polyline. The ability to reason about linear deflection is the
key improvement over the previous linear implementation.
Worst case complexity is O(n^2), but expected complexity for typical
cases is O(n log n). A potentially faster alternative would be to call
out to libclipper, treating the line as a closed polygon. However, in
practice, performance of this implementation seems good enough. A
complex 3d surface operation optimizes in a few seconds, and reduces
output gcode size from about 220MB with the previous implementation to
10MB.
The new `ShapeName` is the name of the FreeCAD shape file containing the 3D body of the cutter.
We might want to change the source of the `ShapeName` to the name of the first Body object in the shape file, rather than the name of the file itself.
The Path Simulator was designed to handle canned cycle drilling operations, G81, G82, and G83, but it expects the industry standard continuous uninterrupted set of G8x commands until the operation is completed. A recent change to the Path Drilling operation adds commands that cancel each G8x command immediately after that command is used. This confuses the Path Simulation function and leads to visual artifacts when the simulation is performed.
G-code standards say that canned cycle cancellation can be accomplished by a specific G80 command or by any motion command in the set G0, G1, G2, or G3. This PR modifies PathSimulationGui.py to add recognition for canned cycle cancellation and resets the simulator to treat the next G8x command as the first element of a new series of canned cycles operations rather than a continuation of the previous series.
Reduce cumulative error by holding onto the original point in a sequence
of linear optimizations. In testing, this fixes artifacts I have seen on
very finely sampled paths with very gradual curvature.
Further improvements are needed for this optimization, but at least this
change avoids a regression over the status quo.
Slightly clean up the code by separating linear segment optimization
from gcode generation. While the current optimization is not very
effective once there is any kind of meshing noise, having a single
method performing the optimization will make it easier to tweak
tolerances or strategies.
Extend the work from #3496 to allow the safe optimization of more
complex step transitions.
- Use the actual safePDC path for short step transitions and breaks,
currently up to 2 cutter diameters. This value is chosen to cover
basically all typical end step-overs, including those with heavy skew.
Extending this much further (up to the break even point for a retract &
rapid) will need some careful thinking for multi pass paths.
- Coordinate offset tolerances with per-operation tessellation
tolerances, to avoid tessellation artifacts messing up paths by
causing false retracts. Such retracts can cause entire steps near
vertical areas to be falsely skipped, which would cause a major
deviation from the target model. By considering per-job tolerances, we
allow users to safely save computational resources by computing roughing
operations with lower precision, or selectively increase precision for
finish passes.
- Refine the default tessellation tolerance to GeometryTolerance / 4.
This makes sure that the job GeometryTolerance is respected by
operation defaults.