1

I have gone through a research paper "Applying novelty detection to identify model element to IFC class misclassifications on architectural and infrastructure Building Information Models", published in Journal of Computational Design and Engineering (2018), which extracts data from IFC file for the analysis. I am able to extract area, volume and gyradius using IfcOpenShell and pythonOCC. How do I extract orientation from top and bottom of an Ifc element mentioned in this paper?

I used the example given here to extract orientation of Ifc entity.

import ifcopenshell
import ifcopenshell.geom

ifc_file = ifcopenshell.open('Duplex_A_20110907_optimized.ifc')

# Settings to specify usage of pyOCC
settings = ifcopenshell.geom.settings()
settings.set(settings.USE_PYTHON_OPENCASCADE, True)

walls = ifc_file.by_type("IfcWall")

shape = ifcopenshell.geom.create_shape(settings, walls[0])
orientation = shape.geometry.Orientation()
print(orientation)

I am getting "0" for all Ifc entities. It seems I am calling wrong function to get the Orientation.

Vertexwahn
  • 7,709
  • 6
  • 64
  • 90
  • Most probably "0" is `TopAbs_FORWARD` (see "TopAbs_Orientation.hxx" in the Open CASCADE code). Could it be that with "orientation" you mean something different than the CAD kernel does? – Benjamin Bihler Jul 02 '19 at 06:55

0 Answers0