mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Bring back formwork calculation feature that uses remesh
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user