Package meshpy :: Module triangle
[hide private]
[frames] | no frames]

Module triangle

source code

Classes [hide private]
  MeshInfo
Functions [hide private]
 
subdivide_facets(subdivisions, points, facets, facet_markers=None)
Return a new facets array in which the original facets are each subdivided into subdivisions subfacets.
source code
 
build(mesh_info, verbose=False, refinement_func=None, attributes=False, volume_constraints=False, max_volume=None, allow_boundary_steiner=True, allow_volume_steiner=True, quality_meshing=True, generate_edges=None, generate_faces=False, min_angle=None, mesh_order=None)
Triangulate the domain given in `mesh_info'.
source code
 
refine(input_p, verbose=False, refinement_func=None, quality_meshing=True, min_angle=None) source code
 
write_gnuplot_mesh(filename, out_p, facets=False) source code
Function Details [hide private]

subdivide_facets(subdivisions, points, facets, facet_markers=None)

source code 

Return a new facets array in which the original facets are each subdivided into subdivisions subfacets.

This routine is useful if you have to prohibit the insertion of Steiner points on the boundary of your triangulation to allow the mesh to conform either to itself periodically or another given mesh. In this case, you may use this routine to create the necessary resolution along the boundary in a predefined way.

Parameters:
  • subdivisions - Either an int, indicating a uniform number of subdivisions throughout, or a list of the same length as facets, specifying a subdivision count for each individual facet.
  • points - A list of points referred to from the facets list.
  • facets - The list of old facets, in the form [(p1, p2), (p3,p4), ...].
  • facet_markers - Either None or a list of facet markers of the same length as facets.
Returns:
The new tuple (new_points, new_facets). (Or (new_points, new_facets, new_facet_markers) if facet_markers is not None.)