필터 지우기
필터 지우기

How to rescale a 3d object (Stl file) ?

조회 수: 3 (최근 30일)
Sleh Eddine Brika
Sleh Eddine Brika 2016년 10월 4일
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:
  1. Read the stl file : get the vertices and the faces
  2. Calculate the normal of each faces.
  3. 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개)

카테고리

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