Files
IfcOpenShell/src/ifcopenshell-python/test/fixtures/rules/generate_01.py
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
551 B
Python
Raw Normal View History

2022-12-26 11:29:32 +01:00
import ifcopenshell
2024-07-26 12:00:28 +10:00
for i, box_alignment in enumerate(["top-left", "center", "invalid", "CENTER"]):
2022-12-26 11:29:32 +01:00
f = ifcopenshell.file(schema="IFC2X3")
f.createIfcTextLiteralWithExtent(
"My presentable text",
2024-07-26 12:00:28 +10:00
f.createIfcAxis2Placement2D(f.createIfcCartesianPoint((0.0, 0.0))),
"RIGHT",
f.createIfcPlanarExtent(10.0, 10.0),
box_alignment,
2022-12-26 11:29:32 +01:00
)
suffix = "-uppercase" if box_alignment == "CENTER" else ""
f.write(f"{'pass' if i in (0,1,3) else 'fail'}-{i}-box-alignment-{box_alignment}{suffix}-ifc2x3.ifc")