Returns the trimming parameter on part1 where it is intersected by part2. onRight? determines which of two possible intersections is used. For Arc to Arc intersections, it picks the one to the "right" as one travels from the first to the second, where the normal of the first is used to disambiguate. For Arc to Line intersections, it picks the parameter nearest the start of the line. For Line to Line intersections, onRight? is not used (but must be supplied). Part1 and Part2 must handle either the Arc or Line protocols (supplied by or , respectively).
trim ( part1 As Part, _ part2 As Part, _ onRight? As Boolean ) As Number
|part1||Part||The first part to intersect. The part must be a kind of ArcMixin or LineMixin.|
|part2||Part||The second part to intersect. The part must be a kind of ArcMixin or LineMixin.|
|onRight?||Boolean||Determines which of two possible intersections is selected. See the synopsis for details.|
Child IvSketchArc1 As IvSketchArc center = Point(0,0,0) radius = 2 End Child Child IvSketchArc2 As IvSketchArc center = Point(1,0,0) radius = 1.5 End Child Child IvSketchLine1 as IvSketchLine thruPoint1 = IvSketchArc1.Center thruPoint2 = IvSketchArc2.Center + Vector(5,0,0) End Child Child IvSketchLine2 as IvSketchLine thruPoint1 = Point(0.5,2,0) thruPoint2 = Point(0.5-2,0) End Child
Intent >trim(IvSketchArc1, IvSketchArc2, True) --> 313.432536