mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Delete unuseful qto tool function
This commit is contained in:
committed by
Dion Moult
parent
1be76c8aaa
commit
e20d4c93b7
@@ -28,7 +28,7 @@ def assign_pset_qto(qto, selected_objects):
|
||||
|
||||
def calculate_all_qtos(qto, selected_objects):
|
||||
for obj in selected_objects:
|
||||
if not qto.get_pset_qto_object_ifc_info(obj):
|
||||
if not qto.get_qto_entity(obj):
|
||||
print(f"There is no pset qto instance associated to object {obj.name}")
|
||||
continue
|
||||
|
||||
|
||||
@@ -405,7 +405,6 @@ class Qto:
|
||||
def get_radius_of_selected_vertices(cls, obj): pass
|
||||
def set_qto_result(cls, result): pass
|
||||
def assign_base_qto_to_object(cls, object): pass
|
||||
def get_pset_qto_object_ifc_info(cls, object): pass
|
||||
def get_applicable_quantity_names(cls, object): pass
|
||||
def get_qto_applicable_name(cls, object): pass
|
||||
def edit_qto(cls, object, calculated_quantities): pass
|
||||
|
||||
@@ -55,12 +55,6 @@ class Qto(blenderbim.core.tool.Qto):
|
||||
},
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def get_pset_qto_object_ifc_info(cls, obj):
|
||||
element = tool.Ifc.get_entity(obj)
|
||||
pset_qto_ifc_info = ifcopenshell.util.element.get_psets(element, qtos_only = True)
|
||||
return pset_qto_ifc_info
|
||||
|
||||
@classmethod
|
||||
def get_applicable_quantity_names(cls, obj):
|
||||
file = tool.Ifc.get()
|
||||
@@ -83,7 +77,7 @@ class Qto(blenderbim.core.tool.Qto):
|
||||
def edit_qto(cls, obj, calculated_quantities):
|
||||
file = tool.Ifc.get()
|
||||
pset_qto_applicable_name = cls.get_qto_applicable_name(obj)
|
||||
qto_entity = cls.get_qto_entity(obj, pset_qto_applicable_name)
|
||||
qto_entity = cls.get_qto_entity(obj)
|
||||
|
||||
ifcopenshell.api.run("pset.edit_qto",
|
||||
file,
|
||||
@@ -91,10 +85,11 @@ class Qto(blenderbim.core.tool.Qto):
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def get_qto_entity(cls, obj, pset_qto_applicable_name):
|
||||
def get_qto_entity(cls, obj):
|
||||
file = tool.Ifc.get()
|
||||
pset_qto_object_ifc_info = cls.get_pset_qto_object_ifc_info(obj)
|
||||
qto_entity = file.by_id(pset_qto_object_ifc_info[pset_qto_applicable_name]['id'])
|
||||
entity = tool.Ifc.get_entity(obj)
|
||||
qto_applicable_name = cls.get_qto_applicable_name(obj)
|
||||
qto_entity = tool.Pset.get_element_pset(entity, qto_applicable_name)
|
||||
return qto_entity
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user