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
Surfaces
Acknowledgments
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyiges-0.2.1.tar.gz
.
File metadata
- Download URL: pyiges-0.2.1.tar.gz
- Upload date:
- Size: 1.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.3 pkginfo/1.8.2 requests/2.27.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ef17d42370ba01f58fbecc6228bf293f6feb7457ebf0026844e2cec2db622dc |
|
MD5 | bcb4d90e78c8a945c10e1097e3b49d79 |
|
BLAKE2b-256 | c56fc7f08ce8dafcebf724aba7aea34f9904a4693d45eeb8b7e7d403d1031e81 |
File details
Details for the file pyiges-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: pyiges-0.2.1-py3-none-any.whl
- Upload date:
- Size: 1.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.3 pkginfo/1.8.2 requests/2.27.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb78fd8fd0c8bb2af7e36f61943cfcfec5e2a5fab5941143b540465b8a03139a |
|
MD5 | 13906a467ea2550823b0522e73da91bc |
|
BLAKE2b-256 | 2122297685ac679cba229adbc318cb3bdcbe3bd0620a296369efa030170f6151 |