wrap.projectMesh

wrap.projectMesh(geomSrc, geomDst, maxRelativeDist = 1.0, disabledPolygonIndicesSrc = [], checkNormalsCompatibility = True)

Project geomSrc onto geomDst using ray-tracing.

Parameters:

geomSrc, geomDst : wrap.Geom

Geometry to project from and to

maxRelativeDist : number, optional

Limits the maximum distance of projection, defaults to 1.0

It is useful to reduce the value if there are some artifacts occur during projection on such areas like mouth, eyes, ears etc. The actual maximum distance is computed as maxRelativeDist * medianNearestPointDist, where medianNearestPointDist is median distance from mesh point to nearest neighbour point.

disabledPolygonIndicesSrc : list of int, optional

The list of indices of polygons on geomSrc that should not be modified during projection.

checkNormalsCompatibility : bool, optional

If True the vertex only projects on a polygon that has normal direction similar to the vertex’s one. That leads to less artifacts on thin surfaces. Defaults to True.

Returns:

result : wrap.Geom

Return new geometry that is the copy of geomSrc with vertex positions projected onto geomDst.