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

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

27 lines
619 B
Python
Raw Normal View History

2022-12-26 11:29:32 +01:00
import ifcopenshell
dims = [
(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),
]
for i, d in enumerate(dims):
f = ifcopenshell.file(schema="IFC2X3")
f.createIfcConversionBasedUnit(
f.createIfcDimensionalExponents(*d),
'LENGTHUNIT',
'beard-second',
f.createIfcMeasureWithUnit(
f.createIfcLengthMeasure(5.0),
f.createIfcSIUnit(
Prefix='NANO',
Name='METRE'
)
)
)
f.write(f"{'pass' if i == 0 else 'fail'}-conv-unit-{i}-ifc2x3.ifc")