Import stl. and turn into planes

I'm writing a programme that involves the use of a 3d virtual space. I'm aware of stl. tools functions that will import a space in stl. format and return vectors of faces, vertices, edges and or face normals.
i.e. [V E F] = stlImport('filename');
However, I have to do other geometric operations on the walls of the space, which are much easier to do when the sides of the shape are defined as planes.
P.S. by 'plane' I mean:
PLANE = [X0 Y0 Z0 DX1 DY1 DZ1 DX2 DY2 DZ2], with - (X0, Y0, Z0) is a point belonging to the plane - (DX1, DY1, DZ1) is a first direction vector - (DX2, DY2, DZ2) is a second direction vector
Does anyone know of an easy way to turn the [v e f] set of data from an imported .stl into planes?
Thanks.

1 Comment

The faces are triangles. For each face, you have three vertices. Pick one. That's your point. The difference between sequential vertices are your vectors in the plane. I don't know where we're going from there.

Sign in to comment.

Answers (0)

Asked:

on 1 Nov 2017

Commented:

DGM
on 1 Apr 2025

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!