How to combine adjacent coplanar faces on a grid

I am looking for a method / algorithm that will allow me to combine several adjacent coplanar faces on a 3d mesh into one face. I hope this optimizes my grid generation program, because now it generates a lot of β€œsmall” triangles. When I look at the last 3D object on the screen, I see that they are all oriented in the same direction, and they can be replaced with one large triangle covering the entire batch! Hope this is clear what I'm trying to do. Thank you for your help.

+5
source share
2 answers

I would advise you to project the faces on one plane, and then apply the polygon algorithm to delete on the plane . After that, "unproject" and what it is. Always try to downsize whenever possible.

+2
source

I am also trying to do a similar approach. There is a feature in the Sympy library that could do this.

http://docs.sympy.org/latest/_modules/sympy/geometry/plane.html#Plane.is_coplanar

0
source

All Articles