Add files via upload

pull/276/head
SpectralVectors 2024-10-25 21:17:12 -04:00 zatwierdzone przez GitHub
rodzic b83c681416
commit c2e857a414
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
18 zmienionych plików z 368 dodań i 277 usunięć

Wyświetl plik

@ -23,11 +23,6 @@ from bpy_extras.object_utils import object_data_add
# Relative Imports - from 'cam' module # Relative Imports - from 'cam' module
from . import basrelief from . import basrelief
from .autoupdate import (
UpdateChecker,
Updater,
UpdateSourceOperator,
)
from .cam_operation import camOperation from .cam_operation import camOperation
from .chain import ( from .chain import (
camChain, camChain,

Wyświetl plik

@ -1613,7 +1613,6 @@ class BASRELIEF_Panel(bpy.types.Panel):
bl_space_type = "PROPERTIES" bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW" bl_region_type = "WINDOW"
bl_context = "render" bl_context = "render"
COMPAT_ENGINES = {"FABEX_RENDER"} COMPAT_ENGINES = {"FABEX_RENDER"}
# def draw_header(self, context): # def draw_header(self, context):
@ -1656,6 +1655,9 @@ class BASRELIEF_Panel(bpy.types.Panel):
""" """
layout = self.layout layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False
# print(dir(layout)) # print(dir(layout))
s = bpy.context.scene s = bpy.context.scene

Wyświetl plik

@ -30,7 +30,7 @@ from .ui.panels.slice import CAM_SLICE_Panel
class FABEX_ENGINE(RenderEngine): class FABEX_ENGINE(RenderEngine):
bl_idname = "FABEX_RENDER" bl_idname = "FABEX_RENDER"
bl_label = "Fabex" bl_label = "Fabex CNC/CAM"
bl_use_eevee_viewport = True bl_use_eevee_viewport = True

Wyświetl plik

@ -148,12 +148,12 @@ class machineSettings(PropertyGroup):
) )
axis4: BoolProperty( axis4: BoolProperty(
name="#4th Axis", name="4th Axis",
description="Machine has 4th axis", description="Machine has 4th axis",
default=0, default=0,
) )
axis5: BoolProperty( axis5: BoolProperty(
name="#5th Axis", name="5th Axis",
description="Machine has 5th axis", description="Machine has 5th axis",
default=0, default=0,
) )
@ -180,7 +180,7 @@ class machineSettings(PropertyGroup):
# default='X', update = updateOffsetImage) # default='X', update = updateOffsetImage)
collet_size: FloatProperty( collet_size: FloatProperty(
name="#Collet Size", name="Collet Size",
description="Collet size for collision detection", description="Collet size for collision detection",
default=33, default=33,
min=0.00001, min=0.00001,

Wyświetl plik

@ -19,18 +19,20 @@ class CAM_AREA_Panel(CAMButtonsPanel, Panel):
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False
# Use Layers # Use Layers
col = layout.column(align=True) header, panel = layout.panel_prop(self.op, "use_layers")
row = col.row(align=True) header.label(text="Layers")
row.prop(self.op, "use_layers") if panel:
if self.op.use_layers: col = panel.column(align=True)
row.prop(self.op, "stepdown") if self.op.use_layers:
col.prop(self.op, "stepdown", text="Layer Height")
# First Down # First Down
if self.level >= 1 and self.op.strategy in ["CUTOUT", "POCKET", "MEDIAL_AXIS"]: if self.level >= 1 and self.op.strategy in ["CUTOUT", "POCKET", "MEDIAL_AXIS"]:
row = col.row(align=True) col.prop(self.op, "first_down")
row.label(text="")
row.prop(self.op, "first_down")
# Max Z # Max Z
if self.level >= 1: if self.level >= 1:
@ -48,11 +50,9 @@ class CAM_AREA_Panel(CAMButtonsPanel, Panel):
if self.op.strategy == "CURVE": if self.op.strategy == "CURVE":
col.label(text="Cannot Use Depth from Object Using Curves") col.label(text="Cannot Use Depth from Object Using Curves")
row = col.row(align=True) col.prop(self.op, "minz_from", text="Set Max Depth from")
row.label(text="Set Max Depth from")
row.prop(self.op, "minz_from", text="")
if self.op.minz_from == "CUSTOM": if self.op.minz_from == "CUSTOM":
row.prop(self.op, "minz") col.prop(self.op, "minz")
else: else:
col.prop(self.op, "source_image_scale_z") col.prop(self.op, "source_image_scale_z")

Wyświetl plik

@ -43,12 +43,17 @@ class CAM_CHAINS_Panel(CAMButtonsPanel, Panel):
bl_label = "CAM Chains" bl_label = "CAM Chains"
bl_idname = "WORLD_PT_CAM_CHAINS" bl_idname = "WORLD_PT_CAM_CHAINS"
# bl_space_type = "VIEW_3D"
# bl_region_type = "UI"
# bl_category = "Fabex"
panel_interface_level = 1 panel_interface_level = 1
always_show_panel = True always_show_panel = True
def draw(self, context): def draw(self, context):
if self.level >= 1 and self.op is not None: if self.level >= 1 and self.op is not None:
layout = self.layout layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False
row = layout.row() row = layout.row()
scene = bpy.context.scene scene = bpy.context.scene
@ -73,20 +78,23 @@ class CAM_CHAINS_Panel(CAMButtonsPanel, Panel):
col.operator("scene.cam_chain_operation_up", icon="TRIA_UP", text="") col.operator("scene.cam_chain_operation_up", icon="TRIA_UP", text="")
col.operator("scene.cam_chain_operation_down", icon="TRIA_DOWN", text="") col.operator("scene.cam_chain_operation_down", icon="TRIA_DOWN", text="")
col = layout.column(align=True)
if not chain.computing: if not chain.computing:
layout.operator( col.operator(
"object.calculate_cam_paths_chain", "object.calculate_cam_paths_chain",
text="Calculate Chain Paths & Export Gcode", text="Calculate Chain Paths & Export Gcode",
) )
layout.operator("object.cam_export_paths_chain", text="Export Chain G-code") col.operator("object.cam_export_paths_chain", text="Export Chain G-code")
layout.operator("object.cam_simulate_chain", text="Simulate This Chain") col.operator("object.cam_simulate_chain", text="Simulate This Chain")
valid, reason = isChainValid(chain, context) valid, reason = isChainValid(chain, context)
if not valid: if not valid:
layout.label(icon="ERROR", text=f"Can't Compute Chain - Reason:\n") col.label(icon="ERROR", text=f"Can't Compute Chain - Reason:\n")
layout.label(text=reason) col.label(text=reason)
else: else:
layout.label(text="Chain Is Currently Computing") col.label(text="Chain Is Currently Computing")
layout.prop(chain, "name") box = layout.box()
layout.prop(chain, "filename") col = box.column(align=True)
col.prop(chain, "name")
col.prop(chain, "filename")

Wyświetl plik

@ -18,6 +18,9 @@ class CAM_CUTTER_Panel(CAMButtonsPanel, Panel):
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False
# Cutter Preset Menu # Cutter Preset Menu
if self.level >= 1: if self.level >= 1:
row = layout.row(align=True) row = layout.row(align=True)
@ -27,63 +30,66 @@ class CAM_CUTTER_Panel(CAMButtonsPanel, Panel):
True True
) )
# Cutter ID box = layout.box()
if self.level >= 2: col = box.column(align=True)
layout.prop(self.op, "cutter_id")
# Cutter Type # Cutter Type
layout.prop(self.op, "cutter_type") col.prop(self.op, "cutter_type", text="Type")
# Ball Radius # Ball Radius
if self.op.cutter_type in ["BALLCONE"]: if self.op.cutter_type in ["BALLCONE"]:
layout.prop(self.op, "ball_radius") col.prop(self.op, "ball_radius")
# Bullnose Radius # Bullnose Radius
if self.op.cutter_type in ["BULLNOSE"]: if self.op.cutter_type in ["BULLNOSE"]:
layout.prop(self.op, "bull_corner_radius") col.prop(self.op, "bull_corner_radius")
# Cyclone Diameter # Cyclone Diameter
if self.op.cutter_type in ["CYLCONE"]: if self.op.cutter_type in ["CYLCONE"]:
layout.prop(self.op, "cylcone_diameter") col.prop(self.op, "cylcone_diameter")
# Cutter Tip Angle # Cutter Tip Angle
if self.op.cutter_type in ["VCARVE", "BALLCONE", "BULLNOSE", "CYLCONE"]: if self.op.cutter_type in ["VCARVE", "BALLCONE", "BULLNOSE", "CYLCONE"]:
layout.prop(self.op, "cutter_tip_angle") col.prop(self.op, "cutter_tip_angle")
# Laser # Laser
if self.op.cutter_type in ["LASER"]: if self.op.cutter_type in ["LASER"]:
layout.prop(self.op, "Laser_on") col.prop(self.op, "Laser_on")
layout.prop(self.op, "Laser_off") col.prop(self.op, "Laser_off")
layout.prop(self.op, "Laser_cmd") col.prop(self.op, "Laser_cmd")
layout.prop(self.op, "Laser_delay") col.prop(self.op, "Laser_delay")
# Plasma # Plasma
if self.op.cutter_type in ["PLASMA"]: if self.op.cutter_type in ["PLASMA"]:
layout.prop(self.op, "Plasma_on") col.prop(self.op, "Plasma_on")
layout.prop(self.op, "Plasma_off") col.prop(self.op, "Plasma_off")
layout.prop(self.op, "Plasma_delay") col.prop(self.op, "Plasma_delay")
layout.prop(self.op, "Plasma_dwell") col.prop(self.op, "Plasma_dwell")
layout.prop(self.op, "lead_in") col.prop(self.op, "lead_in")
layout.prop(self.op, "lead_out") col.prop(self.op, "lead_out")
# Custom # Custom
if self.op.cutter_type in ["CUSTOM"]: if self.op.cutter_type in ["CUSTOM"]:
if self.op.optimisation.use_exact: if self.op.optimisation.use_exact:
layout.label(text="Warning - only Convex Shapes Are Supported. ", icon="COLOR_RED") col.label(text="Warning - only Convex Shapes Are Supported. ", icon="COLOR_RED")
layout.label(text="If Your Custom Cutter Is Concave,") col.label(text="If Your Custom Cutter Is Concave,")
layout.label(text="Switch Exact Mode Off.") col.label(text="Switch Exact Mode Off.")
layout.prop_search(self.op, "cutter_object_name", bpy.data, "objects") col.prop_search(self.op, "cutter_object_name", bpy.data, "objects")
# Cutter Diameter # Cutter Diameter
layout.prop(self.op, "cutter_diameter") col.prop(self.op, "cutter_diameter", text="Diameter")
# Cutter Flutes # Cutter Flutes
if self.level >= 1: if self.level >= 1:
if self.op.cutter_type not in ["LASER", "PLASMA"]: if self.op.cutter_type not in ["LASER", "PLASMA"]:
layout.prop(self.op, "cutter_flutes") col.prop(self.op, "cutter_flutes", text="Flutes")
# Cutter ID
if self.level >= 2:
col = box.column(align=True)
col.prop(self.op, "cutter_id")
# Cutter Description # Cutter Description
layout.prop(self.op, "cutter_description") col.prop(self.op, "cutter_description")
# Cutter Engagement # Cutter Engagement
if self.op.cutter_type in ["LASER", "PLASMA"]: if self.op.cutter_type in ["LASER", "PLASMA"]:

