mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-29 00:03:17 +00:00
15 lines
491 B
Python
15 lines
491 B
Python
|
|
import ifcopenshell
|
||
|
|
|
||
|
|
fns = [
|
||
|
|
(False, lambda f: f.createIfcLengthMeasure(-1.)),
|
||
|
|
(True, lambda f: f.createIfcLengthMeasure(1.)),
|
||
|
|
(True, lambda f: f.createIfcPositiveLengthMeasure(1.)),
|
||
|
|
(False, lambda f: f.createIfcDescriptiveMeasure('large'))
|
||
|
|
]
|
||
|
|
|
||
|
|
for valid, fn in fns:
|
||
|
|
f = ifcopenshell.file(schema="IFC4")
|
||
|
|
fs = fn(f)
|
||
|
|
f.createIfcTextStyleFontModel('Comic Sans', ('Comic Sans',), FontSize=fs)
|
||
|
|
f.write(f"{'pass' if valid else 'fail'}-font-{fs.is_a()}-{fs[0]}.ifc")
|