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:
=> =>
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
Solved! Go to Solution.
Solved by BrianEkins. Go to Solution.
Solved by JeromeBriot. Go to Solution.
Solved by RandyKopf. Go to Solution.
every time I try to run your script I get this error
Hi Daniel -
That issue has been fixed. It arose on Windows platforms. Please grab the latest version from Github. Sorry for the trouble.
H
no problem its working good now thank you what are you doing next
I've created a gallery project for a "penny" that created using the script:
https://fusion360.autodesk.com/projects/penny-image-2-surface
I'm happy with the final result and now confident that the workflow I was aiming for when i created the script can be accomplished.
I have been playing with for the last few hours it`s quite good for making textures
That's great to hear!
Feel free to post an image. Always nice to see what people are making.
I've updated the code to support "Invert Image" so that darker colors are raised and lighter colors lowered. Therefore, white will be the lowest and black the highest.
Cheers!
This is a pretty cool project! Thanks you did a great job with this. Wish Autodesk would make hieghtfield a standard thing to support.
Randy Kopf
http://desktopartisan.blogspot.com/
Hi,
I was really looking forward to being able to use this script, however, as of the most recent update, Autodesk has removed the option to insert a javascript. This means that the script can no longer be used in Fusion 360. I know it is a big ask, but would it be possible to have the code rewritten in either C++ or Phython.
Thanks
Ash
Hello,
I would like to clarify that existing Javascript script/addin can be still run and used in Fusion. We removed the functionality to add new script/addin and help documents. You can add existing scripts by "+" button besides "My Scripts" or "My Add-Ins".
Thanks,
Marshal
Hi Marshal,
I understand that existing javascripts can still be run on Fusion 360. However, I did not download/run the script before the update. This means that I would have to insert a new script, which can not be done as it is in the javascript language.
Thanks
Ash
Hello,
I should explain more clearly about how to add/run Javascript in new Fusion version. Though it isn't officially recommended to do so. The best approach would be move to Python/C++ language as you said.
1. Download Javascript script which you want to use.
2. Launch Fusion and invoke "Scripts & Add-in Manager" dialog.
3. The script should not in the list. Add them by "+" button(please note you have to select the folder which the script is located at).
4. Run the script. Even you can still edit the script if you want to customize it.
So it doesn't matter if you didn't download/run the script before.
Thanks,
Marshal
Hi Marshal,
I have downloaded the script and created a new script, selecting the folder the javascript is located in. I moved all of the files into the new folder, however, when I click run, it just comes up with "Hello Script".
Thanks,
Ash
Hello,
I record a video to demo how to load/run an existing Javascript script. Please take a look and let me know if you still have issue.
PS: the video is recorded in Mac. It should be similar in Windows platform.
Thanks,
Marshal
I just would like to have more tips about how to create an perfect image ready to run at your fantastic script. My company is specialized in 3D printing topography and then Image2Surface makes total sense to me.
Thanks a lot.
Marcelo
Hi Marcelo -
Good idea. Especially now that Fusion 360 has better support for meshes.
Also, I'm working a new version of the script and will also be posting some examples and hints. When it's ready I'll post a notice in this thread as well as a new post in "API and Scripts".
Thanks,
Hans
Hey Hans.
I followed the instructions to add a JavaScript script and this script doesn't work. The script shows up in the "My Scripts" list but when I run the script, nothing happens. I get no output when I try and run in in "Debug" mode.
I'm on a Mac, High Sierra 10.13.2 (17C88) and latest version of Fusion360.
Cheers!
--Ed
Can't find what you're looking for? Ask the community or share your knowledge.