Message 1 of 3
How split body with sketch line
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everybody,
I have a body, and i want to split this body by lines in sketch like this.
I can extrude by surface then use split feature, but it take slower than if i can split body direct from sketch lines.
1. I read help that i need to create path before use split feature. But i don't know how, please help..
2. I created a sketch contain all of sketch lines which used to split body. But, i don't know how to run statement For...Each... loop. I practice with extrude command but not success. How should i do ?
Dim oTG As TransientGeometry Set oTG = ThisApplication.TransientGeometry Dim oline As SketchLine Set oline = oSketch.SketchLines.AddByTwoPoints(oTG.CreatePoint2d(20, 0), oTG.CreatePoint2d(20, 1200)) Set oline = oSketch.SketchLines.AddByTwoPoints(oTG.CreatePoint2d(40, 0), oTG.CreatePoint2d(40, 1200)) Set oline = oSketch.SketchLines.AddByTwoPoints(oTG.CreatePoint2d(60, 0), oTG.CreatePoint2d(60, 1200)) For Each oline In oSketch.SketchLines 'Extrude Set oprofile = oSketch.Profiles.AddForSurface Set oextrude1 = oCompDef.Features.ExtrudeFeatures.AddByDistanceExtent(oprofile, 10, kSymmetricExtentDirection, kSurfaceOperation) Next
Thank you,