VARKON Version 1.15 1997-10-24


trim - Procedure

Cuts or extends an entity


Description

Cuts or extends either end of a 2D line or arc using a line, arc or curve as limit.

Syntax

trim(ref1, end, ref2, alt);

REF ref1;
INT end;
REF ref2;
INT alt;


Principal parameters

ref1 - Identity of line or arc to trim
end - 0 = Trim start of entity, 1 = Trim end
ref2 - Identity of limiting entity


Optional parameters

alt - Alternative, default = 1


Examples

trim(#5,0,#2);

Moves the start of #5 to the position where it intersects with #2 for the first time.

trim(#5,1,#2,-2);

Moves the end of #5 to the position where an infinitely long #5 would intersect #2 for the second time.

Comments

trim is only allowed in a 2D module.

See the intersect() function for exact rules of how intersects are calculated.


VARKON Homepage Index