mpacts.geometrygenerators. subdivide

In order to be able to use this module import it like this:

import mpacts.geometrygenerators.subdivide
#or assign it to a shorter name
import mpacts.geometrygenerators.subdivide as sub
mpacts.geometrygenerators.subdivide.find_edge(edge, edges)

returns index of edge in list of edges, or -1 if not found. Edges must be sorted!


Calculates vertices and edges when subdividing a triangular meshed polyhedron (ico). Edges are lexicographically sorted. The polyhedron is immediately changed!


Subdivides a regular polyhedron - icosahedron or icosphere - to the next level of refinement. The polyhedron is immediately changed! Parameters:

ico is expected to have lists of ‘vertices’ and ‘edges’

Constructs faces (triangles) from a lexicographically sorted list of edges. The polyhedron is immediately changed!