pyvista_cad.read_iges#
- read_iges(path, /, *, backend='pyiges', bsplines=True, surfaces=True, lines=False, points=False, delta=0.025, linear_deflection=0.1, angular_deflection=0.5, **_)[source]#
Read an IGES file and return a pyvista dataset.
- Parameters:
- pathstr or os.PathLike
Path to an IGES (
.iges/.igs) file.- backend{‘pyiges’, ‘ocp’}, default: ‘pyiges’
Which reader to use.
'pyiges'wrapspyiges.read(path).to_vtk(...)and recovers the per-entity IGES level.'ocp'wraps OCCT’sIGESControl_Reader: much faster on large files and it respects trimmed-surface boundaries, but it recovers no level metadata.- bsplinesbool, default: True
Tessellate BSpline surfaces.
'pyiges'backend only.- surfacesbool, default: True
Include analytic surfaces.
'pyiges'backend only.- linesbool, default: False
Include line/curve entities.
'pyiges'backend only.- pointsbool, default: False
Include isolated point entities.
'pyiges'backend only.- deltafloat, default: 0.025
Tessellation step for geomdl.
'pyiges'backend only.- linear_deflectionfloat, default: 0.1
OCCT chordal tessellation tolerance (model units).
'ocp'backend only.- angular_deflectionfloat, default: 0.5
OCCT angular tessellation tolerance (radians).
'ocp'backend only.- **_Any
Forward-compat keyword arguments are accepted and ignored.
- Returns:
- pyvista.DataSet
Tessellated dataset.
'pyiges'returnsPolyDataorMultiBlockdepending on the IGES content;'ocp'always returnsPolyData.
- Raises:
- FileNotFoundError
If
pathdoes not exist.- pyvista_cad.CadReadError
If parsing fails.
- pyvista_cad.OptionalDependencyError
If the selected backend is not installed, or
backendnames an unknown reader.
- Parameters:
- Return type:
pv.DataSet