pyiges


Namepyiges JSON
Version 0.3.1 PyPI version JSON
download
home_pagehttps://github.com/pyvista/pyiges
SummaryPythonic IGES reader
upload_time2023-07-05 14:42:01
maintainer
docs_urlNone
authorPyVista Developers
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            pyIGES
======
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
------------

``pyiges`` is offered in a "full" variant including the conversion features
and a "pure" parsing module variant.
The pure variant has no conversion features, no dependencies to ``pyvista,geomdl``,
and can be installed by removing the ``[full]`` specificator from the following commands.

Install with pip using:

.. code::

   pip install pyiges[full]

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

.. code:: bash

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

Note that the square brackets might need to be escaped or quoted when using ``zsh``.


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

.. code:: python

    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
~~~~~
.. image:: https://github.com/pyvista/pyiges/raw/main/docs/images/impeller_lines.png


Surfaces
~~~~~~~~
.. image:: https://github.com/pyvista/pyiges/raw/main/docs/images/impeller_surf.png



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 <https://wiki.eclipse.org/IGES_file_Specification#Rational_B-Spline_Curve_.28Type_126.29>`_,



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pyvista/pyiges",
    "name": "pyiges",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "PyVista Developers",
    "author_email": "info@pyvista.org",
    "download_url": "https://files.pythonhosted.org/packages/21/40/e63222163fbb722d487c5c96a5e0de9c74509012198011af809aa23992ea/pyiges-0.3.1.tar.gz",
    "platform": null,
    "description": "pyIGES\n======\nPython IGES reader with basic functionality to read an IGES file and\nconvert some entities to a ``pyvista`` or ``vtk`` mesh.\n\nThis module can read in and perform basic parsing of all entities and\ncan perform additional parsing and geometry visualization of the\nfollowing entities:\n\n- Vertex List (Type 502 Form 1)\n- Edge List\n- Loop (for specifying a bounded face for BREP geometries\n- Face\n- Circular arc\n- Rational B-Spline Surface\n- Rational B-Spline Curve\n- Conic Arc (Type 104)\n- Line\n- Point\n\n\nInstallation\n------------\n\n``pyiges`` is offered in a \"full\" variant including the conversion features\nand a \"pure\" parsing module variant.\nThe pure variant has no conversion features, no dependencies to ``pyvista,geomdl``,\nand can be installed by removing the ``[full]`` specificator from the following commands.\n\nInstall with pip using:\n\n.. code::\n\n   pip install pyiges[full]\n\nOtherwise, if you want the bleeding edge version, feel free to clone\nthis repo and install with:\n\n.. code:: bash\n\n   git clone https://github.com/pyvista/pyiges\n   cd pyiges\n   pip install .[full]\n\nNote that the square brackets might need to be escaped or quoted when using ``zsh``.\n\n\nUsage\n-----\nThe ``pyiges`` module can read in many entities as raw text, but only\nNURBS surfaces and bsplines can be converted to ``pyvista`` meshes.\n\n.. code:: python\n\n    import pyiges\n    from pyiges import examples\n\n    # load an example impeller\n    iges = pyiges.read(examples.impeller)\n\n    # print an invidiual entity (boring)\n    print(iges[0])\n\n    # convert all lines to a vtk mesh and plot it\n    lines = iges.to_vtk(bsplines=True, surfaces=False, merge=True)\n    lines.plot(color='w', line_width=2)\n\n    # convert all surfaces to a vtk mesh and plot it\n    mesh = iges.to_vtk(bsplines=False, surfaces=True, merge=True, delta=0.05)\n    mesh.plot(color='w', smooth_shading=True)\n    # control resolution of the mesh by changing \"delta\"\n\n    # save this surface to file\n    mesh.save('mesh.ply')  # as ply\n    mesh.save('mesh.stl')  # as stl\n    mesh.save('mesh.vtk')  # as vtk\n\n\nLines\n~~~~~\n.. image:: https://github.com/pyvista/pyiges/raw/main/docs/images/impeller_lines.png\n\n\nSurfaces\n~~~~~~~~\n.. image:: https://github.com/pyvista/pyiges/raw/main/docs/images/impeller_surf.png\n\n\n\nAcknowledgments\n---------------\nSubstantial code was obtained from or inspired by https://github.com/cfinch/IGES-File-Reader\n\nIGES reference definitions were obtained from `Eclipse IGES Wiki <https://wiki.eclipse.org/IGES_file_Specification#Rational_B-Spline_Curve_.28Type_126.29>`_,\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Pythonic IGES reader",
    "version": "0.3.1",
    "project_urls": {
        "Homepage": "https://github.com/pyvista/pyiges"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4242aa4af4b5c38d09adfc0cbbd076dcff710b10558f8675b9257b5932c2583e",
                "md5": "4c11414cb4954785fa7338fcce490487",
                "sha256": "74a89874649bc7cab139e1d8198cb8cb895537ff8693702d6feb9fb49d402ab5"
            },
            "downloads": -1,
            "filename": "pyiges-0.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4c11414cb4954785fa7338fcce490487",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 1033578,
            "upload_time": "2023-07-05T14:41:59",
            "upload_time_iso_8601": "2023-07-05T14:41:59.182148Z",
            "url": "https://files.pythonhosted.org/packages/42/42/aa4af4b5c38d09adfc0cbbd076dcff710b10558f8675b9257b5932c2583e/pyiges-0.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2140e63222163fbb722d487c5c96a5e0de9c74509012198011af809aa23992ea",
                "md5": "947b7db930a9eba9c7b3f9c1ec7cf79a",
                "sha256": "ff8a9d6d8c8b91a597d987194143482f4de74b54ca7ef03f2a29fca6ae39e6a4"
            },
            "downloads": -1,
            "filename": "pyiges-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "947b7db930a9eba9c7b3f9c1ec7cf79a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 1025883,
            "upload_time": "2023-07-05T14:42:01",
            "upload_time_iso_8601": "2023-07-05T14:42:01.087702Z",
            "url": "https://files.pythonhosted.org/packages/21/40/e63222163fbb722d487c5c96a5e0de9c74509012198011af809aa23992ea/pyiges-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-05 14:42:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pyvista",
    "github_project": "pyiges",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pyiges"
}
        
Elapsed time: 0.10098s