Create a different type of roofs
Hi all,
I am trying to create a roof from 3d coordinates with IfcOpenShell python. My approach:
- calculate a normal vector for each slab of roof
- make IfcExtrudedAreaSolid with IfcAxis2Placement3 corresponding to new z-axis (normal vector) and point rotated in new coord system.
- union all of slabs
Code for each slab
slab_line = ifcfile.createIfcPolyline(coords)
ifcclosedprofile = ifcfile.createIfcArbitraryClosedProfileDef("AREA", None, slab_line)
point = rotate_z_axis((0.0, 0.0, height + elevation), normal)
slab_solid = ifcfile.createIfcExtrudedAreaSolid(ifcclosedprofile, create_ifcaxis2placement(ifcfile, point, dir1=norm), ifcfile.createIfcDirection(Z), 1)
Is it work approach for different type of roofs?
Tagged: