【发布时间】:2017-09-22 00:45:22
【问题描述】:
我尝试在 Meshlab 上导入此 VRML 文件的文件:
#VRML 2.0 utf-8
PROTO my_sphere [ exposedField SFFVec3f xyz 0 0 0 ] {
Transform {
translation IS xyz
children [
Shape {
appearance Appearance { material Material {
diffuseColor 1.0 0.05 0.05 } }
geometry Sphere { radius 0.66 }
}
]
}
}
my_sphere { xyz 0.0 0.0 0.119 } # 0
my_sphere { xyz 0.0 0.0 0.119 } # 1
我收到了错误:
Error encountered while loading file:
"/my_path/test.wrl"
File: /my_path/test.wrl
Error details: -- line 2 col 32: invalid FieldType
-- line 4 col 42: "{" expected
如何导入此类文件?我可以在 Blender 上轻松完成。
【问题讨论】:
-
您的列表中 xyz 字段的类型拼写错误,应该是 SFVec3f。但是,即使进行此更改,Meshlab 2016 也不会导入。 Meshlab X3D/VRML 导入可能不支持 PROTO 语句。
-
对web3d.org/x3d/content/examples/Basic/X3dSpecifications/… 的 X3D 示例的进一步实验——下载为 VRML97——表明 Meshlab 不支持球体和盒子的原始形状。看来只支持 IndexedTriangleSet 之类的网格节点
-
@VincentMarchetti 哦,那么,如果拼写错误,为什么它可以在 Blender 上工作?它是否被解释为其他东西?