- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I need to use the Trim by code option, I create lines in a Sketch line1, line2, line3 and line4.
I need to trim line 4 from the end of the line to the intersection with line 2
Code:
PlanarSketch sketch = default(PlanarSketch);
sketch = partDef.Sketches.Add(partDef.WorkPlanes[3]);
TransientGeometry tg = default(TransientGeometry);
tg = ThisApplication.TransientGeometry;
Line1 = sketch.SketchLines.AddByTwoPoints(tg.CreatePoint2d(0, 10), tg.CreatePoint2d(-20, 10));
Line2 = sketch.SketchLines.AddByTwoPoints(tg.CreatePoint2d(-20, 10), tg.CreatePoint2d(-15, 0));
Line3 = sketch.SketchLines.AddByTwoPoints(tg.CreatePoint2d(0, 10), tg.CreatePoint2d(0, 5));
Line4 = sketch.SketchLines.AddByTwoPoints(tg.CreatePoint2d(0, 5), tg.CreatePoint2d(-20, 5));
Solved! Go to Solution.