kopia lustrzana https://github.com/vilemduha/blendercam
Warning Icons, text cleanup, Collection debug starts
rodzic
552041c63b
commit
245e09cd37
|
@ -729,7 +729,8 @@ def check_memory_limit(o):
|
|||
if res > limit:
|
||||
ratio = res / limit
|
||||
o.optimisation.pixsize = o.optimisation.pixsize * sqrt(ratio)
|
||||
o.info.warnings += " \nMemory Limit Exceeded!\n"
|
||||
o.info.warnings += " \n!!! Memory Error !!!\n"
|
||||
o.info.warnings += "Memory Limit Exceeded!\n"
|
||||
o.info.warnings += f"Detail Size Increased to {round(o.optimisation.pixsize, 5)}\n"
|
||||
print("Changing Sampling Resolution to %f" % o.optimisation.pixsize)
|
||||
|
||||
|
|
|
@ -1152,7 +1152,7 @@ class CAM_OPERATION_Properties(PropertyGroup):
|
|||
ambient = sgeometry.Polygon()
|
||||
operation_limit = sgeometry.Polygon()
|
||||
borderwidth = 50
|
||||
object = None
|
||||
objects = None
|
||||
path_object_name: StringProperty(name="Path Object", description="Actual CNC path")
|
||||
|
||||
#################
|
||||
|
|
|
@ -225,7 +225,7 @@ async def cutout(o):
|
|||
for ch in chunksFromCurve:
|
||||
ch.reverse()
|
||||
|
||||
if o.cut_type == "INSIDE": # there would bee too many conditions above,
|
||||
if o.cut_type == "INSIDE": # there would be too many conditions above,
|
||||
# so for now it gets reversed once again when inside cutting.
|
||||
for ch in chunksFromCurve:
|
||||
ch.reverse()
|
||||
|
|
|
@ -47,10 +47,17 @@ class CAM_INFO_Panel(CAMParentPanel, Panel):
|
|||
box = main.box()
|
||||
col = box.column(align=True)
|
||||
col.alert = True
|
||||
col.label(text="!!! Warning !!!", icon="ERROR")
|
||||
col.label(text="!!! WARNING !!!", icon="ERROR")
|
||||
for line in self.op.info.warnings.rstrip("\n").split("\n"):
|
||||
if len(line) > 0:
|
||||
col.label(text=line, icon="ERROR")
|
||||
icon = "BLANK1"
|
||||
if line.startswith(("Path", "Operation", "X", "Y", "Z")):
|
||||
icon = "MOD_WIREFRAME"
|
||||
if line.startswith(("Memory", "Detail")):
|
||||
icon = "MEMORY"
|
||||
if line.startswith(("!!!")):
|
||||
icon = "ERROR"
|
||||
col.label(text=line, icon=icon)
|
||||
|
||||
# Cutter Engagement
|
||||
if not self.op.strategy == "CUTOUT" and not self.op.cutter_type in ["LASER", "PLASMA"]:
|
||||
|
@ -125,7 +132,7 @@ class CAM_INFO_Panel(CAMParentPanel, Panel):
|
|||
return
|
||||
|
||||
cost_per_second = bpy.context.scene.cam_machine.hourly_rate / 3600
|
||||
total_cost = self.op.info.duration * 60 * cost_per_second
|
||||
op_cost = f"${total_cost:.2f} (${cost_per_second:.2f}/s)"
|
||||
total_cost = self.op.info.duration * 6000 * cost_per_second
|
||||
op_cost = f"${total_cost:.2f}" # (${cost_per_second:.2f}/s)"
|
||||
title_col.label(text="Cost:")
|
||||
value_col.label(text=op_cost, icon="TAG")
|
||||
|
|
|
@ -26,7 +26,7 @@ class CAM_Popup_Panel(Operator):
|
|||
y = int(height / 2 + v_offset)
|
||||
context.window.cursor_warp(x, y)
|
||||
|
||||
return wm.invoke_props_dialog(self, width=popup_width, title="Fabex CNC/CAM")
|
||||
return wm.invoke_props_dialog(self, width=popup_width, title="Fabex CNC")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
@ -45,12 +45,16 @@ class CAM_Popup_Panel(Operator):
|
|||
if not self.op.info.warnings == "":
|
||||
# Operation Warnings
|
||||
box = layout.box()
|
||||
# box.alert = True
|
||||
row = box.row(align=True)
|
||||
row.alignment = "CENTER"
|
||||
col = row.column(align=True)
|
||||
col = box.column(align=True)
|
||||
col.alert = True
|
||||
col.label(text="!!! WARNING !!!", icon="ERROR")
|
||||
for line in self.op.info.warnings.rstrip("\n").split("\n"):
|
||||
if len(line) > 0:
|
||||
col.label(text=line, icon="ERROR")
|
||||
icon = "BLANK1"
|
||||
if line.startswith(("Bounds", "Path", "Operation", "X", "Y", "Z")):
|
||||
icon = "MOD_WIREFRAME"
|
||||
if line.startswith(("Memory", "Detail")):
|
||||
icon = "MEMORY"
|
||||
if line.startswith(("!!!")):
|
||||
icon = "ERROR"
|
||||
col.label(text=line, icon=icon)
|
||||
|
|
|
@ -254,22 +254,22 @@ def get_bounds(o):
|
|||
z_is_exceeded = z_delta_range > m.working_area.z
|
||||
|
||||
if x_is_exceeded or y_is_exceeded or z_is_exceeded:
|
||||
exceed_msg = " \nPath Exceeds Machine Limits!\n"
|
||||
exceed_msg = " \n!!! Bounds Error !!!\n"
|
||||
|
||||
# Do not append more than one such a warning
|
||||
if exceed_msg not in o.info.warnings:
|
||||
o.info.warnings += exceed_msg
|
||||
o.info.warnings += "Path Exceeds Machine Limits!\n"
|
||||
o.info.warnings += "Operation Area > Work Area\n"
|
||||
o.info.warnings += " \n"
|
||||
|
||||
if x_is_exceeded:
|
||||
o.info.warnings += f"X: {unit_value_to_string(x_delta_range)} > {unit_value_to_string(m.working_area.x)}\n \n"
|
||||
o.info.warnings += f"X: {unit_value_to_string(x_delta_range)} > {unit_value_to_string(m.working_area.x)}\n"
|
||||
|
||||
if y_is_exceeded:
|
||||
o.info.warnings += f"Y: {unit_value_to_string(y_delta_range)} > {unit_value_to_string(m.working_area.y)}\n \n"
|
||||
o.info.warnings += f"Y: {unit_value_to_string(y_delta_range)} > {unit_value_to_string(m.working_area.y)}\n"
|
||||
|
||||
if z_is_exceeded:
|
||||
o.info.warnings += f"Z: {unit_value_to_string(z_delta_range)} > {unit_value_to_string(m.working_area.z)}\n \n"
|
||||
o.info.warnings += f"Z: {unit_value_to_string(z_delta_range)} > {unit_value_to_string(m.working_area.z)}\n"
|
||||
|
||||
if not o.info.warnings == "":
|
||||
addon_prefs = bpy.context.preferences.addons["bl_ext.user_default.fabex"].preferences
|
||||
|
|
Ładowanie…
Reference in New Issue