pyvista_cad.as_cad_multiblock#
- as_cad_multiblock(obj, *, linear_deflection=0.1, angular_deflection=0.5, feature_angle=30.0)[source]#
Resolve
objto a{'faces', 'edges'}pyvista.MultiBlock.The same resolution
add_cad()performs, but returned as data instead of rendered:facesis a per-face / per-block MultiBlock carrying analytic normals,edgesthe topological B-rep curves (or feature edges for a mesh with no B-rep origin).- Parameters:
- objAny
Anything
add_cad()accepts.- linear_deflection, angular_deflectionfloat
Tessellation tolerances if
objis not yet meshed.- feature_anglefloat, default: 30.0
Crease angle for the no-B-rep feature-edge fallback.
- Returns:
- pyvista.MultiBlock
{'faces': MultiBlock | PolyData, 'edges': PolyData}.
- Parameters:
- Return type:
Examples
Resolve a build123d box to faces/edges blocks (requires the
[step]extra):>>> import build123d as b3d >>> from pyvista_cad import as_cad_multiblock >>> cad = as_cad_multiblock(b3d.Box(10, 10, 10).wrapped) >>> type(cad).__name__ 'MultiBlock' >>> sorted(cad.keys()) ['edges', 'faces']