Wyświetl plik

@ -18,6 +18,9 @@ class CAM_FEEDRATE_Panel(CAMButtonsPanel, Panel):
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False
# Feedrate # Feedrate
layout.prop(self.op, "feedrate") layout.prop(self.op, "feedrate")
@ -27,9 +30,10 @@ class CAM_FEEDRATE_Panel(CAMButtonsPanel, Panel):
# Plunge Feedrate # Plunge Feedrate
if self.level >= 1: if self.level >= 1:
layout.prop(self.op, "plunge_feedrate") col = layout.column(align=True)
col.prop(self.op, "plunge_feedrate")
# Plunge Angle # Plunge Angle
layout.prop(self.op, "plunge_angle") col.prop(self.op, "plunge_angle")
# Spindle RPM # Spindle RPM
layout.prop(self.op, "spindle_rpm") layout.prop(self.op, "spindle_rpm")

Wyświetl plik

@ -19,31 +19,34 @@ class CAM_GCODE_Panel(CAMButtonsPanel, Panel):
def draw(self, context): def draw(self, context):
if self.level >= 1 and self.op is not None: if self.level >= 1 and self.op is not None:
layout = self.layout layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False
col = layout.column(align=True)
# Output Header # Output Header
layout.prop(self.op, "output_header") col.prop(self.op, "output_header")
if self.op.output_header: if self.op.output_header:
layout.prop(self.op, "gcode_header") col.prop(self.op, "gcode_header")
# Output Trailer # Output Trailer
layout.prop(self.op, "output_trailer") col.prop(self.op, "output_trailer")
if self.op.output_trailer: if self.op.output_trailer:
layout.prop(self.op, "gcode_trailer") col.prop(self.op, "gcode_trailer")
# Enable Dust # Enable Dust
layout.prop(self.op, "enable_dust") col.prop(self.op, "enable_dust")
if self.op.enable_dust: if self.op.enable_dust:
layout.prop(self.op, "gcode_start_dust_cmd") col.prop(self.op, "gcode_start_dust_cmd")
layout.prop(self.op, "gcode_stop_dust_cmd") col.prop(self.op, "gcode_stop_dust_cmd")
# Enable Hold # Enable Hold
layout.prop(self.op, "enable_hold") col.prop(self.op, "enable_hold")
if self.op.enable_hold: if self.op.enable_hold:
layout.prop(self.op, "gcode_start_hold_cmd") col.prop(self.op, "gcode_start_hold_cmd")
layout.prop(self.op, "gcode_stop_hold_cmd") col.prop(self.op, "gcode_stop_hold_cmd")
# Enable Mist # Enable Mist
layout.prop(self.op, "enable_mist") col.prop(self.op, "enable_mist")
if self.op.enable_mist: if self.op.enable_mist:
layout.prop(self.op, "gcode_start_mist_cmd") col.prop(self.op, "gcode_start_mist_cmd")
layout.prop(self.op, "gcode_stop_mist_cmd") col.prop(self.op, "gcode_stop_mist_cmd")

