kopia lustrzana https://github.com/vilemduha/blendercam
added protection for height. modified some menus
rodzic
60cc72e2c3
commit
aecdffdc2f
|
|
@ -182,7 +182,7 @@ class CalculatePath(bpy.types.Operator):
|
|||
|
||||
#check for free movement height < maxz and return with error
|
||||
if(o.movement.free_height < o.maxz):
|
||||
self.report({'ERROR_INVALID_INPUT'}, "Free movement height is less than maximum Z height, correct and try again.")
|
||||
self.report({'ERROR_INVALID_INPUT'}, "Free movement height is less than Operation depth start \n correct and try again.")
|
||||
return {'CANCELLED'}
|
||||
|
||||
if o.computing:
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
import bpy
|
||||
from cam.ui_panels.buttons_panel import CAMButtonsPanel
|
||||
|
||||
|
||||
class CAM_AREA_Panel(CAMButtonsPanel, bpy.types.Panel):
|
||||
"""CAM operation area panel"""
|
||||
bl_label = "CAM operation area "
|
||||
|
|
@ -37,9 +38,11 @@ class CAM_AREA_Panel(CAMButtonsPanel, bpy.types.Panel):
|
|||
def draw_maxz(self):
|
||||
if not self.has_correct_level(): return
|
||||
self.layout.prop(self.op, 'maxz')
|
||||
self.layout.prop(self.op.movement, 'free_height')
|
||||
if self.op.maxz > self.op.movement.free_height:
|
||||
self.layout.prop(self.op.movement, 'free_height')
|
||||
self.layout.label(text='POSSIBLE COLLISION: Depth start > Free movement')
|
||||
self.layout.label(text='!ERROR! COLLISION!')
|
||||
self.layout.label(text='Depth start > Free movement height')
|
||||
self.layout.label(text='!ERROR! COLLISION!')
|
||||
|
||||
def draw_minz(self):
|
||||
if not self.has_correct_level(): return
|
||||
|
|
|
|||
|
|
@ -13,16 +13,16 @@ class CAM_MACHINE_Panel(CAMButtonsPanel, bpy.types.Panel):
|
|||
'draw_presets': 1,
|
||||
'draw_post_processor': 0,
|
||||
'draw_split_files': 2,
|
||||
'draw_system': 1,
|
||||
'draw_system': 0,
|
||||
'draw_position_definitions': 2,
|
||||
'draw_working_area': 2,
|
||||
'draw_feedrates': 2,
|
||||
'draw_splindle_speeds': 2,
|
||||
'draw_working_area': 0,
|
||||
'draw_feedrates': 1,
|
||||
'draw_splindle_speeds': 0,
|
||||
'draw_tool_options': 2,
|
||||
'draw_suplemental_axis': 2,
|
||||
'draw_suplemental_axis': 3,
|
||||
'draw_collet_size': 2,
|
||||
'draw_block_numbers': 2,
|
||||
'draw_hourly_rate': 2
|
||||
'draw_hourly_rate': 1
|
||||
}
|
||||
|
||||
def draw_presets(self):
|
||||
|
|
|
|||
|
|
@ -54,6 +54,12 @@ class CAM_OPERATIONS_Panel(CAMButtonsPanel, bpy.types.Panel):
|
|||
|
||||
def draw_calculate_path(self):
|
||||
if not self.has_correct_level(): return
|
||||
if self.op.maxz > self.op.movement.free_height:
|
||||
self.layout.label(text='!ERROR! COLLISION!')
|
||||
self.layout.label(text='Depth start > Free movement height')
|
||||
self.layout.label(text='!ERROR! COLLISION!')
|
||||
self.layout.prop(self.op.movement, 'free_height')
|
||||
|
||||
if self.op.valid:
|
||||
self.layout.operator("object.calculate_cam_path", text="Calculate path & export Gcode")
|
||||
else:
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue