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

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

Anonymous
Not applicable
1,129 Views
7 Replies
Message 1 of 8

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

Anonymous
Not applicable

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. 

0 Likes
1,130 Views
7 Replies
Replies (7)
Message 2 of 8

JesusFreke
Advocate
Advocate

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 🙂

 

 

0 Likes
Message 3 of 8

JesusFreke
Advocate
Advocate

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.

0 Likes
Message 4 of 8

Anonymous
Not applicable

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. 

0 Likes
Message 5 of 8

JesusFreke
Advocate
Advocate

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

0 Likes
Message 6 of 8

BrianEkins
Mentor
Mentor

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
0 Likes
Message 7 of 8

Anonymous
Not applicable

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

0 Likes
Message 8 of 8

BrianEkins
Mentor
Mentor

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
0 Likes