Create new Boxfeature

Create new Boxfeature

casey.rogers
Alumni Alumni
1,060 Views
5 Replies
Message 1 of 6

Create new Boxfeature

casey.rogers
Alumni
Alumni

The Component.boxFeatures property lets you access the boxFeatures collection but the collection does not seem to support any way of adding a new boxFeature according to the API documentation. Is creating new box features not yet supported?

0 Likes
Accepted solutions (1)
1,061 Views
5 Replies
Replies (5)
Message 2 of 6

marshaltu
Autodesk
Autodesk
Accepted solution

Hello,

 

Unfortunately it was not supported to create boxfeature yet. It is in our to-do list.

 

It would be great if you can explain why you need the functionality. Then we could estimate how urgent the requirement is and re-prioritize.

 

Thanks,

Marshal



Marshal Tu
Fusion Developer
>
0 Likes
Message 3 of 6

casey.rogers
Alumni
Alumni

Hey, thanks for the fast reply. I'm writing a script that voxelizes a BrepBody by creating a single voxel and then copying it repeatedly. It seemed more elegant to use a BoxFeature than a sketch and an extrude but if the feature isn't implemented yet a sketch and an extrude should do just fine.

0 Likes
Message 4 of 6

Anonymous
Not applicable

Is this still the case? It seems so.

 

It is just 1000% counter intuitive for someone trying to learn the API if the simplest thing is only partly supported.

It took me an hour to find out it is not supported, because I could not imagine that something as basic as a box would not be supported. This is a bit ridiculous tbh! I mean in that hour I could have implemented it myself I am sure.

0 Likes
Message 5 of 6

kandennti
Mentor
Mentor

Hi @Anonymous .

 

When manipulated in the GUI, the primitive commands seem to be a combination of sketches and other Features.
This may be why it is difficult to provide the ability to create instances through the API.

 

It is not a parametric result, but I feel that BaseFeature and TemporaryBRepManager can be used in many cases.

https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-0f6e9ca0-dc67-49c3-b902-baf881063e24 

0 Likes
Message 6 of 6

BrianEkins
Mentor
Mentor

All the primitive features would be difficult to expose through the API and are relatively worthless in real-world modeling.  Let's look at the box feature as an example.  When you run the command interactively, it asks you to select a construction plane or planar face.  You then provide two points to define the base corners and then define the height of the box.  It's creating a temporary sketch and then extruding it.  For the API to be equivalent, you would need to define a plane and then two points that lie on that plane, and finally an offset and direction.  Through the API, it would be much better to be able to define a box anywhere in space without being limited to an existing plane. 

 

Also, with the box feature, you can't accurately define the position of the original two points, so you can't control the position of the box.  And once it's created the only way to edit it is to change the parameters that control its length, width, and height. There isn't any way to control its position.  For real modeling, you'll want to create a sketch and then the appropriate feature. You can fully control the position of sketch geometry using both geometric and dimensional constraints.

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