Wyświetl plik

@ -66,17 +66,20 @@ class CAM_INFO_Panel(CAMButtonsPanel, Panel):
# Display the Info Panel # Display the Info Panel
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False
col = layout.column(align=True)
# Fabex Version # Fabex Version
layout.label(text=f'Fabex v{".".join([str(x) for x in cam_version])}') col.label(text=f'Fabex v{".".join([str(x) for x in cam_version])}')
# OpenCAMLib Version # OpenCAMLib Version
if self.level >= 1: if self.level >= 1:
ocl_version = opencamlib_version() ocl_version = opencamlib_version()
if ocl_version is None: if ocl_version is None:
layout.label(text="OpenCAMLib is not Installed") col.label(text="OpenCAMLib is not Installed")
else: else:
layout.label(text=f"OpenCAMLib v{ocl_version}") col.label(text=f"OpenCAMLib v{ocl_version}")
if self.op is None: if self.op is None:
return return

Wyświetl plik

@ -19,6 +19,8 @@ class CAM_MACHINE_Panel(CAMButtonsPanel, Panel):
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False
# Presets # Presets
if self.level >= 1: if self.level >= 1:
@ -35,65 +37,78 @@ class CAM_MACHINE_Panel(CAMButtonsPanel, Panel):
icon="REMOVE", icon="REMOVE",
).remove_active = True ).remove_active = True
col = layout.column(align=True)
# Post Processor # Post Processor
layout.prop(self.machine, "post_processor") col.prop(self.machine, "post_processor")
# Split Files
if self.level >= 2:
layout.prop(self.machine, "eval_splitting")
if self.machine.eval_splitting:
layout.prop(self.machine, "split_limit")
# System # System
layout.prop(bpy.context.scene.unit_settings, "system") col.prop(context.scene.unit_settings, "system")
col.prop(context.scene.unit_settings, "length_unit", text="Unit")
# Position Definitions # Supplemental Axis
if self.level >= 3:
col.prop(self.machine, "axis4")
col.prop(self.machine, "axis5")
# Collet Size
if self.level >= 2: if self.level >= 2:
layout.prop(self.machine, "use_position_definitions") col.prop(self.machine, "collet_size")
if self.machine.use_position_definitions:
layout.prop(self.machine, "starting_position")
layout.prop(self.machine, "mtc_position")
layout.prop(self.machine, "ending_position")
# Working Area # Working Area
layout.prop(self.machine, "working_area") layout.prop(self.machine, "working_area")
# Position Definitions
if self.level >= 2:
header, panel = layout.panel_prop(self.machine, "use_position_definitions")
header.label(text="Position Definitions")
if panel:
panel.prop(self.machine, "starting_position")
panel.prop(self.machine, "mtc_position")
panel.prop(self.machine, "ending_position")
# Feedrates # Feedrates
if self.level >= 1: if self.level >= 1:
layout.prop(self.machine, "feedrate_min") header, panel = layout.panel(idname="feedrate", default_closed=True)
layout.prop(self.machine, "feedrate_max") header.label(text="Feedrate (/min)")
layout.prop(self.machine, "feedrate_default") if panel:
panel.prop(self.machine, "feedrate_default", text="Default")
panel.prop(self.machine, "feedrate_min", text="Minimum")
panel.prop(self.machine, "feedrate_max", text="Maximum")
# Spindle Speeds # Spindle Speeds
# TODO: spindle default and feedrate default should become part of the cutter definition... # TODO: spindle default and feedrate default should become part of the cutter definition...
layout.prop(self.machine, "spindle_min") header, panel = layout.panel(idname="spindle", default_closed=True)
layout.prop(self.machine, "spindle_max") header.label(text="Spindle Speed (RPM)")
layout.prop(self.machine, "spindle_start_time") if panel:
layout.prop(self.machine, "spindle_default") panel.prop(self.machine, "spindle_default", text="Default")
panel.prop(self.machine, "spindle_min", text="Minimum")
panel.prop(self.machine, "spindle_max", text="Maximum")
panel.prop(self.machine, "spindle_start_time", text="Start Delay (seconds)")
# Tool Options # Gcode Options
if self.level >= 2:
layout.prop(self.machine, "output_tool_definitions")
layout.prop(self.machine, "output_tool_change")
if self.machine.output_tool_change:
layout.prop(self.machine, "output_g43_on_tool_change")
# Supplemental Axis
if self.level >= 3:
layout.prop(self.machine, "axis4")
layout.prop(self.machine, "axis5")
# Collet Size
if self.level >= 2:
layout.prop(self.machine, "collet_size")
# Block Numbers
if self.level >= 2:
layout.prop(self.machine, "output_block_numbers")
if self.machine.output_block_numbers:
layout.prop(self.machine, "start_block_number")
layout.prop(self.machine, "block_number_increment")
# Hourly Rate
if self.level >= 1: if self.level >= 1:
header, panel = layout.panel(idname="gcode", default_closed=True)
header.label(text="Gcode Options")
if panel:
col = panel.column(align=True)
# Tool Options
if self.level >= 2:
col.prop(self.machine, "output_tool_definitions")
col.prop(self.machine, "output_tool_change")
if self.machine.output_tool_change:
col.prop(self.machine, "output_g43_on_tool_change")
# Block Numbers
if self.level >= 2:
col.prop(self.machine, "output_block_numbers")
if self.machine.output_block_numbers:
col.prop(self.machine, "start_block_number")
col.prop(self.machine, "block_number_increment")
# Split Files
if self.level >= 2:
col.prop(self.machine, "eval_splitting")
if self.machine.eval_splitting:
col.prop(self.machine, "split_limit")
# Hourly Rate
layout.prop(self.machine, "hourly_rate") layout.prop(self.machine, "hourly_rate")

