trimesh_dual

compas_cgal.meshing.trimesh_dual(mesh, length_factor=1.0, number_of_iterations=10, angle_radians=0.9, scale_factor=1.0, fixed_vertices=[])[source]

Create a dual mesh from a triangular mesh with variable-length faces.

Parameters:
meshcompas_cgal.types.VerticesFaces

The mesh to create a dual from.

angle_radiansdouble, optional

Angle limit in radians for boundary vertices to remove.

length_factordouble, optional

Length factor for remeshing.

number_of_iterationsint, optional

Number of remeshing iterations.

scale_factordouble, optional

Scale factor for inner vertices.

fixed_verticeslist[int], optional

List of vertex indices to keep fixed during remeshing.

Returns:
tuple

A tuple containing:

  • Remeshed mesh vertices as an Nx3 numpy array.

  • Remeshed mesh faces as an Mx3 numpy array.

  • Dual mesh vertices as an Nx3 numpy array.

  • Variable-length faces as a list of lists of vertex indices.

Notes

This dual mesh implementation includes proper boundary handling by: 1. Creating vertices at face centroids of the primal mesh 2. Creating additional vertices at boundary edge midpoints 3. Creating proper connections for boundary edges