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.

18 lines
651 B
Python
Raw Normal View History

2022-12-26 11:29:32 +01:00
import ifcopenshell
from ...fixture_generate import normalize_header, pass_if, write_fixture
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 ""
2026-08-03 16:07:29 +05:00
normalize_header(f)
write_fixture(f, __file__, pass_if(i in (0, 1, 3)), f"{i}-box-alignment-{box_alignment}{suffix}-ifc2x3")