mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-10 06:00:51 +00:00
Merge pull request #7543 from falken10vdl/MEP-ports
Simplified handling of Ports in MEP Addresses https://community.osarch.org/discussion/comment/27740#Comment_27740
This commit is contained in:
@@ -103,6 +103,19 @@ class TestCreateEmptyAtCursorWithElementOrientation(NewFile):
|
||||
obj = subject.create_empty_at_cursor_with_element_orientation(element)
|
||||
assert obj.matrix_world == bpy.context.scene.cursor.matrix
|
||||
|
||||
class TestCreatePortAtCursor(NewFile):
|
||||
def test_run(self):
|
||||
assert bpy.context.scene
|
||||
ifc = ifcopenshell.file()
|
||||
tool.Ifc().set(ifc)
|
||||
system = ifcopenshell.api.system.add_system(ifc)
|
||||
element = ifcopenshell.api.root.create_entity(ifc, ifc_class="IfcDuctSegment")
|
||||
ifcopenshell.api.system.assign_system(ifc, products=[element], system=system)
|
||||
obj = tool.Ifc.link(element, bpy.data.objects.new("Object", None))
|
||||
port = subject.create_port_at_cursor(element)
|
||||
assert port.is_a("IfcDistributionPort")
|
||||
assert ifcopenshell.util.system.get_ports(element) == [port]
|
||||
|
||||
|
||||
class TestDeleteElementObjects(NewFile):
|
||||
def test_run(self):
|
||||
|
||||
Reference in New Issue
Block a user