API manual: Sketch.offset method retired, use the createOffsetInput and addOffset2 methods

API manual: Sketch.offset method retired, use the createOffsetInput and addOffset2 methods

karl.ri
Enthusiast Enthusiast
994 Views
4 Replies
Message 1 of 5

API manual: Sketch.offset method retired, use the createOffsetInput and addOffset2 methods

karl.ri
Enthusiast
Enthusiast

I cannot find any information about createOffsetinput and addOffset2.

My problem: I found no solution to get an "always outside" offset after a sketch.offset of a projected body.

So I hope addOffset2 will do it.

Regards from Austria,

Karl

0 Likes
995 Views
4 Replies
Replies (4)
Message 2 of 5

Jorge_Jaramillo
Collaborator
Collaborator

Hi,

 

You can find the documentation about them here:

https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-52c4f765-43c8-4d81-a1a8-5151dc02c03c

 

Regarding the offset direction (internal or external), there is a specification provided in the GeometricConstraints.createOffsetInput's offset parameter.

 

Regards,

Jorge Jaramillo

 

Message 3 of 5

karl.ri
Enthusiast
Enthusiast

Thanks Jorge for your promt reply.

I experimented a lot but cannot get it to work. See my problem in SOM.jpg:

code line 125 and 126: both lines and line  > isValid =True

code line 127: curves > isValid =  False (i have no idea, why)

geometricConstraints.createOffsetInput(curves, offset) generates the shown type error.
If I use the old version
 offsetcurv = skt.offset(curves, dirPoints, offset)
it works, but some of the offset lines are inside (see SOM2.jpg)

What I am doing wrong, any idea?

Regards from Austria,

Karl

0 Likes
Message 4 of 5

BrianEkins
Mentor
Mentor

Can you attach the design so that I can reproduce the problem and see if I can get the correct result?

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes
Message 5 of 5

karl.ri
Enthusiast
Enthusiast

Here is my design.

https://a360.co/3zDk3PJ

I am doing wooden puzzles and to minimize the usage of expensive wood in the milling process, I built an Add-Inn called SketchOffsetMove. I move the parts manually using the offset lines to snap to the nearest possible distance.

 

0 Likes