mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
44ce7c7e8a
- to avoid some diffs on regeneration - some fixtures had problems with the header, so `fail` for them wasn't really testing the intended case, because small issues in the header would make fixture fail regardless
16 lines
580 B
Python
16 lines
580 B
Python
import ifcopenshell
|
|
from generate import normalize_header
|
|
|
|
for depth in (-1.0, 0.0, 1.0):
|
|
f = ifcopenshell.file(schema="IFC2X3")
|
|
f.createIfcExtrudedAreaSolid(
|
|
f.createIfcRectangleProfileDef(
|
|
"AREA", None, f.createIfcAxis2Placement2D(f.createIfcCartesianPoint((0.0, 0.0))), 1.0, 1.0
|
|
),
|
|
f.createIfcAxis2Placement3D(f.createIfcCartesianPoint((0.0, 0.0, 0.0))),
|
|
f.createIfcDirection((0.0, 0.0, 1.0)),
|
|
depth,
|
|
)
|
|
normalize_header(f)
|
|
f.write(f"{'pass' if depth > 0. else 'fail'}-extrusion-depth-{depth}-ifc2x3.ifc")
|