Message 1 of 10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I found some behavior that I don’t understand regarding the offset of a set of closed loops.
I have two closed loops almost similar, generated by two dxf file and slightly rotated by an angle.
I used the same function to generate the offset inward for the two closed loops.
This is the code:
def offsetShape(sketch, thickness): try: app = adsk.core.Application.get() ui = app.userInterface spline = sketch.sketchCurves.sketchFittedSplines.item(0) # Create a collection of entities for move curves = adsk.core.ObjectCollection.create() # move the entire oval curves.add(spline) # Create the offset. dirPoint = adsk.core.Point3D.create(0, 0, 0) offsetCurves = sketch.offset(curves, dirPoint, thickness) # find the inside profile # item(0) should be the outside profile profInt = sketch.profiles.item(1) return profInt except: if ui: ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
I find the same behavior using the UI. So I recreate the issue using the interface.
If I create the offset for the first loop all is ok. It generates a closed loop inward:
It creates only one closed spline .
But if I do the same operation for the second loop it give me two splines (this could be right) but it does not close the loop:
Someone can help me ?
Thanks
Dino
Solved! Go to Solution.