What does in the stlwrite command the optional argument SolidIndex exactly do?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hikmet Eren
le 20 Fév 2020
Commenté : Hikmet Eren
le 20 Avr 2020
Can anyone explain me how the SolidIndex argument works in the stlwrite command. I don't really understand the explanation for this issue in the respective documentation and still even don't have a rudimental clue for what it's good for...
0 commentaires
Réponse acceptée
Chidvi Modala
le 14 Avr 2020
stlwrite(TR, filename) writes a triangulation TR to a binary STL file 'filename' in the order left to right. For example
P = [2.5 8.0; 6.5 8.0; 2.5 5.0; 6.5 5.0; 1.0 6.5; 8.0 6.5];
T = [5 3 1; 3 2 1; 3 4 2; 4 6 2];
TR = triangulation(T,P);
triplot(TR)
stlwrite(TR,'tritext.stl','text')
You can execute the above code, and open tritext.stl file. You can see that the order in which the triangles are defined in tritext.stl is from left to right as shown below
You can use 'SolidIndex' name-value pair to include a vector of identification.
stlwrite(TR,'tritext.stl','text','SolidIndex',[1 4 3 2])
You can replace the last line of previous example code with the above piece of code, and open tritext.stl file. You can see that the order in which the triangles are defined, is based on the 'SolidIndex' as shown below
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Read, Write, and Modify Image dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!