stl fusion of two files

16 ビュー (過去 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 Center および File ExchangeSTL (STereoLithography) についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by