2022-12-26 11:29:32 +01:00
|
|
|
import ifcopenshell
|
2026-08-03 16:07:29 +05:00
|
|
|
from generate import normalize_header
|
2022-12-26 11:29:32 +01:00
|
|
|
|
2024-07-26 12:00:28 +10:00
|
|
|
for depth in (-1.0, 0.0, 1.0):
|
2022-12-26 11:29:32 +01:00
|
|
|
f = ifcopenshell.file(schema="IFC2X3")
|
|
|
|
|
f.createIfcExtrudedAreaSolid(
|
|
|
|
|
f.createIfcRectangleProfileDef(
|
2024-07-26 12:00:28 +10:00
|
|
|
"AREA", None, f.createIfcAxis2Placement2D(f.createIfcCartesianPoint((0.0, 0.0))), 1.0, 1.0
|
2022-12-26 11:29:32 +01:00
|
|
|
),
|
2024-07-26 12:00:28 +10:00
|
|
|
f.createIfcAxis2Placement3D(f.createIfcCartesianPoint((0.0, 0.0, 0.0))),
|
|
|
|
|
f.createIfcDirection((0.0, 0.0, 1.0)),
|
|
|
|
|
depth,
|
2022-12-26 11:29:32 +01:00
|
|
|
)
|
2026-08-03 16:07:29 +05:00
|
|
|
normalize_header(f)
|
2022-12-26 11:29:32 +01:00
|
|
|
f.write(f"{'pass' if depth > 0. else 'fail'}-extrusion-depth-{depth}-ifc2x3.ifc")
|