Wyświetl plik

@ -117,26 +117,32 @@ class CAM_MATERIAL_Panel(CAMButtonsPanel, Panel):
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False
box = layout.box()
col = box.column(align=True)
col.label(text="Size")
# Estimate from Image # Estimate from Image
if self.op.geometry_source not in ["OBJECT", "COLLECTION"]: if self.op.geometry_source not in ["OBJECT", "COLLECTION"]:
layout.label(text="Estimated from Image") col.label(text="Estimated from Image")
# Estimate from Object # Estimate from Object
if self.level >= 1: if self.level >= 1:
if self.op.geometry_source in ["OBJECT", "COLLECTION"]: if self.op.geometry_source in ["OBJECT", "COLLECTION"]:
layout.prop(self.op.material, "estimate_from_model") col.prop(self.op.material, "estimate_from_model")
if self.op.material.estimate_from_model: if self.op.material.estimate_from_model:
row_radius = layout.row() col.prop(self.op.material, "radius_around_model", text="Additional Radius")
row_radius.label(text="Additional Radius")
row_radius.prop(self.op.material, "radius_around_model", text="")
else: else:
layout.prop(self.op.material, "origin") col.prop(self.op.material, "origin")
layout.prop(self.op.material, "size") col.prop(self.op.material, "size")
# Axis Alignment # Axis Alignment
if self.op.geometry_source in ["OBJECT", "COLLECTION"]: if self.op.geometry_source in ["OBJECT", "COLLECTION"]:
row_axis = layout.row() box = layout.box()
row_axis.prop(self.op.material, "center_x") col = box.column(align=True)
row_axis.prop(self.op.material, "center_y") col.label(text="Position")
layout.prop(self.op.material, "z_position") col.prop(self.op.material, "center_x")
layout.operator("object.material_cam_position", text="Position Object") col.prop(self.op.material, "center_y")
col.prop(self.op.material, "z_position")
col.operator("object.material_cam_position", text="Position Object")

Wyświetl plik

