map_pattern_to_mesh

map_pattern_to_mesh(name, mesh, clip_boundaries=True, tolerance=1e-06, pattern_u=16, pattern_v=16, simplify_borders=True, fixed_vertices=None)[source]

Map a 2D pattern mesh onto a 3D target.

Parameters:
namestr

The name of the pattern to be created. Options are:

  • “Hex”

  • “Tri”

  • “Octo”

  • “Square”

  • “Rhombus”

  • “HexTri”

  • “DissectedSquare”

  • “DissectedTriangle”

  • “DissectedHexQuad”

  • “DissectedHexTri”

  • “Floret”

  • “Pythagorean”

  • “Brick”

  • “Weave”

  • “ZigZag”

  • “HexBigTri”

  • “Dodeca”

  • “SquareTri”

meshcompas.datastructures.Mesh

The target mesh.

clip_boundariesbool, optional

Whether to clip the pattern mesh to the boundaries of the target mesh. Default is True.

tolerancefloat, optional

The tolerance for point comparison, to remove duplicates. Default is 1e-6.

pattern_uint, optional

The number of pattern vertices in the u direction. Default is 16.

pattern_vint, optional

The number of pattern vertices in the v direction. Default is 16.

simplify_bordersbool, optional

Whether to simplify the border of the pattern mesh. Default is True.

fixed_verticeslist[list[float]], optional

A list of fixed points on the target mesh. Default is None.

Returns:
compas.datastructures.Mesh

The mapped pattern mesh.

Raises:
ValueError

If the specified pattern name is not supported.