问题
I'd really like to use STL models with XML3d. Is there a way to convert back and forth between these formats?
回答1:
You can convert STL files to XML3D using the Blender exporter for instance: https://github.com/ksons/xml3d-blender-exporter
Another option is to write a plug-in for STL files that allow to reference STL files from <mesh>
and <data>
elements:
<mesh src="foo/bar.stl"/>
This would be very similar to the existing plug-ins for MeshLab/JSON and OpenCTM files:
- http://xml3d.github.io/xml3d-examples/examples/meshlab/meshlab.html
- http://xml3d.github.io/xml3d-examples/examples/openctm/openctm.html
回答2:
We've just released a new converter that uses the Open Asset Import Library to convert many 3D formats (including STL) to XML3D's asset format:
https://github.com/csvurt/assimp2xml3d
It can't convert from XML3D back to other formats, but this might be something we add in the future.
回答3:
There is a plug-in for STL file now: https://github.com/xml3d/xml3d-stl-plugin
It allows using STL files as simple as:
<mesh src="../path/to/model.stl"></mesh>
来源:https://stackoverflow.com/questions/30165025/can-i-use-xml3d-with-stl-models