pyvista_cad.plot_cad#
- plot_cad(obj, **kwargs)[source]#
One-shot CAD-friendly plot of
obj(mirrorsmesh.plot()).Builds a
pyvista.Plotter, callsadd_cad(), and shows it.show-level keywords (screenshot,cpos,off_screen,window_size,jupyter_backend,return_cpos) are split out and forwarded topyvista.Plotter.show(); everything else goes toadd_cad().- Parameters:
- objAny
Anything
add_cad()accepts.- **kwargs
Split between
add_cad()andpyvista.Plotter.show().
- Returns:
- Any
Whatever
pyvista.Plotter.show()returns.
- Parameters:
- Return type:
Examples
One-shot CAD plot of a build123d box (requires the
[step]extra):>>> import pyvista as pv >>> pv.OFF_SCREEN = True >>> import build123d as b3d >>> from pyvista_cad import plot_cad >>> cpos = plot_cad(b3d.Box(10, 10, 10).wrapped, return_cpos=True) >>> type(cpos).__name__ 'CameraPosition'