How to rescale a 3d object (Stl file) ?
5 views (last 30 days)
Show older comments
I have a STL file, I read it and then I have to rescale or resize the 3d object. Basically each surface has to move according to the direction of its normal by a given distance. For example a cube of dimension 10mm*10mm*10mm, we want to add 2mm to each surface to get a cube of 12mm*12mm*12mm. I succeeded to implement an algorithm that works with simple geometry but when the object have curves it does work pretty well. My current algorithm is:
- Read the stl file : get the vertices and the faces
- Calculate the normal of each faces.
- Multiple the coordinates of each face's vertices by the normal of this face (Without repetition : 2 coplanar faces share a vertex, this vertex will just moves once according to this direction)
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!