Trim/L,Between/P,P
Trim Line Between Two Points
Keeps only the segment of a line between two points P0 and P1. The portions outside the two points are removed.
What It Does
The Trim/L,Between/P,P operator trims a line to keep only the segment between two specified points. Both points must lie on the line. The portions of the line outside the two points are removed.
Syntax
Trim/Line, L0, Between, P0, P1
Quick Input
L: 0
P: 0
P2: 1
Direction Selector
No direction selector required. The result is uniquely determined by the input geometry.
Worked Examples
Setup:
L0 = Horizontal line from (0,0) to (200,0)
P0 = (40, 0) [on L0]
P1 = (140, 0) [on L0]
Trim/Line, L0, Between, P0, P1
→ L0 trimmed: from (40,0) to (140,0)
Portions (0,0)→(40,0) and (140,0)→(200,0) removed
Analytic Rule
Both points P0 and P1 must lie on line L.
The line is trimmed to the segment between P0 and P1.
The shorter or longer segment is kept based on point order.
Result: Exact analytic trim.
FAQ
What if the points are not on the line?
XyzPilot returns an error. Both P0 and P1 must lie exactly on the line.
What if P0 and P1 are the same point?
XyzPilot returns an error — the result would be a zero-length line segment.