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.
The `Part::Vertex` object has both `Placement`, and `X`, `Y`, `Z`
properties. The net displacement is the sum of both of these two
properties.
Previously, the `PointArray` would only use the `Placement`
which would produce a seemingly erroneous result
because `X`, `Y`, and `Z` would be ignored.
Also perform several improvements such as PEP8 cleanup,
write complete docstring, type checking of the input arguments,
accepting a full placement to modify the position,
and deprecating the older call.
Update the Gui Command as well.
`PathObj` becomes `PathObject`, `Xlate` becomes `ExtraTranslation`,
and `PathSubs` becomes `PathSubelements`.
Update `make_path_array` function and the Gui Command.
Certain properties do not need to be shown in the property editor
when a particular `AlignMode` is chosen. This keeps the number
of properties displayed organized and easy to manage.
Return early from the `execute` method if no base or path exist.
Add method `get_wires` which internally uses `get_wire_from_subelements`
(renamed method), to get the edges from the path object,
and its subelements, if any. If no wires are found
return early from `execute`.
The final rotation applied to the copies will be the base rotation
of the base object's shape. The only exception is when the
`AlignMode` is `'Tangent'`; in this case, it performs
a pre-rotation with the `TangentVector`.
Test the inputs to the `make_path_array` function
and return `None` if there is a problem.
Now the make function accepts as input a `"String"` which must be
the `Label` of an object in the document, so it is easier to create
arrays quickly from the Python console.
Add the new parameters to the make function, `align_mode`,
`tan_vector`, `force_vertical`, and `vertical_vector`.
These properties were added to the proxy object in 0db11da9cf.
Add message deprecating the older call `makePathArray`.
Adjust the GuiCommand accordingly. Now it uses the commit
mechanism of the parent `Modifier` class so that the executed
functions are recorded in the Python console.
Clean up the `PathArray` class as well.
Improvements now identify cases where selected faces create a closed loop that creates an internal closed wire to not be processed.
Remove unnecessary comments.
Add debug statements.
The 0.25 constant used might need to be modified later. Or, the entire `_makeIntersectionTags()` method might need to be improved if other micro-edge use cases cause failure.