ddg.optimize.he.functionals.planar_faces_energy module
- class ddg.optimize.he.functionals.planar_faces_energy.PlanarFacesEnergy(surface, attr_name, attr_dimension=None, boundary_cells={})[source]
Bases:
HalfEdgeFunctionalMeasures the non-planarity of the faces of a discrete surface using their volume.
- evaluate(x)[source]
The evaluate function creates a convex hull for each face using scipy.spatial.ConvexHull which uses the Qhull algorithm (qhull.org) and then evaluates the volume of each face. The errors in the Qhull algorithm each start with the ID “QH6…”. “QH6154” refers to the error where the inputs for the convex hull are already planar. In this method, this specific error is bypassed for obvious reasons.
- property interior_cells
Method to distinguish the interior cells of the surface from the specified boundary cells. Equal to the complement of boundary_cells attribute in the surface.