Skip to main content

Pythonic IGES reader

Project description

Python IGES reader with basic functionality to read an IGES file and convert some entities to a pyvista or vtk mesh.

This module can read in and perform basic parsing of all entities and can perform additional parsing and geometry visualization of the following entities:

  • Vertex List (Type 502 Form 1)

  • Edge List

  • Loop (for specifying a bounded face for BREP geometries

  • Face

  • Circular arc

  • Rational B-Spline Surface

  • Rational B-Spline Curve

  • Conic Arc (Type 104)

  • Line

  • Point

Installation

Install with pip using:

pip install pyiges

Otherwise, if you want the bleeding edge version, feel free to clone this repo and install with:

git clone https://github.com/pyvista/pyiges
cd pyiges
pip install .

Usage

The pyiges module can read in many entities as raw text, but only NURBS surfaces and bsplines can be converted to pyvista meshes.

import pyiges
from pyiges import examples

# load an example impeller
iges = pyiges.read(examples.impeller)

# print an invidiual entity (boring)
print(iges[0])

# convert all lines to a vtk mesh and plot it
lines = iges.to_vtk(bsplines=True, surfaces=False, merge=True)
lines.plot(color='w', line_width=2)

# convert all surfaces to a vtk mesh and plot it
mesh = iges.to_vtk(bsplines=False, surfaces=True, merge=True, delta=0.05)
mesh.plot(color='w', smooth_shading=True)
# control resolution of the mesh by changing "delta"

# save this surface to file
mesh.save('mesh.ply')  # as ply
mesh.save('mesh.stl')  # as stl
mesh.save('mesh.vtk')  # as vtk

Lines

https://github.com/pyvista/pyiges/raw/master/docs/images/impeller_lines.png

Surfaces

https://github.com/pyvista/pyiges/raw/master/docs/images/impeller_surf.png

Acknowledgments

Sample impeller was obtained from http://3dgallery.gks.com/2013/impeller/igs.php

Substantial code was obtained from or inspired by https://github.com/cfinch/IGES-File-Reader

IGES reference definitions were obtained from Eclipse IGES Wiki,

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyiges-0.1.3.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

pyiges-0.1.3-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file pyiges-0.1.3.tar.gz.

File metadata

  • Download URL: pyiges-0.1.3.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.9

File hashes

Hashes for pyiges-0.1.3.tar.gz
Algorithm Hash digest
SHA256 8fb5036be9d6321bb6fc7634a1a048c7c33b7eff4bd3233f80060a0225b9dd3f
MD5 c663025f75cfb63ba721d38a5732664c
BLAKE2b-256 298b55cc00bc9a6dbd4d9e12a3177f077912f371e56e5970ccab5b38a1092a61

See more details on using hashes here.

File details

Details for the file pyiges-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pyiges-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.9

File hashes

Hashes for pyiges-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 077708c1f2f2bdda69d559d15239a0ae83f32c8c4eb8c9bd6a781fd5fb1b05a8
MD5 630f54d049c4166a208f63012d2f43b8
BLAKE2b-256 9eb815a4e515b9e1cab99da3f9fa54be47317f88b141090c05310444dd7cb106

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page