2022-12-26 11:29:32 +01:00
|
|
|
import ifcopenshell
|
2026-08-10 15:31:39 +05:00
|
|
|
|
2026-08-03 19:46:18 +05:00
|
|
|
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
|
|
|
)
|
|
|
|
|
|
2026-08-03 15:31:10 +05:00
|
|
|
suffix = "-uppercase" if box_alignment == "CENTER" else ""
|
2026-08-03 16:07:29 +05:00
|
|
|
normalize_header(f)
|
2026-08-03 16:51:10 +05:00
|
|
|
write_fixture(f, __file__, pass_if(i in (0, 1, 3)), f"{i}-box-alignment-{box_alignment}{suffix}-ifc2x3")
|