pyvista_cad.get_cad_edges

On this page

pyvista_cad.get_cad_edges#

get_cad_edges(poly)[source]#

Return the edges PolyData stashed on poly, if any.

Parameters:
polypyvista.PolyData

A mesh produced by flatten_to_cad_polydata().

Returns:
pyvista.PolyData or None

The companion edges mesh, or None.

Parameters:

poly (PolyData)

Return type:

PolyData | None

Examples

Recover the edges companion after flattening (requires the [step] extra):

>>> import build123d as b3d
>>> from pyvista_cad import (
...     topods_to_multiblock,
...     flatten_to_cad_polydata,
...     get_cad_edges,
... )
>>> mb = topods_to_multiblock(b3d.Box(10, 10, 10).wrapped)
>>> poly = flatten_to_cad_polydata(mb)
>>> edges = get_cad_edges(poly)
>>> type(edges).__name__
'PolyData'