Get openings in walls #4470
-
With settings.set(settings.DISABLE_OPENING_SUBTRACTIONS, True) I get walls in my model without the openings. BTW, Is there a complete course/manual for python programming of ifcOpensHell. I feel quite clumsy asking these beginners questions. Regards, Jur |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The reason there isn't "complete" documentation is because IfcOpenShell's API is largely generated from the IFC schema itself. So to understand all possible relationships and attributes and so on you need to read the IFC docs. So for example in the IFC documentation they describe how openings use the HasOpenings attribute: https://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/concepts/Object_Composition/Element_Voiding/Element_Openings/content.html We can apply this as follows to get openings: openings = [r.RelatedOpeningElement for r in wall.HasOpenings] After that you can run the geometry iterator on those openings just like you would any element. Then you can also use ifcopenshell.util.shape to calculate things like width and height and so on. |
Beta Was this translation helpful? Give feedback.
The reason there isn't "complete" documentation is because IfcOpenShell's API is largely generated from the IFC schema itself. So to understand all possible relationships and attributes and so on you need to read the IFC docs.
So for example in the IFC documentation they describe how openings use the HasOpenings attribute: https://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/concepts/Object_Composition/Element_Voiding/Element_Openings/content.html
We can apply this as follows to get openings:
After that you can run the geometry iterator on those openings just like you would any element. Then you can also use …