pyvista / pyiges

Python IGES Reader
https://pyvista.github.io/pyiges/
MIT License
33 stars 8 forks source link

Question: Identification of geometries like cylinders and spheres #9

Open math-artist opened 3 years ago

math-artist commented 3 years ago

Wow! I can't believe that I didn't see this before. I currently have a dependency to a huge library just to be able to import step files, but iges is just as good and I could get rid of OCC.

I am not familiar with how iges files are structured, but how difficult is it to extract entities from an iges file? For example, find a cylinder surface and extract its topology (orientation, diameter, length, center). Usually what I do with step files is I import all faces in a dict of Geometry, each having its own mesh and topology.

I had a look at your code and found an entity code 122 for cylinder but I could not even find those codes in my iges file, which contains many cylinders.

akaszynski commented 3 years ago

It's not too difficult to extract entities from an IGES file, it just takes some time to add the class/method to extract it. Right now, IGES is low on the priority list for me since it's effectively a dead format. I really wish there was a lightweight STEP/Parasolid library, since as of now Open Cascade is a pain to install without anaconda.

Feel free to try to add the feature or ask me for pointers.