@ -230,6 +230,9 @@ class CAM_MOVEMENT_Panel(CAMButtonsPanel, Panel):
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False
# Cut Type # Cut Type
if self.level >= 1: if self.level >= 1:
layout.prop(self.op.movement, "type") layout.prop(self.op.movement, "type")
@ -249,9 +252,11 @@ class CAM_MOVEMENT_Panel(CAMButtonsPanel, Panel):
# Use G64 # Use G64
if self.level >= 2: if self.level >= 2:
if context.scene.cam_machine.post_processor not in G64_INCOMPATIBLE_MACHINES: if context.scene.cam_machine.post_processor not in G64_INCOMPATIBLE_MACHINES:
layout.prop(self.op.movement, "useG64") header, panel = layout.panel_prop(self.op.movement, "useG64")
if self.op.movement.useG64: header.label(text="G64 Trajectory")
layout.prop(self.op.movement, "G64") if panel:
col = panel.column(align=True)
col.prop(self.op.movement, "G64")
# Parallel Stepback # Parallel Stepback
if self.level >= 1: if self.level >= 1:
@ -269,30 +274,38 @@ class CAM_MOVEMENT_Panel(CAMButtonsPanel, Panel):
# Ramp # Ramp
if self.level >= 1: if self.level >= 1:
layout.prop(self.op.movement, "ramp") header, panel = layout.panel_prop(self.op.movement, "ramp")
if self.op.movement.ramp: header.label(text="Ramp (Experimental)")
layout.prop(self.op.movement, "ramp_in_angle") if panel:
layout.prop(self.op.movement, "ramp_out") col = panel.column(align=True)
col.prop(self.op.movement, "ramp_in_angle")
col.prop(self.op.movement, "ramp_out")
if self.op.movement.ramp_out: if self.op.movement.ramp_out:
layout.prop(self.op.movement, "ramp_out_angle") col.prop(self.op.movement, "ramp_out_angle")
# Retract Tangential # Retract Tangential
if self.level >= 2: if self.level >= 2:
if self.op.strategy in ["POCKET"]: if self.op.strategy in ["POCKET"]:
layout.prop(self.op.movement, "retract_tangential") header, panel = layout.panel_prop(self.op.movement, "retract_tangential")
if self.op.movement.retract_tangential: header.label(text="Retract Tangential")
layout.prop(self.op.movement, "retract_radius") if panel:
layout.prop(self.op.movement, "retract_height") col = panel.column(align=True)
col.prop(self.op.movement, "retract_radius")
col.prop(self.op.movement, "retract_height")
# Stay Low # Stay Low
if self.level >= 1: if self.level >= 1:
layout.prop(self.op.movement, "stay_low") header, panel = layout.panel_prop(self.op.movement, "stay_low")
if self.op.movement.stay_low: header.label(text="Stay Low (if possible)")
layout.prop(self.op.movement, "merge_dist") if panel:
col = panel.column(align=True)
col.prop(self.op.movement, "merge_dist")
# Protect Vertical # Protect Vertical
if self.level >= 1: if self.level >= 1:
if self.op.cutter_type not in ["BALLCONE"]: if self.op.cutter_type not in ["BALLCONE"]:
layout.prop(self.op.movement, "protect_vertical") header, panel = layout.panel_prop(self.op.movement, "protect_vertical")
if self.op.movement.protect_vertical: header.label(text="Protect Vertical")
layout.prop(self.op.movement, "protect_vertical_limit") if panel:
col = panel.column(align=True)
col.prop(self.op.movement, "protect_vertical_limit")

Wyświetl plik

