필터 지우기
필터 지우기

stl fusion of two files

조회 수: 13 (최근 30일)
Corali Simoes-Véronneau
Corali Simoes-Véronneau 2020년 10월 13일
답변: Fabio Freschi 2023년 9월 25일
Hi!
I am trying to put a simple triangle in 3D on top of a cylindre in 3D too. I know it seems easy to do but I'm just starting to use MATLAB with STL and I don't know how to write the function to fusion these two designs.
Here is the start of our code for the fusion function:
Thanks:)
  댓글 수: 2
Golbarg
Golbarg 2023년 9월 25일
편집: Golbarg 2023년 9월 25일
Hi!
I hope you have found a way. I'm almost new in MATLAB and I'm trying to do the same thing. My geometries are a little bit complicated and I want to combine their stl files.
I appreciate any help :)
Fabio Freschi
Fabio Freschi 2023년 9월 25일
If you attach your file with a simple demo input, it would be easier to help.

댓글을 달려면 로그인하십시오.

답변 (1개)

Fabio Freschi
Fabio Freschi 2023년 9월 25일
While waiting for more details about the inputs, I make my guesses.
  • if your objectSTL has nodes/faces/normals, you can't address them like you did. They are likely structures, so you should write something like
f1 = objectSTL1.face;
v1 = objectSTL1.vertex;
n1 = objectSTL1.normals;
  • your concatenation cannot be correct. In fact each object has its own numeration of vertices. Use something like
objectSTL3.face = [f1; f2+size(v1,1)];
objectSTL3.vertex = [v1; v2];
objectSTL3.normals = [n1; n2];
  • now you realize that your temporary variables are useless
objectSTL3.face = [objectSTL1.face; objectSTL2.face+size(v1,1)];
objectSTL3.vertex = [objectSTL1.vertex; objectSTL2.vertex];
objectSTL3.normals = objectSTL1.normals; objectSTL2.normals];

카테고리

Help CenterFile Exchange에서 STL (STereoLithography)에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by