0

基本上我在webgl上有一个模型(使用一些输入动态创建),形式为顶点数组和索引数组(指示要使用顶点数组中的顶点绘制的表面)。顶点颜色的数组。

我需要将其保存为 vrml 格式以进行 3D 打印。我怎样才能做到这一点?

4

1 回答 1

1

Convert the list of vertices and list of indices into a simple mesh format like OFF or PLY. And then use MeshLab to load the mesh and export it to VRML.

If what you are looking for is a way to automate the conversion to VRML from the same kind of input, then you can probably write the converter yourself by inspecting how a simple box mesh is exported to VRML by MeshLab: the VRML file still contains a list of vertices and a list of indices (among other things). You could also rely on the C++ library VCGLIB (the library used by MeshLab), although given how simple the VRML exporter is, it is unlikely to be worth doing it.

Finally, since this mesh is to be used for 3D printing, you may have other requirements (do hole-filling for instance) than the export format. In which case, VCGLIB may actually come in handy to apply mesh processing operations.

于 2014-02-01T00:06:55.357 回答