Write STL C++ Mex function

버전 1.1.0.0 (30.1 KB) 작성자: Arso
c++ mex function for writing ASCII stl file from nodes and triangles list
다운로드 수: 527
업데이트 날짜: 2013/5/3

라이선스 보기

Matlab functions for writing and reading textual files are lacking in speed. Here is c++ implementation for simple writing ASCII stl files from Matlab with reasonable speed for data up to 250k nodes and triangles.

For writing 100k(17MB on HDD) it takes 2-3 seconds and for huge stl like 10 millions nodes/triangles(over 1GB stl file) it takes approximately one minute on my machine(1.5GM RAM, 1.5 GHz).

%% FORMAT
writeSTL(nodes,triangles,filename)
%INPUTS
%nodes[NumberOfNodes x 3]
%trianles[NumberOfTringles x 3]
%filename['string']

example
nodes = [1 2 3; 4 5 6; 7 8 9];
triangles = [1 2 3];
filaname = 'one triangle.stl';

Enjoy!
---------------------------------------
I have been reported that sharing mex files is not allowed. If You are not sure how to compile c++ to mex go to folder with writeSTL.cpp and just type "mex writeSTL.cpp", then call function.
---------------------------------------

인용 양식

Arso (2026). Write STL C++ Mex function (https://kr.mathworks.com/matlabcentral/fileexchange/41597-write-stl-c-mex-function), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2010a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 STL (STereoLithography)에 대해 자세히 알아보기
버전 게시됨 릴리스 정보
1.1.0.0

fixed title...

1.0.0.0