Hi All,
Currently the Sketch Offset method requires a directionPoint to determine the direction of the offset operation. Turns out it's not easy to determine a point inside an arbitrary sketch loop. An involved workaround suggested is as follows from a Fusion team member...
A workaround might be extruding the profile into a body, then find a point inside the top face of the body by modifying the code in the following posts: http://forums.autodesk.com/t5/api-and-scripts/extrude-some-profiles/td-p/6404721http://modthemachine.typepad.com/my_weblog/2016/05/is-point-on-face.html The projection of that point onto the sketch plane will be the point you want.
The idea station request is to simplify this. I see two options...
i) If the sketch curves to be offset form a loop, do not require a directionPoint. negative offset would be inward, positive offset would be outward.
ii) Create a method to return a point inside or a point outside a sketch loop. The appropriate point, inside or outside, could then be used as the directionPoint for the offset method.
Seems like option i) might be more elegant, but either would be a huge improvement.
Thanks!
Rod.