mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-12 22:43:41 +00:00
Bring back formwork calculation feature that uses remesh
This commit is contained in:
@@ -23,6 +23,7 @@ classes = (
|
|||||||
operator.CalculateCircleRadius,
|
operator.CalculateCircleRadius,
|
||||||
operator.CalculateEdgeLengths,
|
operator.CalculateEdgeLengths,
|
||||||
operator.CalculateFaceAreas,
|
operator.CalculateFaceAreas,
|
||||||
|
operator.CalculateFormworkArea,
|
||||||
operator.CalculateObjectVolumes,
|
operator.CalculateObjectVolumes,
|
||||||
operator.CalculateSingleQuantity,
|
operator.CalculateSingleQuantity,
|
||||||
operator.PerformQuantityTakeOff,
|
operator.PerformQuantityTakeOff,
|
||||||
|
|||||||
@@ -84,6 +84,21 @@ class CalculateObjectVolumes(bpy.types.Operator):
|
|||||||
return {"FINISHED"}
|
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):
|
class CalculateSingleQuantity(bpy.types.Operator, tool.Ifc.Operator):
|
||||||
bl_idname = "bim.calculate_single_quantity"
|
bl_idname = "bim.calculate_single_quantity"
|
||||||
bl_label = "Calculate Single Quantity"
|
bl_label = "Calculate Single Quantity"
|
||||||
|
|||||||
@@ -87,14 +87,16 @@ class BIM_PT_qto_simple(bpy.types.Panel):
|
|||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.prop(props, "qto_result", text="Results")
|
row.prop(props, "qto_result", text="Results")
|
||||||
|
|
||||||
row = layout.row(align=True)
|
row = layout.row()
|
||||||
row.operator("bim.calculate_circle_radius")
|
row.operator("bim.calculate_circle_radius")
|
||||||
row = layout.row(align=True)
|
row = layout.row()
|
||||||
row.operator("bim.calculate_edge_lengths")
|
row.operator("bim.calculate_edge_lengths")
|
||||||
row = layout.row(align=True)
|
row = layout.row()
|
||||||
row.operator("bim.calculate_face_areas")
|
row.operator("bim.calculate_face_areas")
|
||||||
row = layout.row(align=True)
|
row = layout.row()
|
||||||
row.operator("bim.calculate_object_volumes")
|
row.operator("bim.calculate_object_volumes")
|
||||||
|
row = layout.row()
|
||||||
|
row.operator("bim.calculate_formwork_area")
|
||||||
|
|
||||||
|
|
||||||
class BIM_PT_qto_cost(bpy.types.Panel):
|
class BIM_PT_qto_cost(bpy.types.Panel):
|
||||||
|
|||||||
Reference in New Issue
Block a user