Home → Operators → Trim/Line/To/L0,P0

Trim/Line/To/L0,P0

Trim Line to Collinear Point

Trims or extends a line endpoint to a specified point that lies on the line. The Start/End selector specifies which endpoint to move.

What It Does

The Trim/Line/To/L0,P0 operator moves a line endpoint to a specified point P0 that lies on the line (or its extension). This trims the line if P0 is between the endpoints, or extends it if P0 is beyond an endpoint.

Syntax

Trim/Line, L0, To, P0, Start|End

Quick Input

L: 0 P: 0 End: Start End

Direction Selector

SelectorMeaning
StartMove the start endpoint of the line to P0
EndMove the end endpoint of the line to P0

Worked Examples

Setup: L0 = Horizontal line from (0,0) to (100,0) P0 = (60, 0) [on L0 — between endpoints] Trim/Line, L0, To, P0, End → L0: from (0,0) to (60,0) [end trimmed to P0] Setup: L1 = Horizontal line from (0,0) to (100,0) P1 = (150, 0) [on L1 extension — beyond end] Trim/Line, L1, To, P1, End → L1: from (0,0) to (150,0) [end extended to P1]

Analytic Rule

P0 must lie on the line L or its extension. The selected endpoint (Start or End) is moved to P0. If P0 is between endpoints: trim (line shortens). If P0 is beyond an endpoint: extend (line lengthens). Result: Exact analytic endpoint modification.

FAQ

What if P0 is not on the line?

XyzPilot returns an error. P0 must lie exactly on the line or its extension.

What is the difference between this and Trim/Line/To/L?

Trim/Line/To/L trims to the intersection with another line. Trim/Line/To/P trims to a specific point on the line.