How to orient multiple STL files the same way?
이전 댓글 표시
Hello! I need to take in multiple STL files and orient the 3D model from them to appear the same way each time (i.e: rotating and flipping 3D models so they all look the same, despite some slight size changes).
For instance, I'd like to make the right image get automatically rotated/flipped around to look like the left image. Dragging the plot to a viewpoint that's the same as the left image doesn't give the same output like one would think. The coordinates are completely different. Say, for instance, the far left point circled in red on the left image would have the coords (-143, 52, 2). The right image would be (18, -89, 2).

I've seen it attempted with pictures in this post, but I'm unsure how to do it with an STL file/3D model: https://www.mathworks.com/matlabcentral/answers/406732-how-it-is-possible-to-change-all-images-orientation-to-same-i-e-to-vertical?s_tid=srchtitle
I've also used this video to help me rotate the file, but it didn't seem to help me in the way that I wanted: https://www.youtube.com/watch?v=7cGqKRL1lC0
I really appreciate any sort of help or anywhere to look to do this sort of thing. :) Thank you!
댓글 수: 4
Elizabeth Kolb
2021년 7월 2일
Chunru
2021년 7월 5일
There are few possible ways:
- Modify the code to do rotation around x-axis;
- Have a double loop to rotate both around x- and z-axis to find the best match;
- For a more general orientation, you can find a bounding-box of the object and then orientate the bounding box (instead of the object): https://www.mathworks.com/matlabcentral/fileexchange/18264-minimal-bounding-box
Elizabeth Kolb
2021년 7월 6일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Assembly에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

