Can i use xml3d with stl models?

喜欢而已 提交于 2020-01-05 08:36:10

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!