Fix ifcopenshell.file calls in rules fixtures, use simpler schema postfix

This commit is contained in:
Andrej730
2026-08-03 15:16:27 +05:00
parent 6edea83137
commit 8f67b905eb
9 changed files with 11 additions and 10 deletions
+2 -2
View File
@@ -6,11 +6,11 @@ segs = [
lambda f: [f.createIfcLineIndex((1, 2)), f.createIfcLineIndex((1, 2))],
]
for schema in ("ifc4", "ifc4x3_add1"):
for schema in ("IFC4", "IFC4X3"):
for i, seg in enumerate(segs):
f = ifcopenshell.file(schema=schema)
s = seg(f)
f.createIfcIndexedPolyCurve(f.createIfcCartesianPointList2D([(0.0, 0.0), (0.0, 1.0), (1.0, 1.0)]), s)
f.write(
f'{"fail" if i == 2 else "pass"}-poly-curve-{"no-segments" if s is None else "-".join(["-".join(map(str, x[0])) for x in s])}-{schema}.ifc'
f'{"fail" if i == 2 else "pass"}-poly-curve-{"no-segments" if s is None else "-".join(["-".join(map(str, x[0])) for x in s])}-{schema.lower()}.ifc'
)