@ -16,9 +16,9 @@ class CAM_OPERATION_PROPERTIES_Panel(CAMButtonsPanel, Panel):
bl_idname = "WORLD_PT_CAM_OPERATION" bl_idname = "WORLD_PT_CAM_OPERATION"
panel_interface_level = 0 panel_interface_level = 0
def draw_cutter_engagement(self): def draw_cutter_engagement(self, col):
if self.op is not None: if self.op is not None:
layout = self.layout # layout = self.layout
# Cutter Engagement # Cutter Engagement
# Warns if cutter engagement is greater than 50% # Warns if cutter engagement is greater than 50%
if self.op.cutter_type in ["BALLCONE"]: if self.op.cutter_type in ["BALLCONE"]:
@ -27,119 +27,135 @@ class CAM_OPERATION_PROPERTIES_Panel(CAMButtonsPanel, Panel):
engagement = round(100 * self.op.dist_between_paths / self.op.cutter_diameter, 1) engagement = round(100 * self.op.dist_between_paths / self.op.cutter_diameter, 1)
if engagement > 50: if engagement > 50:
layout.label(text="Warning: High Cutter Engagement") col.label(text="Warning: High Cutter Engagement")
layout.label(text=f"Cutter Engagement: {engagement}%") col.label(text=f"Cutter Engagement: {engagement}%")
def draw_enable_A_B_axis(self): def draw_enable_A_B_axis(self, col):
# Enable A & B Axes # Enable A & B Axes
if self.level >= 1: if self.level >= 1:
layout = self.layout # layout = self.layout
layout.prop(self.op, "enable_A") col.prop(self.op, "enable_A")
if self.op.enable_A: if self.op.enable_A:
layout.prop(self.op, "rotation_A") col.prop(self.op, "rotation_A")
layout.prop(self.op, "A_along_x") col.prop(self.op, "A_along_x")
if self.op.A_along_x: if self.op.A_along_x:
layout.label(text="A || X - B || Y") col.label(text="A || X - B || Y")
else: else:
layout.label(text="A || Y - B || X") col.label(text="A || Y - B || X")
layout.prop(self.op, "enable_B") col.prop(self.op, "enable_B")
if self.op.enable_B: if self.op.enable_B:
layout.prop(self.op, "rotation_B") col.prop(self.op, "rotation_B")
def draw_overshoot(self): def draw_overshoot(self, col):
layout = self.layout # layout = self.layout
# Overshoot # Overshoot
layout.prop(self.op, "straight") col.prop(self.op, "straight")
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False
col = layout.column(align=True)
# Machine Axis # Machine Axis
if self.level >= 2: if self.level >= 2:
layout.prop(self.op, "machine_axes") col.prop(self.op, "machine_axes")
# Strategy # Strategy
if self.op.machine_axes == "4": if self.op.machine_axes == "4":
layout.prop(self.op, "strategy4axis") col.prop(self.op, "strategy4axis")
if self.op.strategy4axis == "INDEXED": if self.op.strategy4axis == "INDEXED":
layout.prop(self.op, "strategy") col.prop(self.op, "strategy")
layout.prop(self.op, "rotary_axis_1") col.prop(self.op, "rotary_axis_1")
elif self.op.machine_axes == "5": elif self.op.machine_axes == "5":
layout.prop(self.op, "strategy5axis") col.prop(self.op, "strategy5axis")
if self.op.strategy5axis == "INDEXED": if self.op.strategy5axis == "INDEXED":
layout.prop(self.op, "strategy") col.prop(self.op, "strategy")
layout.prop(self.op, "rotary_axis_1") col.prop(self.op, "rotary_axis_1")
layout.prop(self.op, "rotary_axis_2") col.prop(self.op, "rotary_axis_2")
else: else:
layout.prop(self.op, "strategy") col.prop(self.op, "strategy")
# Cutout Options # Cutout Options
if self.op.strategy in ["CUTOUT"]: if self.op.strategy in ["CUTOUT"]:
box = layout.box()
col = box.column(align=True)
# Cutout Type # Cutout Type
layout.prop(self.op, "cut_type") col.prop(self.op, "cut_type")
if self.op.cut_type in ["OUTSIDE", "INSIDE"]: if self.op.cut_type in ["OUTSIDE", "INSIDE"]:
self.draw_overshoot() self.draw_overshoot(col=col)
# Startpoint # Startpoint
layout.prop(self.op, "profile_start") col.prop(self.op, "profile_start")
# Lead In & Out # Lead In & Out
layout.prop(self.op, "lead_in") col.prop(self.op, "lead_in")
layout.prop(self.op, "lead_out") col.prop(self.op, "lead_out")
if self.op.strategy in ["CUTOUT", "CURVE"]: if self.op.strategy in ["CUTOUT", "CURVE"]:
self.draw_enable_A_B_axis() self.draw_enable_A_B_axis(col=col)
# Outlines # Outlines
layout.prop(self.op, "outlines_count") col.prop(self.op, "outlines_count")
if self.op.outlines_count > 1: if self.op.outlines_count > 1:
layout.prop(self.op, "dist_between_paths") col.prop(self.op, "dist_between_paths")
self.draw_cutter_engagement() self.draw_cutter_engagement(col=col)
layout.prop(self.op.movement, "insideout") col.prop(self.op.movement, "insideout")
# Merge # Merge
layout.prop(self.op, "dont_merge") col.prop(self.op, "dont_merge")
# Waterline Options # Waterline Options
if self.op.strategy in ["WATERLINE"]: if self.op.strategy in ["WATERLINE"]:
layout.label(text="Ocl Doesn't Support Fill Areas") box = layout.box()
col = box.column(align=True)
col.label(text="Ocl Doesn't Support Fill Areas")
if not self.op.optimisation.use_opencamlib: if not self.op.optimisation.use_opencamlib:
layout.prop(self.op, "slice_detail") col.prop(self.op, "slice_detail")
layout.prop(self.op, "waterline_fill") col.prop(self.op, "waterline_fill")
if self.op.waterline_fill: if self.op.waterline_fill:
layout.prop(self.op, "dist_between_paths") col.prop(self.op, "dist_between_paths")
layout.prop(self.op, "waterline_project") col.prop(self.op, "waterline_project")
layout.label(text="Waterline Needs a Skin Margin") col.label(text="Waterline Needs a Skin Margin")
# Carve Options # Carve Options
if self.op.strategy in ["CARVE"]: if self.op.strategy in ["CARVE"]:
layout.prop(self.op, "carve_depth") box = layout.box()
layout.prop(self.op, "dist_along_paths") col = box.column(align=True)
col.prop(self.op, "carve_depth")
col.prop(self.op, "dist_along_paths")
# Medial Axis Options # Medial Axis Options
if self.op.strategy in ["MEDIAL_AXIS"]: if self.op.strategy in ["MEDIAL_AXIS"]:
layout.prop(self.op, "medial_axis_threshold") box = layout.box()
layout.prop(self.op, "medial_axis_subdivision") col = box.column(align=True)
layout.prop(self.op, "add_pocket_for_medial") col.prop(self.op, "medial_axis_threshold")
layout.prop(self.op, "add_mesh_for_medial") col.prop(self.op, "medial_axis_subdivision")
col.prop(self.op, "add_pocket_for_medial")
col.prop(self.op, "add_mesh_for_medial")
# Drill Options # Drill Options
if self.op.strategy in ["DRILL"]: if self.op.strategy in ["DRILL"]:
layout.prop(self.op, "drill_type") box = layout.box()
self.draw_enable_A_B_axis() col = box.column(align=True)
col.prop(self.op, "drill_type")
self.draw_enable_A_B_axis(col=col)
# Pocket Options # Pocket Options
if self.op.strategy in ["POCKET"]: if self.op.strategy in ["POCKET"]:
self.draw_overshoot() box = layout.box()
layout.prop(self.op, "pocketType") col = box.column(align=True)
self.draw_overshoot(col=col)
col.prop(self.op, "pocketType")
if self.op.pocketType == "PARALLEL": if self.op.pocketType == "PARALLEL":
layout.label(text="Warning:Parallel pocket Experimental", icon="ERROR") col.label(text="Warning:Parallel pocket Experimental", icon="ERROR")
layout.prop(self.op, "parallelPocketCrosshatch") col.prop(self.op, "parallelPocketCrosshatch")
layout.prop(self.op, "parallelPocketContour") col.prop(self.op, "parallelPocketContour")
layout.prop(self.op, "parallelPocketAngle") col.prop(self.op, "parallelPocketAngle")
else: else:
layout.prop(self.op, "pocket_option") col.prop(self.op, "pocket_option")
layout.prop(self.op, "pocketToCurve") col.prop(self.op, "pocketToCurve")
layout.prop(self.op, "dist_between_paths") col.prop(self.op, "dist_between_paths")
self.draw_cutter_engagement() self.draw_cutter_engagement(col=col)
self.draw_enable_A_B_axis() self.draw_enable_A_B_axis(col=col)
# Default Options # Default Options
if self.op.strategy not in [ if self.op.strategy not in [
@ -151,33 +167,39 @@ class CAM_OPERATION_PROPERTIES_Panel(CAMButtonsPanel, Panel):
"DRILL", "DRILL",
"POCKET", "POCKET",
]: ]:
layout.prop(self.op, "dist_between_paths") box = layout.box()
self.draw_cutter_engagement() col = box.column(align=True)
layout.prop(self.op, "dist_along_paths") col.prop(self.op, "dist_between_paths")
self.draw_cutter_engagement(col=col)
col.prop(self.op, "dist_along_paths")
if self.op.strategy in ["PARALLEL", "CROSS"]: if self.op.strategy in ["PARALLEL", "CROSS"]:
layout.prop(self.op, "parallel_angle") col.prop(self.op, "parallel_angle")
self.draw_enable_A_B_axis() self.draw_enable_A_B_axis(col=col)
layout.prop(self.op, "inverse") col.prop(self.op, "inverse")
# Bridges Options # Bridges Options
if self.level >= 1: if self.level >= 1:
if self.op.strategy not in ["POCKET", "DRILL", "CURVE", "MEDIAL_AXIS"]: if self.op.strategy not in ["POCKET", "DRILL", "CURVE", "MEDIAL_AXIS"]:
layout.prop(self.op, "use_bridges") header, panel = layout.panel_prop(self.op, "use_bridges")
if self.op.use_bridges: header.label(text="Bridges / Tabs")
layout.prop(self.op, "bridges_width") if panel:
layout.prop(self.op, "bridges_height") col = panel.column(align=True)
layout.prop_search(self.op, "bridges_collection_name", bpy.data, "collections") col.prop(self.op, "bridges_width", text="Width")
layout.prop(self.op, "use_bridge_modifiers") col.prop(self.op, "bridges_height", text="Height")
layout.operator("scene.cam_bridges_add", text="Autogenerate Bridges / Tabs") col.prop_search(self.op, "bridges_collection_name", bpy.data, "collections")
col.prop(self.op, "use_bridge_modifiers")
# Skin col.operator("scene.cam_bridges_add", text="Autogenerate")
self.layout.prop(self.op, "skin")
# Array # Array
if self.op.machine_axes == "3": if self.op.machine_axes == "3":
layout.prop(self.op, "array") header, panel = layout.panel_prop(self.op, "array")
if self.op.array: header.label(text="Array")
layout.prop(self.op, "array_x_count") if panel:
layout.prop(self.op, "array_x_distance") col = panel.column(align=True)
layout.prop(self.op, "array_y_count") col.prop(self.op, "array_x_count")
layout.prop(self.op, "array_y_distance") col.prop(self.op, "array_x_distance")
col.prop(self.op, "array_y_count")
col.prop(self.op, "array_y_distance")
# Skin
self.layout.prop(self.op, "skin")

