readSurfaceMesh
설명
은 지정된 파일 이름을 가진 지원되는 메시 파일 형식에서 곡면 메시 데이터를 읽어오고 이를 mesh
= readSurfaceMesh(fileName
)surfaceMesh
객체로 반환합니다.
예제
PLY 파일에서 곡면 메시 읽어오기
곡면 메시 데이터를 읽을 PLY 파일을 지정합니다.
fileName = fullfile(toolboxdir("lidar"),"lidardata", ... "surfaceMesh","sphere.ply");
PLY 파일의 곡면 메시 데이터를 작업 공간으로 읽어옵니다.
mesh = readSurfaceMesh(fileName)
mesh = surfaceMesh with properties: Vertices: [482x3 double] Faces: [956x3 int32] VertexNormals: [482x3 double] VertexColors: [] FaceNormals: [] FaceColors: [] NumVertices: 482 NumFaces: 956
곡면 메시를 표시합니다.
surfaceMeshShow(mesh)
STL 파일에서 곡면 메시 읽어오기
곡면 메시 데이터를 읽을 STL 파일을 지정합니다.
fileName = fullfile(toolboxdir("lidar"),"lidardata", ... "surfaceMesh","mobius.stl");
STL 파일의 곡면 메시 데이터를 작업 공간으로 읽어옵니다.
mesh = readSurfaceMesh(fileName)
mesh = surfaceMesh with properties: Vertices: [1050x3 double] Faces: [1960x3 int32] VertexNormals: [] VertexColors: [] FaceNormals: [1960x3 double] FaceColors: [] NumVertices: 1050 NumFaces: 1960
곡면 메시를 표시합니다.
surfaceMeshShow(mesh)
입력 인수
fileName
— 읽어올 곡면 메시 데이터의 파일 이름
문자형 벡터 | string형 스칼라
읽어올 곡면 메시 데이터의 파일 이름으로, 문자형 벡터 또는 string형 스칼라로 지정됩니다. 파일 이름과 함께 파일 확장자를 지정해야 합니다. 파일이 작업 폴더에 없는 경우에는 전체 파일 경로를 지정해야 합니다. 이 함수는 다음과 같은 표준 메시 파일 형식을 지원합니다.
STL - Stereolithography(광조형 기술) 파일 형식
PLY - Polygon(다각형) 파일 형식
FBX® — Autodesk® Filmbox
OBJ — Wavefront® OBJ
GLTF — GL Transmission Format glTF™ (GL 전송 형식)
GLB — GL Transmission Format Binary File(이진 파일 형식의 GL 전송 형식)
OFF — Object File Format(객체 파일 형식)
DAE — COLLADA™ Digital Asset Exchange(디지털 자산 교환)
STEP 또는 STP — Standard for the Exchange of Product Data(제품 데이터 교환 표준)
IGES 또는 IGS — Initial Graphics Exchange Specification(초기 그래픽 교환 사양)
데이터형: char
| string
출력 인수
mesh
— 곡면 메시 데이터
surfaceMesh
객체
곡면 메시 데이터로, surfaceMesh
객체로 반환됩니다.
제한 사항
STL 파일에서 읽어올 수 없는 특성은 다음과 같습니다.
꼭짓점 법선
꼭짓점 색
면 색
PLY 파일에서는 면 색을 읽어올 수 없습니다.
FBX 파일 형식에서는 메시 꼭짓점, 꼭짓점 색, 메시 삼각형 면만 읽어올 수 있습니다.
OBJ, GLTF, GLB, OFF, DAE, STEP, STP, IGES 또는 IGS 파일 형식에서는 메시 꼭짓점과 메시 삼각형 면만 읽어올 수 있습니다.
버전 내역
R2022b에 개발됨R2024a: 새로운 파일 형식에서 3차원 곡면 메시 데이터를 읽어옴
이제 FBX, OBJ, GLTF, GLB, OFF, DAE, STEP, STP, IGES, IGS 파일 형식에서 3차원 곡면 메시 데이터를 읽어올 수 있습니다.
참고 항목
surfaceMesh
| pc2surfacemesh
| writeSurfaceMesh
| surfaceMeshShow
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)