Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am using Sketch Offset API to do a 6 mm offset for a selected profile. However, when I measure it later, it shows the distance between the two loops are not 6 mm. If I use the UI to offset the same 6mm, it shows exact 6mm when I measure it. In my screen shot, there are 3 loops. The inner one is my sketch. The middle one is generated using my python code. The outer one is using UI. Am I missing something here? Thank you in advance.
Here is my code:
currentProfile = adsk.fusion.Profile.cast(clonedSketch.profiles[0])
centerX = (currentProfile.boundingBox.maxPoint.x + currentProfile.boundingBox.minPoint.x) / 2
centerY = (currentProfile.boundingBox.maxPoint.y + currentProfile.boundingBox.minPoint.y) / 2
center = adsk.core.Point3D.create(centerX, centerY, 0)
handle_curves = clonedSketch.offset(curves, center, -0.6)
Solved! Go to Solution.