Wyświetl plik

@ -28,6 +28,9 @@ class CAM_OPERATIONS_Panel(CAMButtonsPanel, Panel):
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False
# Presets # Presets
if self.level >= 1: if self.level >= 1:
row = layout.row(align=True) row = layout.row(align=True)
@ -69,7 +72,8 @@ class CAM_OPERATIONS_Panel(CAMButtonsPanel, Panel):
if not self.op.valid: if not self.op.valid:
layout.label(text="Select a Valid Object to Calculate the Path.") layout.label(text="Select a Valid Object to Calculate the Path.")
# will be disabled if not valid # will be disabled if not valid
layout.operator("object.calculate_cam_path", text="Calculate Path & Export Gcode") col = layout.column(align=True)
col.operator("object.calculate_cam_path", text="Calculate Path & Export Gcode")
# Export Gcode # Export Gcode
if self.level >= 1: if self.level >= 1:
@ -77,39 +81,39 @@ class CAM_OPERATIONS_Panel(CAMButtonsPanel, Panel):
if self.op.name is not None: if self.op.name is not None:
name = f"cam_path_{self.op.name}" name = f"cam_path_{self.op.name}"
if bpy.context.scene.objects.get(name) is not None: if bpy.context.scene.objects.get(name) is not None:
layout.operator("object.cam_export", text="Export Gcode ") col.operator("object.cam_export", text="Export Gcode ")
# Simulate Op # Simulate Op
layout.operator("object.cam_simulate", text="Simulate This Operation") col.operator("object.cam_simulate", text="Simulate This Operation")
# Op Name
layout.prop(self.op, "name")
box = layout.box()
col = box.column(align=True)
# Op Name
col.prop(self.op, "name")
# Op Filename # Op Filename
layout.prop(self.op, "filename") col.prop(self.op, "filename")
# Op Source # Op Source
layout.prop(self.op, "geometry_source") col.prop(self.op, "geometry_source")
if self.op.strategy == "CURVE": if self.op.strategy == "CURVE":
if self.op.geometry_source == "OBJECT": if self.op.geometry_source == "OBJECT":
layout.prop_search(self.op, "object_name", bpy.data, "objects") col.prop_search(self.op, "object_name", bpy.data, "objects")
elif self.op.geometry_source == "COLLECTION": elif self.op.geometry_source == "COLLECTION":
layout.prop_search(self.op, "collection_name", bpy.data, "collections") col.prop_search(self.op, "collection_name", bpy.data, "collections")
else: else:
if self.op.geometry_source == "OBJECT": if self.op.geometry_source == "OBJECT":
layout.prop_search(self.op, "object_name", bpy.data, "objects") col.prop_search(self.op, "object_name", bpy.data, "objects")
if self.op.enable_A: if self.op.enable_A:
layout.prop(self.op, "rotation_A") col.prop(self.op, "rotation_A")
if self.op.enable_B: if self.op.enable_B:
layout.prop(self.op, "rotation_B") col.prop(self.op, "rotation_B")
elif self.op.geometry_source == "COLLECTION": elif self.op.geometry_source == "COLLECTION":
layout.prop_search(self.op, "collection_name", bpy.data, "collections") col.prop_search(self.op, "collection_name", bpy.data, "collections")
else: else:
layout.prop_search(self.op, "source_image_name", bpy.data, "images") col.prop_search(self.op, "source_image_name", bpy.data, "images")
if self.op.strategy in ["CARVE", "PROJECTED_CURVE"]: if self.op.strategy in ["CARVE", "PROJECTED_CURVE"]:
layout.prop_search(self.op, "curve_object", bpy.data, "objects") col.prop_search(self.op, "curve_object", bpy.data, "objects")
if self.op.strategy == "PROJECTED_CURVE": if self.op.strategy == "PROJECTED_CURVE":
layout.prop_search(self.op, "curve_object1", bpy.data, "objects") col.prop_search(self.op, "curve_object1", bpy.data, "objects")

