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: 

Create a mesh in memory?

5 REPLIES 5
Reply
Message 1 of 6
hanskellner
359 Views, 5 Replies

Create a mesh in memory?

In the API there's the following support for creating a mesh:

 

MeshBodyList MeshBodies.add( string fullFilename, MeshUnits units )

 

But is there a way to create a mesh in memory? I would like to create a mesh surface from data I'm generating programmatically and not from a file.

 

Thanks.



Hans Kellner
Senior Manager, Principal Engineer
Tags (2)
5 REPLIES 5
Message 2 of 6
marshaltu
in reply to: hanskellner

Hello,

 

Unfortunately there was no way to create a mesh in memory by API.

 

We have a command named "BRep to Mesh" in direct modeling environment. We can probably export the functionality by API in future releases. Then users can create BRep body by feature API(e.g. extrude) and convert it to Mesh.

 

Thanks,

Marshal



Marshal Tu
Fusion 360 Developer
Autodesk, Inc.

Message 3 of 6
ekinsb
in reply to: hanskellner

What is it that you're trying to do?  A mesh object in memory wouldn't be very useful but would basicallyl just be a wrapper over the mesh data.  Most mesh formats are fairly simple so it wouldn't be hard to read the original file itself and get the same information.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 4 of 6
hanskellner
in reply to: ekinsb

The data is generated programmatically... as I mentioned in my post 😉

 

"I would like to create a mesh surface from data I'm generating programmatically and not from a file."

 

I'm creating surfaces and at the moment I have to generate the data, export it out to an STL or OBJ file, then load that file back in using the API call I mentioned. If the API supported creation of the mesh dynamically rather than loading through a file that would be great.

 

Or maybe there's some other way to do this?

 

Thanks.



Hans Kellner
Senior Manager, Principal Engineer
Message 5 of 6
ekinsb
in reply to: hanskellner

I think I misunderstood your original question.  If I understand correctly now, you're saying that you already have mesh data of your own format in memory and you want to directly create a mesh body in Fusion without having to first write out your mesh data into some format on disk that Fusion can read in.  Is that right?  If so, that's a reasonable request but isn't something that the API currently supports.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 6 of 6
hanskellner
in reply to: ekinsb

Yes, spot on!  Thx Brian.



Hans Kellner
Senior Manager, Principal Engineer

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