mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-15 18:14:08 +00:00
rules fixture: nornallize headers
- 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
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import ifcopenshell
|
||||
from generate import normalize_header
|
||||
|
||||
coords = [(0.0, 0.0), (10.0, 0.0), (10.0, 10.0), (0.0, 10.0)]
|
||||
make_3d = lambda cs: [c + (0.0,) for c in cs]
|
||||
@@ -10,6 +11,7 @@ map = lambda fn, *args: list(old_map(fn, *args))
|
||||
|
||||
f = ifcopenshell.file(schema="IFC2X3")
|
||||
f.createIfcAxis2Placement3D(f.createIfcCartesianPoint((0.0, 0.0, 0.0)))
|
||||
normalize_header(f)
|
||||
f.write(f"pass-axis2-3d-pos-ifc2x3.ifc")
|
||||
|
||||
f = ifcopenshell.file(schema="IFC2X3")
|
||||
@@ -18,6 +20,7 @@ f.createIfcAxis2Placement3D(
|
||||
f.createIfcDirection((0.0, 0.0, 1.0)),
|
||||
f.createIfcDirection((1.0, 0.0, 0.0)),
|
||||
)
|
||||
normalize_header(f)
|
||||
f.write(f"pass-axis2-two-directions-ifc2x3.ifc")
|
||||
|
||||
f = ifcopenshell.file(schema="IFC2X3")
|
||||
@@ -26,6 +29,7 @@ f.createIfcAxis2Placement3D(
|
||||
Axis=f.createIfcDirection((0.0, 0.0, 1.0)),
|
||||
RefDirection=None,
|
||||
)
|
||||
normalize_header(f)
|
||||
f.write(f"fail-axis2-only-axis-ifc2x3.ifc")
|
||||
|
||||
f = ifcopenshell.file(schema="IFC2X3")
|
||||
@@ -34,6 +38,7 @@ f.createIfcAxis2Placement3D(
|
||||
Axis=None,
|
||||
RefDirection=f.createIfcDirection((1.0, 0.0, 0.0)),
|
||||
)
|
||||
normalize_header(f)
|
||||
f.write(f"fail-axis2-only-ref-ifc2x3.ifc")
|
||||
|
||||
f = ifcopenshell.file(schema="IFC2X3")
|
||||
@@ -42,12 +47,14 @@ f.createIfcAxis2Placement3D(
|
||||
f.createIfcDirection((1.0, 0.0)),
|
||||
f.createIfcDirection((0.0, 1.0, 0.0)),
|
||||
)
|
||||
normalize_header(f)
|
||||
f.write(f"fail-axis2-2d-axis-ifc2x3.ifc")
|
||||
|
||||
f = ifcopenshell.file(schema="IFC2X3")
|
||||
f.createIfcAxis2Placement3D(
|
||||
f.createIfcCartesianPoint((0.0, 0.0)),
|
||||
)
|
||||
normalize_header(f)
|
||||
f.write(f"fail-axis2-2d-pos-ifc2x3.ifc")
|
||||
|
||||
f = ifcopenshell.file(schema="IFC2X3")
|
||||
@@ -56,6 +63,7 @@ f.createIfcAxis2Placement3D(
|
||||
f.createIfcDirection((0.0, 0.0, 1.0)),
|
||||
f.createIfcDirection((1.0, 0.0)),
|
||||
)
|
||||
normalize_header(f)
|
||||
f.write(f"fail-axis2-2d-ref-ifc2x3.ifc")
|
||||
|
||||
f = ifcopenshell.file(schema="IFC2X3")
|
||||
@@ -64,6 +72,7 @@ f.createIfcAxis2Placement3D(
|
||||
Axis=f.createIfcDirection((0.0, 0.0, 1.0)),
|
||||
RefDirection=f.createIfcDirection((0.0, 0.0, 1.0)),
|
||||
)
|
||||
normalize_header(f)
|
||||
f.write(f"fail-axis2-parallel-axes.ifc")
|
||||
|
||||
f = ifcopenshell.file(schema="IFC2X3")
|
||||
@@ -72,4 +81,5 @@ f.createIfcAxis2Placement3D(
|
||||
Axis=f.createIfcDirection((0.0, 0.0, 1.0)),
|
||||
RefDirection=f.createIfcDirection((0.0, 0.0, -1.0)),
|
||||
)
|
||||
normalize_header(f)
|
||||
f.write(f"fail-axis2-anti-parallel-axes.ifc")
|
||||
|
||||
Reference in New Issue
Block a user