MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / setup_project

Function setup_project

src/ifcdiff/test.py:29–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27
28
29def setup_project() -> ifcopenshell.file:
30 ifc_file = ifcopenshell.file(schema="IFC4")
31 ifcopenshell.api.root.create_entity(ifc_file, ifc_class="IfcProject")
32 unit = ifcopenshell.api.unit.add_si_unit(ifc_file, unit_type="LENGTHUNIT", prefix="MILLI")
33 ifcopenshell.api.unit.assign_unit(ifc_file, units=[unit])
34 model = ifcopenshell.api.context.add_context(ifc_file, "Model")
35 ifcopenshell.api.context.add_context(ifc_file, "Model", "Body", "MODEL_VIEW", parent=model)
36 return ifc_file
37
38
39class TestIfcDiff:

Callers 4

test_add_elementMethod · 0.70
test_remove_elementMethod · 0.70
test_changed_geometryMethod · 0.70

Calls 2

fileMethod · 0.45
create_entityMethod · 0.45

Tested by

no test coverage detected