I would like to do a 2D projection from a 3D geometry saved in a stl file and know the distance between the two projected planes. In order to explain better the concept I will start with an almost ideal model or simple example:

  • Let's say I have a minimal cube model such as the vertex are comprissed between x=-+1, y=-+1 and z=-+1. Therefore, I have 8 vertex, and I have 12 faces (triangles). If I want to get the projection of the cube at the middle point of z. I will end up with 2 triangles and 4 vertex, being x=-+1, y=-+1 and z=0. I also will now that the distance between the z planes of the projection are 2 in all the vertexs (whatever the units).

Now the real problem:

  • I have a 3D fracture of a surface (in .stl format). The z planes are in this case curve surfaces (more or less parallel walls) and therefore they are not in an exact position. Something similar as what I am trying to convey can be found here https://www.mdpi.com/1996-1073/11/6/1409/htm (figure 6 b, or 6d or 6f).

I am wondering if somebody has an idea of how I can do a 2D plane from the 3D plane (in stl format) and know the distance between the two irregular curve surface walls. Any software (if free better), or library for coding such thing could be helpful.


Best regards,


  • 1
    $\begingroup$ For the projection. the standard approach is to rotate on all points such that the projection plane aligns with the xy-plane and then set the z-coordinate to 0. Then you rotate the points back to the projection plane. The point-to-point distance can then be measured and a norm found using your preferred metric. $\endgroup$ Jun 21 at 22:22
  • $\begingroup$ Thanks @Banerjee is there a place where it is completely specify the standard approach. Since I think I get it. I also wonder if there is an specific place where it is explained in case I did not get it. But really thanks. $\endgroup$
    – Daniel
    Jun 22 at 9:54
  • $\begingroup$ I'm sure an article can be found on the web, but this process has been used for more than 30 years (such things were considered too straightforward to merit publication). You can write the article when you've solved the problem to your satisfaction :) There are issues such as overlapping triangles that need to be considered. $\endgroup$ Jun 22 at 23:47


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.