|
28 | 28 | import blenderbim.tool as tool |
29 | 29 | import blenderbim.core.type |
30 | 30 | import blenderbim.core.geometry |
| 31 | +import blenderbim.core.material |
31 | 32 | from math import pi, degrees, inf |
32 | 33 | from mathutils import Vector, Matrix, Quaternion |
33 | 34 | from blenderbim.bim.module.geometry.helper import Helper |
@@ -857,6 +858,25 @@ def _execute(self, context): |
857 | 858 | return {"FINISHED"} |
858 | 859 |
|
859 | 860 |
|
| 861 | +class PatchNonParametricMepSegment(bpy.types.Operator, tool.Ifc.Operator): |
| 862 | + bl_idname = "bim.patch_non_parametric_mep_segment" |
| 863 | + bl_label = "Set MEP segment Material Profile" |
| 864 | + bl_options = {"REGISTER", "UNDO"} |
| 865 | + |
| 866 | + @classmethod |
| 867 | + def poll(cls, context): |
| 868 | + return context.active_object |
| 869 | + |
| 870 | + def _execute(self, context): |
| 871 | + styles = tool.Geometry.get_styles(context.active_object) |
| 872 | + blenderbim.core.material.patch_non_parametric_mep_segment( |
| 873 | + tool.Ifc, tool.Material, tool.Profile, obj=context.active_object |
| 874 | + ) |
| 875 | + bpy.ops.bim.enable_editing_extrusion_axis() |
| 876 | + bpy.ops.bim.edit_extrusion_axis() |
| 877 | + styles = tool.Geometry.get_styles(context.active_object) |
| 878 | + |
| 879 | + |
860 | 880 | class EnableEditingExtrusionAxis(bpy.types.Operator, tool.Ifc.Operator): |
861 | 881 | bl_idname = "bim.enable_editing_extrusion_axis" |
862 | 882 | bl_label = "Enable Editing Extrusion Axis" |
|
0 commit comments