STL to XML converter for Modal Geometry
Hi,
in case someone else would need it, here's a Matlab script for conversion from STL (in ascii format) to XML, that can be loaded to Dewesoft Modal Geometry.
To run the script:
- open "call_CreateXMLfunction.m"
- change the filename on the line 12. File should be in the same folder.
- The rest is done automatically and the file is saved in the same folder with the same name (with XML extension)
- There is a test-file "cube.stl" for script testing purposes.
The script generates XML file with nodes, lines and triangles, and can be directly loaded to Dewesoft geometry (latest version)
The script is a work in progress and is not optimized, large number of nodes can take a long time to convert.
cheers,
Dan
P.S. to load XML file, in the Modal Geometry click on "Editor" , in the new window select File --> Load, and select newly generated file
P.P.S. I also have a script for STL conversion to UNV but I find it much faster when opening XML in DEWESoft. However let me know if you'd like to use it.
Attached files:
Hello, everything worked out as you wrote, not so hard, thanks to the fact that everything is then automated! thank you
@Benji N
Hi Benji, I don't have it at the moment but I plan on doing that.
If you come back in about a week or two, I'll post it here. Cheers
@Benji N
Hi Benji,
here's the python code for the conversion from STL to XML. It took me a bit longer to rewrite it from Matlab code but eventually it is running much faster for larger models now.
Let me know if the code is running for you.
Cheers
Dan
Attached files:
@Dan Pilbauer
Thanks!
Is it possible for you to change the format of the file to another one? I can not open the Rar files.
@Benji N
can't upload it here, python script file is not supported on this forum. I'm adding also a zip file, or here's a link directly on the script file:
https://drive.google.com/file/d/1N4b21qyRLzNoYo8_tVv-jka-zPuwKGC2/view?usp=sharing
and the STL test file
https://drive.google.com/file/d/1Aen6z8NUTTrk34J81E2Ytq2aOaPnP-xP/view?usp=sharing
Attached files:
@Dan Pilbauer
Hi,
I downloaded your MATLAB code and tried to run it, but it gave an error on line 18. How can I fix it?
Thank you very much.
Attached files:
@Đào Hiển
Hi,
this feature is now supported inside Dewesoft. You can import STL direclt instead of going through my script.
It seems I forgot to upload some supporting files.
Let me know if you need it for some other reasons than Dewesoft, I will try to dig it our somewhere. It has been a while I have used it since the new DEWEsoft version with this feature is out.