2022-12-26 11:29:32 +01:00
|
|
|
import ifcopenshell
|
2026-08-03 19:46:18 +05:00
|
|
|
from ...fixture_generate import normalize_header, pass_if, write_fixture
|
2022-12-26 11:29:32 +01:00
|
|
|
|
|
|
|
|
dims = [
|
2024-07-26 12:00:28 +10:00
|
|
|
(1, 0, 0, 0, 0, 0, 0),
|
|
|
|
|
(1, 1, 0, 0, 0, 0, 0),
|
|
|
|
|
(0, 1, 0, 0, 0, 0, 0),
|
|
|
|
|
(-1, 0, 0, 0, 0, 0, 0),
|
|
|
|
|
(2, 0, 0, 0, 0, 0, 0),
|
2022-12-26 11:29:32 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
for i, d in enumerate(dims):
|
|
|
|
|
f = ifcopenshell.file(schema="IFC2X3")
|
|
|
|
|
f.createIfcConversionBasedUnit(
|
|
|
|
|
f.createIfcDimensionalExponents(*d),
|
2024-07-26 12:00:28 +10:00
|
|
|
"LENGTHUNIT",
|
|
|
|
|
"beard-second",
|
|
|
|
|
f.createIfcMeasureWithUnit(f.createIfcLengthMeasure(5.0), f.createIfcSIUnit(Prefix="NANO", Name="METRE")),
|
2022-12-26 11:29:32 +01:00
|
|
|
)
|
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 == 0), f"conv-unit-{i}-ifc2x3")
|