pyvista_cad.read_three_mf#
- read_three_mf(path, /, **_)[source]#
Read a 3MF file as a
pyvista.MultiBlock.Each
<object>in the 3MF package becomes one block. Block names match the object name when set; otherwiseobject_<n>.field_data['cad.units']records the document unit ('micron','mm','cm','inch','foot','m').- Parameters:
- pathstr or os.PathLike
Path to a
.3mffile.- **_Any
Forward-compat keyword arguments are accepted and ignored.
- Returns:
- pyvista.MultiBlock
One block per mesh object.
- Parameters:
- Return type:
Examples
Read the bundled two-part 3MF assembly fixture:
>>> import pyvista_cad >>> from pyvista_cad import read_three_mf >>> mb = read_three_mf(pyvista_cad.examples.assembly_3mf_path()) >>> type(mb).__name__ 'MultiBlock' >>> str(mb.field_data['cad.source_format'][0]) '3mf'