Wyświetl plik

@ -113,11 +113,15 @@ class CAM_OPTIMISATION_Panel(CAMButtonsPanel, Panel):
def draw(self, context): def draw(self, context):
if self.level >= 2 and self.op is not None: if self.level >= 2 and self.op is not None:
layout = self.layout layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False
# Optimize # Optimize
layout.prop(self.op.optimisation, "optimize") header, panel = layout.panel_prop(self.op.optimisation, "optimize")
if self.op.optimisation.optimize: header.label(text="Reduce Path Points")
layout.prop(self.op.optimisation, "optimize_threshold") if panel:
layout.separator() col = panel.column(align=True)
col.prop(self.op.optimisation, "optimize_threshold", text="Threshold (μm)")
# Exact Mode # Exact Mode
if not self.op.geometry_source == "OBJECT" or self.op.geometry_source == "COLLECTION": if not self.op.geometry_source == "OBJECT" or self.op.geometry_source == "COLLECTION":

Wyświetl plik

@ -15,18 +15,21 @@ class CAM_PACK_Panel(CAMButtonsPanel, Panel):
bl_label = "Pack Curves on Sheet" bl_label = "Pack Curves on Sheet"
bl_idname = "WORLD_PT_CAM_PACK" bl_idname = "WORLD_PT_CAM_PACK"
panel_interface_level = 2 panel_interface_level = 2
use_property_split = True
def draw(self, context): def draw(self, context):
if self.level >= 2: layout = self.layout
layout = self.layout layout.use_property_split = True
scene = bpy.context.scene layout.use_property_decorate = False
settings = scene.cam_pack
layout.operator("object.cam_pack_objects") scene = bpy.context.scene
layout.prop(settings, "sheet_fill_direction") settings = scene.cam_pack
layout.prop(settings, "sheet_x") layout.operator("object.cam_pack_objects")
layout.prop(settings, "sheet_y") layout.prop(settings, "sheet_fill_direction")
layout.prop(settings, "distance") layout.prop(settings, "sheet_x")
layout.prop(settings, "tolerance") layout.prop(settings, "sheet_y")
layout.prop(settings, "rotate") layout.prop(settings, "distance")
if settings.rotate: layout.prop(settings, "tolerance")
layout.prop(settings, "rotate_angle") layout.prop(settings, "rotate")
if settings.rotate:
layout.prop(settings, "rotate_angle")

Wyświetl plik

@ -15,14 +15,17 @@ class CAM_SLICE_Panel(CAMButtonsPanel, Panel):
bl_label = "Slice Model to Plywood Sheets" bl_label = "Slice Model to Plywood Sheets"
bl_idname = "WORLD_PT_CAM_SLICE" bl_idname = "WORLD_PT_CAM_SLICE"
panel_interface_level = 2 panel_interface_level = 2
use_property_split = True
def draw(self, context): def draw(self, context):
if self.level >= 2: layout = self.layout
layout = self.layout layout.use_property_split = True
scene = bpy.context.scene layout.use_property_decorate = False
settings = scene.cam_slice
layout.operator("object.cam_slice_objects") scene = bpy.context.scene
layout.prop(settings, "slice_distance") settings = scene.cam_slice
layout.prop(settings, "slice_above0") layout.operator("object.cam_slice_objects")
layout.prop(settings, "slice_3d") layout.prop(settings, "slice_distance")
layout.prop(settings, "indexes") layout.prop(settings, "slice_above0")
layout.prop(settings, "slice_3d")
layout.prop(settings, "indexes")