2017-09-15 15 views
0

에 내가 Meshlab에이 VRML 파일 가져 오기 위해 노력하고있어 파일 VRML 2.0를 가져 오는 방법 :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 오류 받고 있어요 :이 가져올 수있는 방법

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 

을 파일 유형? 블렌더에서 쉽게 할 수 있습니다.

+0

에 의해 정의 된 구조로 VMRL 현장에서 구체 형상을 교체, 그것은 SFVec3f해야합니다. 그러나이 변경으로도 Meshlab 2016은 가져 오지 않습니다. Meshlab X3D/VRML 가져 오기는 PROTO 문을 지원하지 않을 수 있습니다. –

+0

http://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/RedSphereBlueBoxIndex.html - VRML97로 다운로드 된 X3D 예제를 사용한 추가 실험 - Meshlab이 Sphere의 기본 모양을 지원하지 않는다는 것을 보여줍니다. 상자. IndexedTriangleSet과 같은 메쉬 노드 만 지원됩니다. –

+0

@VincentMarchetti 오, 왜 잘못 입력 된 경우 블렌더에서 작동합니까? 그것은 다른 것으로 해석됩니까? – izxle

답변

1

Meshlab은 버전 2016.12에서 원래의 Sphere 지오메트리를 지원하지 않습니다 (SFFVec3f가 아닌 SFVec3f 여야 함). Meshlab은 IndexedFaceSet 형상으로 Shape을 반환하는 PROTO 문을 사용하여 지원합니다.

#VRML 2.0 utf-8 
PROTO my_tetrahedron [ exposedField SFVec3f xyz 0 0 0 ] { 
    Transform { 
     translation IS xyz 
     children [ 
     Shape { 
     appearance Appearance { 
      material Material { 
      diffuseColor 0.0 1.0 0.0 
      } 
     } 
     geometry IndexedFaceSet { 
      coordIndex [ 3 1 0 -1 3 2 1 -1 3 0 2 -1 0 1 2 -1] 
      coord Coordinate { 
      point [0.29 0.50 -0.20 0.29 -0.50 -0.20 -0.58 0.00 -0.20 0.00 0.00 0.61] 
      } 
     } 
     } 
     ] 
    } 
} 


# [Scene] ========== ========== ========== 


my_tetrahedron { xyz 0.0 0.0 0.0 } 
my_tetrahedron { xyz -1.0 -1.0 -1.0 } 

Meshlab 2016 개의 메쉬로 이것을 가져 않습니다 여기에 메쉬 정의 모양과 같은 두 개의 사면체 인스턴스를 생성하는 예를 VRML97 장면이다.

은 원래의 질문에 대한 솔루션을 제안하십시오 XYZ 필드의 유형이 목록에 맞춤법이 틀린 된 IndexedFaceSet