"""Fabex 'machine_settings.py'
All CAM machine properties.
"""
from bpy.props import (
BoolProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
IntProperty,
)
from bpy.types import PropertyGroup
from ..constants import PRECISION
from ..utilities.machine_utils import update_machine
[docs]
class CAM_MACHINE_Properties(PropertyGroup):
"""stores all data for machines"""
# name = StringProperty(name="Machine Name", default="Machine")
[docs]
post_processor: EnumProperty(
name="Post Processor",
items=(
(
"ISO",
"Iso",
"Exports standardized gcode ISO 6983 (RS-274)",
),
(
"MACH3",
"Mach3",
"Default mach3",
),
(
"EMC",
"LinuxCNC - EMC2",
"Linux based CNC control software - formally EMC2",
),
(
"FADAL",
"Fadal",
"Fadal VMC",
),
(
"GRBL",
"grbl",
"Optimized gcode for grbl firmware on Arduino with cnc shield",
),
(
"HEIDENHAIN",
"Heidenhain",
"Heidenhain",
),
(
"HEIDENHAIN530",
"Heidenhain530",
"Heidenhain530",
),
(
"TNC151",
"Heidenhain TNC151",
"Post Processor for the Heidenhain TNC151 machine",
),
(
"SIEGKX1",
"Sieg KX1",
"Sieg KX1",
),
(
"HM50",
"Hafco HM-50",
"Hafco HM-50",
),
(
"CENTROID",
"Centroid M40",
"Centroid M40",
),
(
"ANILAM",
"Anilam Crusader M",
"Anilam Crusader M",
),
(
"GRAVOS",
"Gravos",
"Gravos",
),
(
"WIN-PC",
"WinPC-NC",
"German CNC by Burkhard Lewetz",
),
(
"SHOPBOT MTC",
"ShopBot MTC",
"ShopBot MTC",
),
(
"LYNX_OTTER_O",
"Lynx Otter o",
"Lynx Otter o",
),
),
description="Post Processor",
default="MACH3",
)
# position definitions:
[docs]
use_position_definitions: BoolProperty(
name="Use Position Definitions",
description="Define own positions for op start, toolchange, ending position",
default=False,
)
[docs]
starting_position: FloatVectorProperty(
name="Start Position",
default=(0, 0, 0),
unit="LENGTH",
precision=PRECISION,
subtype="XYZ",
update=update_machine,
)
[docs]
mtc_position: FloatVectorProperty(
name="MTC Position",
default=(0, 0, 0),
unit="LENGTH",
precision=PRECISION,
subtype="XYZ",
update=update_machine,
)
[docs]
ending_position: FloatVectorProperty(
name="End Position",
default=(0, 0, 0),
unit="LENGTH",
precision=PRECISION,
subtype="XYZ",
update=update_machine,
)
[docs]
working_area: FloatVectorProperty(
name="Work Area",
default=(0.500, 0.500, 0.100),
unit="LENGTH",
precision=PRECISION,
subtype="XYZ",
update=update_machine,
)
[docs]
feedrate_min: FloatProperty(
name="Feedrate Minimum /min",
default=0.0,
min=0.00001,
max=320000,
precision=PRECISION,
unit="LENGTH",
)
[docs]
feedrate_max: FloatProperty(
name="Feedrate Maximum /min",
default=2,
min=0.00001,
max=320000,
precision=PRECISION,
unit="LENGTH",
)
[docs]
feedrate_default: FloatProperty(
name="Feedrate Default /min",
default=1.5,
min=0.00001,
max=320000,
precision=PRECISION,
unit="LENGTH",
)
[docs]
hourly_rate: FloatProperty(
name="Price per Hour",
default=100,
min=0.005,
precision=2,
)
# UNSUPPORTED:
[docs]
spindle_min: FloatProperty(
name="Spindle Speed Minimum RPM",
default=5000,
min=0.00001,
max=320000,
precision=1,
)
[docs]
spindle_max: FloatProperty(
name="Spindle Speed Maximum RPM",
default=30000,
min=0.00001,
max=320000,
precision=1,
)
[docs]
spindle_default: FloatProperty(
name="Spindle Speed Default RPM",
default=15000,
min=0.00001,
max=320000,
precision=1,
)
[docs]
spindle_start_time: FloatProperty(
name="Spindle Start Delay Seconds",
description="Wait for the spindle to start spinning before starting "
"the feeds , in seconds",
default=0,
min=0.0000,
max=320000,
precision=1,
)
[docs]
axis_4: BoolProperty(
name="4th Axis",
description="Machine has 4th axis",
default=0,
)
[docs]
axis_5: BoolProperty(
name="5th Axis",
description="Machine has 5th axis",
default=0,
)
[docs]
eval_splitting: BoolProperty(
name="Split Files",
description="Split gcode file with large number of operations",
default=True,
) # split large files
[docs]
split_limit: IntProperty(
name="Operations per File",
description="Split files with larger number of operations than this",
min=1000,
max=20000000,
default=800000,
)
[docs]
collet_size: FloatProperty(
name="Collet Size",
description="Collet size for collision detection",
default=33,
min=0.00001,
max=320000,
precision=PRECISION,
unit="LENGTH",
)
# post processor options
[docs]
output_block_numbers: BoolProperty(
name="Output Block Numbers",
description="Output block numbers ie N10 at start of line",
default=False,
)
[docs]
start_block_number: IntProperty(
name="Start Block Number",
description="The starting block number ie 10",
default=10,
)
[docs]
block_number_increment: IntProperty(
name="Block Number Increment",
description="How much the block number should " "increment for the next line",
default=10,
)