Bring back formwork calculation feature that uses remesh

This commit is contained in:
Dion Moult
2024-06-02 17:43:25 +10:00
parent c5d1801e1e
commit 23fee9c8c8
3 changed files with 22 additions and 4 deletions
@@ -23,6 +23,7 @@ classes = (
operator.CalculateCircleRadius,
operator.CalculateEdgeLengths,
operator.CalculateFaceAreas,
operator.CalculateFormworkArea,
operator.CalculateObjectVolumes,
operator.CalculateSingleQuantity,
operator.PerformQuantityTakeOff,
@@ -84,6 +84,21 @@ class CalculateObjectVolumes(bpy.types.Operator):
return {"FINISHED"}
class CalculateFormworkArea(bpy.types.Operator):
bl_idname = "bim.calculate_formwork_area"
bl_label = "Calculate Formwork Area"
bl_options = {"REGISTER", "UNDO"}
@classmethod
def poll(cls, context):
return context.selected_objects and context.active_object
def execute(self, context):
result = helper.calculate_formwork_area([o for o in context.selected_objects if o.type == "MESH"], context)
context.scene.BIMQtoProperties.qto_result = str(round(result, 3))
return {"FINISHED"}
class CalculateSingleQuantity(bpy.types.Operator, tool.Ifc.Operator):
bl_idname = "bim.calculate_single_quantity"
bl_label = "Calculate Single Quantity"
@@ -87,14 +87,16 @@ class BIM_PT_qto_simple(bpy.types.Panel):
row = layout.row()
row.prop(props, "qto_result", text="Results")
row = layout.row(align=True)
row = layout.row()
row.operator("bim.calculate_circle_radius")
row = layout.row(align=True)
row = layout.row()
row.operator("bim.calculate_edge_lengths")
row = layout.row(align=True)
row = layout.row()
row.operator("bim.calculate_face_areas")
row = layout.row(align=True)
row = layout.row()
row.operator("bim.calculate_object_volumes")
row = layout.row()
row.operator("bim.calculate_formwork_area")
class BIM_PT_qto_cost(bpy.types.Panel):