Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
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: 

Image 2 Surface Script for Fusion 360

79 REPLIES 79
SOLVED
Reply
Message 1 of 80
hanskellner
23380 Views, 79 Replies

Image 2 Surface Script for Fusion 360

I've created a script for Fusion 360 that can be used to import an image and convert it to a mesh, sketch points, or sketch lines.

 

The following heightmap image of a portion of the moon was used to generate the following mesh and then t-spline:

 

Moon.jpg => MoonMesh.png => MoonTSpline.png

 

The t-spline version is the most flexible for changes and it can also be used in the CAM environment for milling.

 

The code and information is posted on Github:

 

https://github.com/hanskellner/Fusion360Image2Surface 

 

Note, because of limitations in Fusion on the size of meshes, I highly recommend using only very small images. For example, the moon image above is only 50x50 pixels. If you have an image that's large then create a smaller version of it then import that.

 

Cheers,

 

Hans



Hans Kellner
Senior Manager, Principal Engineer
79 REPLIES 79
Message 21 of 80
Anonymous
in reply to: Anonymous

I am having the same problem

Message 22 of 80
hanskellner
in reply to: Anonymous

I'm about to publish a new version of the script by the end of this week.  But will also do some installation verification to see if I can find any issues.

 

Thanks,

 

Hans



Hans Kellner
Senior Manager, Principal Engineer
Message 23 of 80
hanskellner
in reply to: hanskellner

Image 2 Surface V2

 

I've made a large update to the Image2Surface code.  It's now an Add-In and has a completely new user-interface.  Hopefully it will be easier to use.

 

You can now preview the surface/mesh before sending to Fusion 360 to be generated.  Simply drag and drop an image onto the palette view.  Then adjust the parameters.  More help on the Github page (README).  Also, Fusion 360 appears to be working far better now with larger meshes.

 

Go to the Github page to download the new code: https://github.com/hanskellner/Fusion360Image2Surface

ShowImage2SurfacePalette.pngImage2SurfacePalette.png

 

Please let me know if you find any issues with the update.

 

Cheers!



Hans Kellner
Senior Manager, Principal Engineer
Message 24 of 80
Anonymous
in reply to: hanskellner

Please look what happened...

Captura de Tela 2018-03-16 às 18.42.02.png

Message 25 of 80
hanskellner
in reply to: Anonymous

Interesting.  Are you running on a Windows or Mac?



Hans Kellner
Senior Manager, Principal Engineer
Message 26 of 80
Anonymous
in reply to: hanskellner

MAC OS X El Captain 10.11.6

Message 27 of 80
hanskellner
in reply to: Anonymous

Thanks for the quick response.  This is a access permission error.  Did this occur the first time you clicked the "Generate Surface" button?  Or after generating once successfully?

 

Also, if you delete the file "image2surface.obj" that's in the add-in folder (path shown in message) then try again, does it work?



Hans Kellner
Senior Manager, Principal Engineer
Message 28 of 80
Anonymous
in reply to: hanskellner

Thanks for the quick response too.

 

Yes, it did.

 

Strange, but the file doesn't exist in this folder.

Message 29 of 80
hanskellner
in reply to: Anonymous

Ok, I'm tracking down some odd permission error.  This will take a bit.  Hopefully I'll find it shortly.



Hans Kellner
Senior Manager, Principal Engineer
Message 30 of 80
Anonymous
in reply to: hanskellner

Is there a chance to get back to the old version? I use it a lot actually. Thanks.

Message 31 of 80
hanskellner
in reply to: Anonymous

Sorry for the delay.  Please download the add-in archive again from Github and install.  Erase the old version before unarchiving the new one.  It should fix your issue.



Hans Kellner
Senior Manager, Principal Engineer
Message 32 of 80
Anonymous
in reply to: hanskellner

Fantastic! Run faster than the previous version! Awesome! Thanks a lot.

Message 33 of 80
Anonymous
in reply to: Anonymous

Sorry, but when resize the Max Height a new error occur

 

Captura de Tela 2018-03-16 às 20.33.13.png

Message 34 of 80
Anonymous
in reply to: Anonymous

Solved by finishing base feature. Thanks a lot again!

 

Captura de Tela 2018-03-16 às 20.38.46.png

Message 35 of 80
hanskellner
in reply to: Anonymous

Glad it's working for you.  I'll see if I can add a check for the base feature issue you had.  I really appreciate your help.



Hans Kellner
Senior Manager, Principal Engineer
Message 36 of 80
Anonymous
in reply to: hanskellner

Take a look at this mountain obtained via image2surface ready to be 3D printed:

 

Captura de Tela 2018-03-15 às 23.03.53.png

Message 37 of 80
royselten
in reply to: Anonymous

I really like this script. But there is something strange. The first 5 times i tried the button "Generate Surface" does nothing. Suddenly (i don't know what i did) the button is working.

I used it in a half hour a couple times and worked perfectly. But than the button stopped working. I restarted Fusion 360, no results. I restarted my PC, no result.

What is wrong?

The image is read OK. Changing settings(stepover etc.) working OK. But the button "Generate Surface" does nothing.

Message 38 of 80
hanskellner
in reply to: royselten

How long ago did you download the script?  I posted a fix 2hrs ago for a similar sounding problem that occurs on Windows machines.

 

Also, if you right-click on the info panel on the left side of the Image2Surface palette, a context menu will be displayed with two menu items. Select the "Inspect" element item.  The web debugger window should appear.  Select the "Console" tab to view any possible errors (usually in red).  If you see an error please post the message.



Hans Kellner
Senior Manager, Principal Engineer
Message 39 of 80
royselten
in reply to: hanskellner

About 3 hours ago... I download the new version, and now it is working! 

Thanks for the fast response!

Message 40 of 80
stevempotter
in reply to: hanskellner

Hi Hans,

I am eager to try your Addin.

I just downloaded the latest .zip from your Github, unarchived it, renamed and put the folder in USER\AppData\Local\Autodesk\Autodesk Fusion 360\API\Addins

When I add it to Addins with the + icon in F360, it appears in the list with a C++ icon next to it.

When I try to run it only a tiny window shows up that says "Hello addin" with an OK button. 

I hit OK and nothing else happens. 

What am I doing wrong?

Thanks,

Steve

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

Post to forums  

Autodesk Design & Make Report