Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Determine if a Box, cylinder, or sphere feature joined or cut from a model.

7 REPLIES 7
Reply
Message 1 of 8
nnamfoh
378 Views, 7 Replies

Determine if a Box, cylinder, or sphere feature joined or cut from a model.

I'm trying to recreate a model in OpenSCAD given the features and models present in the design. 
Box/Cylinder/Sphere/etc Features can create new bodies, join, intersect, or cut like combine features. But given one of these feature objects how can you determine which combine feature was used? It doesn't seem to be saved in any of the accessible variables. 

Tags (3)
7 REPLIES 7
Message 2 of 8
JesusFreke
in reply to: nnamfoh

I'm not positive, but, for example for a BoxFeature, I would expect there to be an extrude feature in the .linkedFeatures list for the box feature, and the extrude feature has an operation property that specifies whether it was a join, cut, etc.

 

I haven't actually verified that this is the case though 🙂

 

 

Message 3 of 8
JesusFreke
in reply to: JesusFreke

I just played with it a bit and it looks like that's not the case. I'm pretty sure it builds up the box similarly to how you would normally do it (i.e. extrude a rectangular sketch), but I guess that's all done at a lower level that's not actually part of the document model.

Message 4 of 8
nnamfoh
in reply to: JesusFreke

Yeah I checked all of the linked features and base feature and other similar variables. It seems like these things must be saved somewhere, especially because if you double click on the feature in the time line you can change the combination type, but its not accessible through the BoxFeature itself. 

Message 5 of 8
JesusFreke
in reply to: nnamfoh

What is it that you're trying to do? Take an arbitrary fusion 360 model and convert it to openscad?

Message 6 of 8
BrianEkins
in reply to: nnamfoh

If you watch the UI closely when you create a primitive feature you'll see that a sketch shows up temporarily in the timeline while you're defining the size of the feature and then goes away when you complete it.  The primitive features are implemented like the other features where there's a sketch that defines its size and position.  However, that sketch isn't available to you through the UI or the API.  Without it, there's not a way to accurately position or parametrically control the position of the feature.  Because of these limitations of how the primitive features work we decided that in real-world designs they aren't very useful so they were a low priority to expose through the API.  They're exposed as the base class Feature object but you don't have access to any information that would be specific to those types of features.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
Message 7 of 8
nnamfoh
in reply to: BrianEkins

Is there any chance this will be made available through the API in the future?

Message 8 of 8
BrianEkins
in reply to: nnamfoh

Is there any chance?  Sure.  Would I bet on it being available at some point?  Nope.  There are a lot of other things missing that would impact more people and have a higher priority.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report