pyvista_cad.CadMultiBlockAccessor.tessellate

pyvista_cad.CadMultiBlockAccessor.tessellate#

CadMultiBlockAccessor.tessellate(*, linear_deflection=None, angular_deflection=0.5)[source]#

Re-tessellate the combined assembly from its cached B-rep.

Combines the assembly to a single surface and re-meshes it from the cached originating TopoDS_Shape at the requested deflections, returning fresh geometry rather than the existing triangulation. Raises if no cached B-rep origin is present instead of silently degrading to the current facets.

Parameters:
linear_deflectionfloat, optional

Maximum chordal deviation, in dataset units. When None, defaults to 0.001 of the bounding-box diagonal.

angular_deflectionfloat, default: 0.5

Maximum angle (radians) between adjacent facet normals.

Returns:
pyvista.PolyData

The freshly tessellated surface, carrying cad.linear_deflection / cad.angular_deflection.

Raises:
pyvista_cad.CadError

If no cached originating TopoDS_Shape is associated with the combined mesh.

Parameters:
  • linear_deflection (float | None)

  • angular_deflection (float)

Return type:

PolyData

Examples

>>> import pyvista_cad
>>> from pyvista_cad import examples
>>> asm = pyvista_cad.read_step(examples.step_cube)
>>> asm.cad.has_brep_origin
True
>>> fine = asm.cad.tessellate(linear_deflection=0.05)
>>> fine.n_cells > 0
True