If you're reading this, we've just migrated servers! If anything looks broken please email dion@thinkmoult.com :)
IFCWindow normal according to World
I wonder if someone knows how to get IFCWindow normals according to World in a Python script?
Tagged:
Comments
@Max curious to know if you had this worked out? I am also trying to get normals through a python script.
I use two methods:
1. Search for the largest surface, usually this is a window pane and use the normal direction for this surface.
2. Make a bounding box around the window and use method 1 on on this box.
I became curious, could you share some snippets of your python script?
I use something like this
In IFC, Windows should have their local +Y direction as its normal. So it should be as simple as this in Blender:
Or if you want to get it directly in IFC you can do (it's a numpy array):
Hi @coen I am yet to get this script done. What I am trying to do is to first find the vertical face of an
ifcDiscreteAccessory
that has the least surface area and then get the direction of the normal for that particular face. I am trying to doing this through ifcopenshell and pythonOCC. Will share the script once doneYou might want to investigate some of the code in
ifcopenshell.util.shape
which provides convenience functions for calculating areas and isolating by normal.