step.motion.path.passes.merge¶
Merge pass — collapse adjacent same-type segments.
Two segments are merge-eligible if they share kind/axis/direction, both have
known endpoints, and neither has a stop condition. SideAction and
deferred-placeholder (None) entries act as merge barriers.
Classes¶
Compiler pass that runs the merge transform. |
Functions¶
|
Return True if two adjacent known-endpoint segments can be merged. |
|
Merge two compatible segments. Precondition: |
|
Collapse adjacent same-type/same-direction segments with no conditions. |
Module Contents¶
- step.motion.path.passes.merge.can_merge(a: step.motion.path.ir.Segment, b: step.motion.path.ir.Segment) bool¶
Return True if two adjacent known-endpoint segments can be merged.
- step.motion.path.passes.merge.merge_two(a: step.motion.path.ir.Segment, b: step.motion.path.ir.Segment) step.motion.path.ir.Segment¶
Merge two compatible segments. Precondition:
can_merge(a, b).