The file I'm trying to import this VRML file on Meshlab:
#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
I'm getting the error:
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
How can I import this type of file? I can easily do it on Blender.
Apart from the misspelling in the original example (it should be SFVec3f, not SFFVec3f), Meshlab, at version 2016.12, does not support the primitive Sphere geometry. Meshlab does support using the PROTO statement that 'returns' Shape with IndexedFaceSet geometry. Here is an example VRML97 scene generating two tetrahedra instances as mesh-defined shapes:
Meshlab 2016 does import this as two meshes.
Suggest solution to original question: replace the Sphere geometry in the VMRL scene with geometry defined by an IndexedFaceSet