cam

Contents

cam#

BlenderCAM ‘__init__.py’ © 2012 Vilem Novak

Import Modules, Register and Unregister Classes

Submodules#

Attributes#

Classes#

UpdateChecker

Check for Updates

Updater

Update to Newer Version if Possible

UpdateSourceOperator

camOperation

camChain

opReference

CamCurveDrawer

Generates Drawers

CamCurveFlatCone

Generates cone from flat stock

CamCurveGear

Generates Involute Gears // version 1.1 by Leemon Baird, 2011, Leemon@Leemon.com

CamCurveHatch

Perform Hatch Operation on Single or Multiple Curves

CamCurveInterlock

Generates Interlock Along a Curve

CamCurveMortise

Generates Mortise Along a Curve

CamCurvePlate

Perform Generates Rounded Plate with Mounting Holes

CamCurvePuzzle

Generates Puzzle Joints and Interlocks

CamCustomCurve

Object Custom Curve

CamHypotrochoidCurve

Hypotrochoid

CamLissajousCurve

Lissajous

CamSineCurve

Object Sine

CamCurveBoolean

Perform Boolean Operation on Two or More Curves

CamCurveConvexHull

Perform Hull Operation on Single or Multiple Curves

CamCurveIntarsion

Makes Curve Cuttable Both Inside and Outside, for Intarsion and Joints

CamCurveOvercuts

Adds Overcuts for Slots

CamCurveOvercutsB

Adds Overcuts for Slots

CamCurveRemoveDoubles

Curve Remove Doubles

CamMeshGetPockets

Detect Pockets in a Mesh and Extract Them as Curves

CamOffsetSilhouete

Curve Offset Operation

CamObjectSilhouete

Object Silhouette

CNCCAM_ENGINE

machineSettings

stores all data for machines

CalculatePath

Calculate CAM Paths

CamBridgesAdd

Add Bridge Objects to Curve

CamChainAdd

Add New CAM Chain

CamChainRemove

Remove CAM Chain

CamChainOperationAdd

Add Operation to Chain

CamChainOperationRemove

Remove Operation from Chain

CamChainOperationUp

Add Operation to Chain

CamChainOperationDown

Add Operation to Chain

CamOperationAdd

Add New CAM Operation

CamOperationCopy

Copy CAM Operation

CamOperationRemove

Remove CAM Operation

CamOperationMove

Move CAM Operation

CamOrientationAdd

Add Orientation to CAM Operation, for Multiaxis Operations

CamPackObjects

Calculate All CAM Paths

CamSliceObjects

Slice a Mesh Object Horizontally

CAMSimulate

Simulate CAM Operation

CAMSimulateChain

Simulate CAM Chain, Compared to Single Op Simulation Just Writes Into One Image and Thus Enables

KillPathsBackground

Remove CAM Path Processes in Background.

PathsAll

Calculate All CAM Paths

PathsBackground

Calculate CAM Paths in Background. File Has to Be Saved Before.

PathsChain

Calculate a Chain and Export the G-code Alltogether.

PathExport

Export G-code. Can Be Used only when the Path Object Is Present

PathExportChain

Calculate a Chain and Export the G-code Together.

PackObjectsSettings

stores all data for machines

AddPresetCamCutter

Add a Cutter Preset

AddPresetCamMachine

Add a Cam Machine Preset

AddPresetCamOperation

Add an Operation Preset

CAM_CUTTER_MT_presets

CAM_MACHINE_MT_presets

CAM_OPERATION_MT_presets

SliceObjectsSettings

Stores All Data for Machines

CustomPanel

import_settings

VIEW3D_PT_tools_curvetools

VIEW3D_PT_tools_create

WM_OT_gcode_import

Import G-code, Travel Lines Don't Get Drawn

Functions#

get_panels()

Retrieve a list of panels for the Blender UI.

timer_update(context)

Monitor background processes related to camera path calculations.

check_operations_on_load(context)

Checks for any broken computations on load and resets them.

updateOperation(self, context)

Update the visibility and selection state of camera operations in the

register(→ None)

unregister(→ None)

Package Contents#

class UpdateChecker[source]#

Bases: bpy.types.Operator

Check for Updates

bl_idname = 'render.cam_check_updates'#
bl_label = 'Check for Updates in BlenderCAM Plugin'#
bl_options#
execute(context)[source]#
class Updater[source]#

Bases: bpy.types.Operator

Update to Newer Version if Possible

bl_idname = 'render.cam_update_now'#
bl_label = 'Update'#
bl_options#
execute(context)[source]#
install_zip_from_url(zip_url)[source]#
class UpdateSourceOperator[source]#

Bases: bpy.types.Operator

bl_idname = 'render.cam_set_update_source'#
bl_label = 'Set BlenderCAM Update Source'#
new_source: StringProperty(default='')#
execute(context)[source]#
class camOperation[source]#

Bases: bpy.types.PropertyGroup

material: PointerProperty(type=CAM_MATERIAL_Properties)#
info: PointerProperty(type=CAM_INFO_Properties)#
optimisation: PointerProperty(type=CAM_OPTIMISATION_Properties)#
movement: PointerProperty(type=CAM_MOVEMENT_Properties)#
name: StringProperty(name='Operation Name', default='Operation', update=updateRest)#
filename: StringProperty(name='File Name', default='Operation', update=updateRest)#
auto_export: BoolProperty(name='Auto Export', description='Export files immediately after path calculation', default=True)#
remove_redundant_points: BoolProperty(name='Simplify G-code', description='Remove redundant points sharing the same angle as the start vector', default=False)#
simplify_tol: IntProperty(name='Tolerance', description='lower number means more precise', default=50, min=1, max=1000)#
hide_all_others: BoolProperty(name='Hide All Others', description='Hide all other tool paths except toolpath associated with selected CAM operation', default=False)#
parent_path_to_object: BoolProperty(name='Parent Path to Object', description='Parent generated CAM path to source object', default=False)#
object_name: StringProperty(name='Object', description='Object handled by this operation', update=updateOperationValid)#
collection_name: StringProperty(name='Collection', description='Object collection handled by this operation', update=updateOperationValid)#
curve_object: StringProperty(name='Curve Source', description='Curve which will be sampled along the 3D object', update=operationValid)#
curve_object1: StringProperty(name='Curve Target', description='Curve which will serve as attractor for the cutter when the cutter follows the curve', update=operationValid)#
source_image_name: StringProperty(name='Image Source', description='image source', update=operationValid)#
geometry_source: EnumProperty(name='Data Source', items='OBJECT', 'Object', 'a', 'COLLECTION', 'Collection of Objects', 'a', 'IMAGE', 'Image', 'a', description='Geometry source', default='OBJECT', update=updateOperationValid)#
cutter_type: EnumProperty(name='Cutter', items='END', 'End', 'End - Flat cutter', 'BALLNOSE', 'Ballnose', 'Ballnose cutter', 'BULLNOSE', 'Bullnose', 'Bullnose cutter ***placeholder **', 'VCARVE', 'V-carve', 'V-carve cutter', 'BALLCONE', 'Ballcone', 'Ball with a Cone for Parallel - X', 'CYLCONE', 'Cylinder cone', 'Cylinder End with a Cone for Parallel - X', 'LASER', 'Laser', 'Laser cutter', 'PLASMA', 'Plasma', 'Plasma cutter', 'CUSTOM', 'Custom-EXPERIMENTAL', 'Modelled cutter - not well tested yet.', description='Type of cutter used', default='END', update=updateZbufferImage)#
cutter_object_name: StringProperty(name='Cutter Object', description='Object used as custom cutter for this operation', update=updateZbufferImage)#
machine_axes: EnumProperty(name='Number of Axes', items='3', '3 axis', 'a', '4', '#4 axis - EXPERIMENTAL', 'a', '5', '#5 axis - EXPERIMENTAL', 'a', description='How many axes will be used for the operation', default='3', update=updateStrategy)#
strategy: EnumProperty(name='Strategy', items=getStrategyList, description='Strategy', update=updateStrategy)#
strategy4axis: EnumProperty(name='4 Axis Strategy', items='PARALLELR', 'Parallel around 1st rotary axis', 'Parallel lines around first rotary axis', 'PARALLEL', 'Parallel along 1st rotary axis', 'Parallel lines along first rotary axis', 'HELIX', 'Helix around 1st rotary axis', 'Helix around rotary axis', 'INDEXED', 'Indexed 3-axis', 'all 3 axis strategies, just applied to the 4th axis', 'CROSS', 'Cross', 'Cross paths', description='#Strategy', default='PARALLEL', update=updateStrategy)#
strategy5axis: EnumProperty(name='Strategy', items='INDEXED', 'Indexed 3-axis', 'All 3 axis strategies, just rotated by 4+5th axes', description='5 axis Strategy', default='INDEXED', update=updateStrategy)#
rotary_axis_1: EnumProperty(name='Rotary Axis', items='X', 'X', '', 'Y', 'Y', '', 'Z', 'Z', '', description='Around which axis rotates the first rotary axis', default='X', update=updateStrategy)#
rotary_axis_2: EnumProperty(name='Rotary Axis 2', items='X', 'X', '', 'Y', 'Y', '', 'Z', 'Z', '', description='Around which axis rotates the second rotary axis', default='Z', update=updateStrategy)#
skin: FloatProperty(name='Skin', description='Material to leave when roughing ', min=0.0, max=1.0, default=0.0, precision=constants.PRECISION, unit='LENGTH', update=updateOffsetImage)#
inverse: BoolProperty(name='Inverse Milling', description='Male to female model conversion', default=False, update=updateOffsetImage)#
array: BoolProperty(name='Use Array', description='Create a repetitive array for producing the same thing many times', default=False, update=updateRest)#
array_x_count: IntProperty(name='X Count', description='X count', default=1, min=1, max=32000, update=updateRest)#
array_y_count: IntProperty(name='Y Count', description='Y count', default=1, min=1, max=32000, update=updateRest)#
array_x_distance: FloatProperty(name='X Distance', description='Distance between operation origins', min=1e-05, max=1.0, default=0.01, precision=constants.PRECISION, unit='LENGTH', update=updateRest)#
array_y_distance: FloatProperty(name='Y Distance', description='Distance between operation origins', min=1e-05, max=1.0, default=0.01, precision=constants.PRECISION, unit='LENGTH', update=updateRest)#
pocket_option: EnumProperty(name='Start Position', items='INSIDE', 'Inside', 'a', 'OUTSIDE', 'Outside', 'a', description='Pocket starting position', default='INSIDE', update=updateRest)#
pocketToCurve: BoolProperty(name='Pocket to Curve', description='Generates a curve instead of a path', default=False, update=updateRest)#
cut_type: EnumProperty(name='Cut', items='OUTSIDE', 'Outside', 'a', 'INSIDE', 'Inside', 'a', 'ONLINE', 'On Line', 'a', description='Type of cutter used', default='OUTSIDE', update=updateRest)#
outlines_count: IntProperty(name='Outlines Count', description='Outlines count', default=1, min=1, max=32, update=updateCutout)#
straight: BoolProperty(name='Overshoot Style', description='Use overshoot cutout instead of conventional rounded', default=False, update=updateRest)#
cutter_id: IntProperty(name='Tool Number', description='For machines which support tool change based on tool id', min=0, max=10000, default=1, update=updateRest)#
cutter_diameter: FloatProperty(name='Cutter Diameter', description='Cutter diameter = 2x cutter radius', min=1e-06, max=10, default=0.003, precision=constants.PRECISION, unit='LENGTH', update=updateOffsetImage)#
cylcone_diameter: FloatProperty(name='Bottom Diameter', description='Bottom diameter', min=1e-06, max=10, default=0.003, precision=constants.PRECISION, unit='LENGTH', update=updateOffsetImage)#
cutter_length: FloatProperty(name='#Cutter Length', description='#not supported#Cutter length', min=0.0, max=100.0, default=25.0, precision=constants.PRECISION, unit='LENGTH', update=updateOffsetImage)#
cutter_flutes: IntProperty(name='Cutter Flutes', description='Cutter flutes', min=1, max=20, default=2, update=updateChipload)#
cutter_tip_angle: FloatProperty(name='Cutter V-carve Angle', description='Cutter V-carve angle', min=0.0, max=180.0, default=60.0, precision=constants.PRECISION, update=updateOffsetImage)#
ball_radius: FloatProperty(name='Ball Radius', description='Radius of', min=0.0, max=0.035, default=0.001, unit='LENGTH', precision=constants.PRECISION, update=updateOffsetImage)#
bull_corner_radius: FloatProperty(name='Bull Corner Radius', description='Radius tool bit corner', min=0.0, max=0.035, default=0.005, unit='LENGTH', precision=constants.PRECISION, update=updateOffsetImage)#
cutter_description: StringProperty(name='Tool Description', default='', update=updateOffsetImage)#
Laser_on: StringProperty(name='Laser ON String', default='M68 E0 Q100')#
Laser_off: StringProperty(name='Laser OFF String', default='M68 E0 Q0')#
Laser_cmd: StringProperty(name='Laser Command', default='M68 E0 Q')#
Laser_delay: FloatProperty(name='Laser ON Delay', description='Time after fast move to turn on laser and let machine stabilize', default=0.2)#
Plasma_on: StringProperty(name='Plasma ON String', default='M03')#
Plasma_off: StringProperty(name='Plasma OFF String', default='M05')#
Plasma_delay: FloatProperty(name='Plasma ON Delay', description='Time after fast move to turn on Plasma and let machine stabilize', default=0.1)#
Plasma_dwell: FloatProperty(name='Plasma Dwell Time', description='Time to dwell and warm up the torch', default=0.0)#
dist_between_paths: FloatProperty(name='Distance Between Toolpaths', default=0.001, min=1e-05, max=32, precision=constants.PRECISION, unit='LENGTH', update=updateRest)#
dist_along_paths: FloatProperty(name='Distance Along Toolpaths', default=0.0002, min=1e-05, max=32, precision=constants.PRECISION, unit='LENGTH', update=updateRest)#
parallel_angle: FloatProperty(name='Angle of Paths', default=0, min=-360, max=360, precision=0, subtype='ANGLE', unit='ROTATION', update=updateRest)#
old_rotation_A: FloatProperty(name='A Axis Angle', description='old value of Rotate A axis\nto specified angle', default=0, min=-360, max=360, precision=0, subtype='ANGLE', unit='ROTATION', update=updateRest)#
old_rotation_B: FloatProperty(name='A Axis Angle', description='old value of Rotate A axis\nto specified angle', default=0, min=-360, max=360, precision=0, subtype='ANGLE', unit='ROTATION', update=updateRest)#
rotation_A: FloatProperty(name='A Axis Angle', description='Rotate A axis\nto specified angle', default=0, min=-360, max=360, precision=0, subtype='ANGLE', unit='ROTATION', update=updateRotation)#
enable_A: BoolProperty(name='Enable A Axis', description='Rotate A axis', default=False, update=updateRotation)#
A_along_x: BoolProperty(name='A Along X ', description='A Parallel to X', default=True, update=updateRest)#
rotation_B: FloatProperty(name='B Axis Angle', description='Rotate B axis\nto specified angle', default=0, min=-360, max=360, precision=0, subtype='ANGLE', unit='ROTATION', update=updateRotation)#
enable_B: BoolProperty(name='Enable B Axis', description='Rotate B axis', default=False, update=updateRotation)#
carve_depth: FloatProperty(name='Carve Depth', default=0.001, min=-0.1, max=32, precision=constants.PRECISION, unit='LENGTH', update=updateRest)#
drill_type: EnumProperty(name='Holes On', items='MIDDLE_SYMETRIC', 'Middle of Symmetric Curves', 'a', 'MIDDLE_ALL', 'Middle of All Curve Parts', 'a', 'ALL_POINTS', 'All Points in Curve', 'a', description='Strategy to detect holes to drill', default='MIDDLE_SYMETRIC', update=updateRest)#
slice_detail: FloatProperty(name='Distance Between Slices', default=0.001, min=1e-05, max=32, precision=constants.PRECISION, unit='LENGTH', update=updateRest)#
waterline_fill: BoolProperty(name='Fill Areas Between Slices', description='Fill areas between slices in waterline mode', default=True, update=updateRest)#
waterline_project: BoolProperty(name='Project Paths - Not Recomended', description='Project paths in areas between slices', default=True, update=updateRest)#
use_layers: BoolProperty(name='Use Layers', description='Use layers for roughing', default=True, update=updateRest)#
stepdown: FloatProperty(name='', description='Layer height', default=0.01, min=1e-05, max=32, precision=constants.PRECISION, unit='LENGTH', update=updateRest)#
lead_in: FloatProperty(name='Lead-in Radius', description='Lead in radius for torch or laser to turn off', min=0.0, max=1, default=0.0, precision=constants.PRECISION, unit='LENGTH')#
lead_out: FloatProperty(name='Lead-out Radius', description='Lead out radius for torch or laser to turn off', min=0.0, max=1, default=0.0, precision=constants.PRECISION, unit='LENGTH')#
profile_start: IntProperty(name='Start Point', description='Start point offset', min=0, default=0, update=updateRest)#
minz: FloatProperty(name='Operation Depth End', default=-0.01, min=-3, max=3, precision=constants.PRECISION, unit='LENGTH', update=updateRest)#
minz_from: EnumProperty(name='Max Depth From', description='Set maximum operation depth', items='OBJECT', 'Object', 'Set max operation depth from Object', 'MATERIAL', 'Material', 'Set max operation depth from Material', 'CUSTOM', 'Custom', 'Custom max depth', default='OBJECT', update=updateRest)#
start_type: EnumProperty(name='Start Type', items='ZLEVEL', 'Z level', 'Starts on a given Z level', 'OPERATIONRESULT', 'Rest Milling', 'For rest milling, operations have to be put in chain for this to work well.', description='Starting depth', default='ZLEVEL', update=updateStrategy)#
maxz: FloatProperty(name='Operation Depth Start', description='operation starting depth', default=0, min=-3, max=10, precision=constants.PRECISION, unit='LENGTH', update=updateRest)#
first_down: BoolProperty(name='First Down', description='First go down on a contour, then go to the next one', default=False, update=update_operation)#
source_image_scale_z: FloatProperty(name='Image Source Depth Scale', default=0.01, min=-1, max=1, precision=constants.PRECISION, unit='LENGTH', update=updateZbufferImage)#
source_image_size_x: FloatProperty(name='Image Source X Size', default=0.1, min=-10, max=10, precision=constants.PRECISION, unit='LENGTH', update=updateZbufferImage)#
source_image_offset: FloatVectorProperty(name='Image Offset', default=0, 0, 0, unit='LENGTH', precision=constants.PRECISION, subtype='XYZ', update=updateZbufferImage)#
source_image_crop: BoolProperty(name='Crop Source Image', description='Crop source image - the position of the sub-rectangle is relative to the whole image, so it can be used for e.g. finishing just a part of an image', default=False, update=updateZbufferImage)#
source_image_crop_start_x: FloatProperty(name='Crop Start X', default=0, min=0, max=100, precision=constants.PRECISION, subtype='PERCENTAGE', update=updateZbufferImage)#
source_image_crop_start_y: FloatProperty(name='Crop Start Y', default=0, min=0, max=100, precision=constants.PRECISION, subtype='PERCENTAGE', update=updateZbufferImage)#
source_image_crop_end_x: FloatProperty(name='Crop End X', default=100, min=0, max=100, precision=constants.PRECISION, subtype='PERCENTAGE', update=updateZbufferImage)#
source_image_crop_end_y: FloatProperty(name='Crop End Y', default=100, min=0, max=100, precision=constants.PRECISION, subtype='PERCENTAGE', update=updateZbufferImage)#
ambient_behaviour: EnumProperty(name='Ambient', items='ALL', 'All', 'a', 'AROUND', 'Around', 'a', description='Handling ambient surfaces', default='ALL', update=updateZbufferImage)#
ambient_radius: FloatProperty(name='Ambient Radius', description='Radius around the part which will be milled if ambient is set to Around', min=0.0, max=100.0, default=0.01, precision=constants.PRECISION, unit='LENGTH', update=updateRest)#
use_limit_curve: BoolProperty(name='Use Limit Curve', description='A curve limits the operation area', default=False, update=updateRest)#
ambient_cutter_restrict: BoolProperty(name='Cutter Stays in Ambient Limits', description="Cutter doesn't get out from ambient limits otherwise goes on the border exactly", default=True, update=updateRest)#
limit_curve: StringProperty(name='Limit Curve', description='Curve used to limit the area of the operation', update=updateRest)#
feedrate: FloatProperty(name='Feedrate', description='Feedrate in units per minute', min=5e-05, max=50.0, default=1.0, precision=constants.PRECISION, unit='LENGTH', update=updateChipload)#
plunge_feedrate: FloatProperty(name='Plunge Speed', description='% of feedrate', min=0.1, max=100.0, default=50.0, precision=1, subtype='PERCENTAGE', update=updateRest)#
plunge_angle: FloatProperty(name='Plunge Angle', description='What angle is already considered to plunge', default=pi / 6, min=0, max=pi * 0.5, precision=0, subtype='ANGLE', unit='ROTATION', update=updateRest)#
spindle_rpm: FloatProperty(name='Spindle RPM', description='Spindle speed ', min=0, max=60000, default=12000, update=updateChipload)#
do_simulation_feedrate: BoolProperty(name='Adjust Feedrates with Simulation EXPERIMENTAL', description='Adjust feedrates with simulation', default=False, update=updateRest)#
dont_merge: BoolProperty(name="Don't Merge Outlines when Cutting", description='this is usefull when you want to cut around everything', default=False, update=updateRest)#
pencil_threshold: FloatProperty(name='Pencil Threshold', default=2e-05, min=1e-08, max=1, precision=constants.PRECISION, unit='LENGTH', update=updateRest)#
crazy_threshold1: FloatProperty(name='Min Engagement', default=0.02, min=1e-08, max=100, precision=constants.PRECISION, update=updateRest)#
crazy_threshold5: FloatProperty(name='Optimal Engagement', default=0.3, min=1e-08, max=100, precision=constants.PRECISION, update=updateRest)#
crazy_threshold2: FloatProperty(name='Max Engagement', default=0.5, min=1e-08, max=100, precision=constants.PRECISION, update=updateRest)#
crazy_threshold3: FloatProperty(name='Max Angle', default=2, min=1e-08, max=100, precision=constants.PRECISION, update=updateRest)#
crazy_threshold4: FloatProperty(name='Test Angle Step', default=0.05, min=1e-08, max=100, precision=constants.PRECISION, update=updateRest)#
add_pocket_for_medial: BoolProperty(name='Add Pocket Operation', description='Clean unremoved material after medial axis', default=True, update=updateRest)#
add_mesh_for_medial: BoolProperty(name='Add Medial mesh', description='Medial operation returns mesh for editing and further processing', default=False, update=updateRest)#
medial_axis_threshold: FloatProperty(name='Long Vector Threshold', default=0.001, min=1e-08, max=100, precision=constants.PRECISION, unit='LENGTH', update=updateRest)#
medial_axis_subdivision: FloatProperty(name='Fine Subdivision', default=0.0002, min=1e-08, max=100, precision=constants.PRECISION, unit='LENGTH', update=updateRest)#
use_bridges: BoolProperty(name='Use Bridges / Tabs', description='Use bridges in cutout', default=False, update=updateBridges)#
bridges_width: FloatProperty(name='Bridge / Tab Width', default=0.002, unit='LENGTH', precision=constants.PRECISION, update=updateBridges)#
bridges_height: FloatProperty(name='Bridge / Tab Height', description='Height from the bottom of the cutting operation', default=0.0005, unit='LENGTH', precision=constants.PRECISION, update=updateBridges)#
bridges_collection_name: StringProperty(name='Bridges / Tabs Collection', description='Collection of curves used as bridges', update=operationValid)#
use_bridge_modifiers: BoolProperty(name='Use Bridge / Tab Modifiers', description='Include bridge curve modifiers using render level when calculating operation, does not effect original bridge data', default=True, update=updateBridges)#
use_modifiers: BoolProperty(name='Use Mesh Modifiers', description='Include mesh modifiers using render level when calculating operation, does not effect original mesh', default=True, update=operationValid)#
min: FloatVectorProperty(name='Operation Minimum', default=0, 0, 0, unit='LENGTH', precision=constants.PRECISION, subtype='XYZ')#
max: FloatVectorProperty(name='Operation Maximum', default=0, 0, 0, unit='LENGTH', precision=constants.PRECISION, subtype='XYZ')#
output_header: BoolProperty(name='Output G-code Header', description='Output user defined G-code command header at start of operation', default=False)#
gcode_header: StringProperty(name='G-code Header', description='G-code commands at start of operation. Use ; for line breaks', default='G53 G0')#
enable_dust: BoolProperty(name='Dust Collector', description='Output user defined g-code command header at start of operation', default=False)#
gcode_start_dust_cmd: StringProperty(name='Start Dust Collector', description='Commands to start dust collection. Use ; for line breaks', default='M100')#
gcode_stop_dust_cmd: StringProperty(name='Stop Dust Collector', description='Command to stop dust collection. Use ; for line breaks', default='M101')#
enable_hold: BoolProperty(name='Hold Down', description='Output hold down command at start of operation', default=False)#
gcode_start_hold_cmd: StringProperty(name='G-code Header', description='G-code commands at start of operation. Use ; for line breaks', default='M102')#
gcode_stop_hold_cmd: StringProperty(name='G-code Header', description='G-code commands at end operation. Use ; for line breaks', default='M103')#
enable_mist: BoolProperty(name='Mist', description='Mist command at start of operation', default=False)#
gcode_start_mist_cmd: StringProperty(name='Start Mist', description='Command to start mist. Use ; for line breaks', default='M104')#
gcode_stop_mist_cmd: StringProperty(name='Stop Mist', description='Command to stop mist. Use ; for line breaks', default='M105')#
output_trailer: BoolProperty(name='Output G-code Trailer', description='Output user defined g-code command trailer at end of operation', default=False)#
gcode_trailer: StringProperty(name='G-code Trailer', description='G-code commands at end of operation. Use ; for line breaks', default='M02')#
offset_image#
zbuffer_image#
silhouete#
ambient#
operation_limit#
borderwidth = 50#
object = None#
path_object_name: StringProperty(name='Path Object', description='Actual CNC path')#
changed: BoolProperty(name='True if any of the Operation Settings has Changed', description='Mark for update', default=False)#
update_zbufferimage_tag: BoolProperty(name='Mark Z-Buffer Image for Update', description='Mark for update', default=True)#
update_offsetimage_tag: BoolProperty(name='Mark Offset Image for Update', description='Mark for update', default=True)#
update_silhouete_tag: BoolProperty(name='Mark Silhouette Image for Update', description='Mark for update', default=True)#
update_ambient_tag: BoolProperty(name='Mark Ambient Polygon for Update', description='Mark for update', default=True)#
update_bullet_collision_tag: BoolProperty(name='Mark Bullet Collision World for Update', description='Mark for update', default=True)#
valid: BoolProperty(name='Valid', description='True if operation is ok for calculation', default=True)#
changedata: StringProperty(name='Changedata', description='change data for checking if stuff changed.')#
computing: BoolProperty(name='Computing Right Now', description='', default=False)#
pid: IntProperty(name='Process Id', description='Background process id', default=-1)#
outtext: StringProperty(name='Outtext', description='outtext', default='')#
class camChain[source]#

Bases: bpy.types.PropertyGroup

index: IntProperty(name='Index', description='Index in the hard-defined camChains', default=-1)#
active_operation: IntProperty(name='Active Operation', description='Active operation in chain', default=-1)#
name: StringProperty(name='Chain Name', default='Chain')#
filename: StringProperty(name='File Name', default='Chain')#
valid: BoolProperty(name='Valid', description='True if whole chain is ok for calculation', default=True)#
computing: BoolProperty(name='Computing Right Now', description='', default=False)#
operations: CollectionProperty(type=opReference)#
class opReference[source]#

Bases: bpy.types.PropertyGroup

name: StringProperty(name='Operation Name', default='Operation')#
computing = False#
class CamCurveDrawer[source]#

Bases: bpy.types.Operator

Generates Drawers

bl_idname = 'object.curve_drawer'#
bl_label = 'Drawer'#
bl_options#
depth: FloatProperty(name='Drawer Depth', default=0.2, min=0, max=1.0, precision=4, unit='LENGTH')#
width: FloatProperty(name='Drawer Width', default=0.125, min=0, max=3.0, precision=4, unit='LENGTH')#
height: FloatProperty(name='Drawer Height', default=0.07, min=0, max=3.0, precision=4, unit='LENGTH')#
finger_size: FloatProperty(name='Maximum Finger Size', default=0.015, min=0.005, max=3.0, precision=4, unit='LENGTH')#
finger_tolerance: FloatProperty(name='Finger Play Room', default=4.5e-05, min=0, max=0.003, precision=4, unit='LENGTH')#
finger_inset: FloatProperty(name='Finger Inset', default=0.0, min=0.0, max=0.01, precision=4, unit='LENGTH')#
drawer_plate_thickness: FloatProperty(name='Drawer Plate Thickness', default=0.00477, min=0.001, max=3.0, precision=4, unit='LENGTH')#
drawer_hole_diameter: FloatProperty(name='Drawer Hole Diameter', default=0.02, min=1e-05, max=0.5, precision=4, unit='LENGTH')#
drawer_hole_offset: FloatProperty(name='Drawer Hole Offset', default=0.0, min=-0.5, max=0.5, precision=4, unit='LENGTH')#
overcut: BoolProperty(name='Add Overcut', default=False)#
overcut_diameter: FloatProperty(name='Overcut Tool Diameter', default=0.003175, min=-0.001, max=0.5, precision=4, unit='LENGTH')#
draw(context)[source]#

Draw the user interface properties for the object.

This method is responsible for rendering the layout of various properties related to the object’s dimensions and specifications. It adds properties such as depth, width, height, finger size, finger tolerance, finger inset, drawer plate thickness, drawer hole diameter, drawer hole offset, and overcut diameter to the layout. The overcut diameter property is only added if the overcut option is enabled.

Parameters:

context – The context in which the drawing occurs, typically containing information about the current state and environment.

execute(context)[source]#

Execute the drawer creation process in Blender.

This method orchestrates the creation of a drawer by calculating the necessary dimensions for the finger joints, creating the base plate, and generating the drawer components such as the back, front, sides, and bottom. It utilizes various helper functions to perform operations like boolean differences and transformations to achieve the desired geometry. The method also handles the placement of the drawer components in the 3D space.

Parameters:

context (bpy.context) – The Blender context that provides access to the current scene and objects.

Returns:

A dictionary indicating the completion status of the operation,

typically {‘FINISHED’}.

Return type:

dict

class CamCurveFlatCone[source]#

Bases: bpy.types.Operator

Generates cone from flat stock

bl_idname = 'object.curve_flat_cone'#
bl_label = 'Cone Flat Calculator'#
bl_options#
small_d: FloatProperty(name='Small Diameter', default=0.025, min=0, max=0.1, precision=4, unit='LENGTH')#
large_d: FloatProperty(name='Large Diameter', default=0.3048, min=0, max=3.0, precision=4, unit='LENGTH')#
height: FloatProperty(name='Height of Cone', default=0.457, min=0, max=3.0, precision=4, unit='LENGTH')#
tab: FloatProperty(name='Tab Witdh', default=0.01, min=0, max=0.1, precision=4, unit='LENGTH')#
intake: FloatProperty(name='Intake Diameter', default=0, min=0, max=0.2, precision=4, unit='LENGTH')#
intake_skew: FloatProperty(name='Intake Skew', default=1, min=0.1, max=4)#
resolution: IntProperty(name='Resolution', default=12, min=5, max=200)#
execute(context)[source]#

Execute the construction of a geometric shape in Blender.

This method performs a series of operations to create a geometric shape based on specified dimensions and parameters. It calculates various dimensions needed for the shape, including height and angles, and then uses Blender’s operations to create segments, rectangles, and ellipses. The function also handles the positioning and rotation of these shapes within the 3D space of Blender.

Parameters:

context – The context in which the operation is executed, typically containing information about the current scene and active objects in Blender.

Returns:

A dictionary indicating the completion status of the operation,

typically {‘FINISHED’}.

Return type:

dict

class CamCurveGear[source]#

Bases: bpy.types.Operator

Generates Involute Gears // version 1.1 by Leemon Baird, 2011, Leemon@Leemon.com http://www.thingiverse.com/thing:5505

bl_idname = 'object.curve_gear'#
bl_label = 'Gears'#
bl_options#
tooth_spacing: FloatProperty(name='Distance per Tooth', default=0.01, min=0.001, max=1.0, precision=4, unit='LENGTH')#
tooth_amount: IntProperty(name='Amount of Teeth', default=7, min=4)#
spoke_amount: IntProperty(name='Amount of Spokes', default=4, min=0)#
hole_diameter: FloatProperty(name='Hole Diameter', default=0.003175, min=0, max=3.0, precision=4, unit='LENGTH')#
rim_size: FloatProperty(name='Rim Size', default=0.003175, min=0, max=3.0, precision=4, unit='LENGTH')#
hub_diameter: FloatProperty(name='Hub Diameter', default=0.005, min=0, max=3.0, precision=4, unit='LENGTH')#
pressure_angle: FloatProperty(name='Pressure Angle', default=radians(20), min=0.001, max=pi / 2, precision=4, subtype='ANGLE', unit='ROTATION')#
clearance: FloatProperty(name='Clearance', default=0.0, min=0, max=0.1, precision=4, unit='LENGTH')#
backlash: FloatProperty(name='Backlash', default=0.0, min=0.0, max=0.1, precision=4, unit='LENGTH')#
rack_height: FloatProperty(name='Rack Height', default=0.012, min=0.001, max=1, precision=4, unit='LENGTH')#
rack_tooth_per_hole: IntProperty(name='Teeth per Mounting Hole', default=7, min=2)#
gear_type: EnumProperty(name='Type of Gear', items='PINION', 'Pinion', 'Circular Gear', 'RACK', 'Rack', 'Straight Rack', description='Type of gear', default='PINION')#
draw(context)[source]#

Draw the user interface properties for gear settings.

This method sets up the layout for various gear parameters based on the selected gear type. It dynamically adds properties to the layout for different gear types, allowing users to input specific values for gear design. The properties include gear type, tooth spacing, tooth amount, hole diameter, pressure angle, and backlash. Additional properties are displayed if the gear type is ‘PINION’ or ‘RACK’.

Parameters:

context – The context in which the layout is being drawn.

execute(context)[source]#

Execute the gear generation process based on the specified gear type.

This method checks the type of gear to be generated (either ‘PINION’ or ‘RACK’) and calls the appropriate function from the involute_gear module to create the gear or rack with the specified parameters. The parameters include tooth spacing, number of teeth, hole diameter, pressure angle, clearance, backlash, rim size, hub diameter, and spoke amount for pinion gears, and additional parameters for rack gears.

Parameters:

context – The context in which the execution is taking place.

Returns:

A dictionary indicating that the operation has finished with a key

’FINISHED’.

Return type:

dict

class CamCurveHatch[source]#

Bases: bpy.types.Operator

Perform Hatch Operation on Single or Multiple Curves

bl_idname = 'object.curve_hatch'#
bl_label = 'CrossHatch Curve'#
bl_options#
angle: FloatProperty(default=0, min=-pi / 2, max=pi / 2, precision=4, subtype='ANGLE')#
distance: FloatProperty(default=0.003, min=0, max=3.0, precision=4, unit='LENGTH')#
offset: FloatProperty(default=0, min=-1.0, max=3.0, precision=4, unit='LENGTH')#
height: FloatProperty(default=0.0, min=-1.0, max=1.0, precision=4, unit='LENGTH')#
amount: IntProperty(default=10, min=1, max=10000)#
hull: BoolProperty(default=False)#
contour: BoolProperty(default=False)#
contour_separate: BoolProperty(default=False)#
pocket_type: EnumProperty(name='Type Pocket', items='BOUNDS', 'Makes a bounds rectangle', 'Makes a bounding square', 'POCKET', 'Pocket', 'Makes a pocket inside a closed loop', description='Type of pocket', default='POCKET')#
classmethod poll(context)[source]#
invoke(context, event)[source]#

Set height to the active object’s Z location when the operator is invoked.

draw(context)[source]#

Draw the layout properties for the given context.

This method sets up the user interface layout by adding various properties such as angle, distance, offset, height, and pocket type. Depending on the selected pocket type, it conditionally adds additional properties like hull and contour. This allows for a dynamic and customizable interface based on user selections.

Parameters:

context – The context in which the layout is drawn, typically provided by the calling environment.

execute(context)[source]#
class CamCurveInterlock[source]#

Bases: bpy.types.Operator

Generates Interlock Along a Curve

bl_idname = 'object.curve_interlock'#
bl_label = 'Interlock'#
bl_options#
finger_size: FloatProperty(name='Finger Size', default=0.015, min=0.005, max=3.0, precision=4, unit='LENGTH')#
finger_tolerance: FloatProperty(name='Finger Play Room', default=4.5e-05, min=0, max=0.003, precision=4, unit='LENGTH')#
plate_thickness: FloatProperty(name='Plate Thickness', default=0.00477, min=0.001, max=3.0, unit='LENGTH')#
opencurve: BoolProperty(name='OpenCurve', default=False)#
interlock_type: EnumProperty(name='Type of Interlock', items='TWIST', 'Twist', 'Interlock requires 1/4 turn twist', 'GROOVE', 'Groove', 'Simple sliding groove', 'PUZZLE', 'Puzzle Interlock', 'Puzzle good for flat joints', description='Type of interlock', default='GROOVE')#
finger_amount: IntProperty(name='Finger Amount', default=2, min=1, max=100)#
tangent_angle: FloatProperty(name='Tangent Deviation', default=0.0, min=0.0, max=2, subtype='ANGLE', unit='ROTATION')#
fixed_angle: FloatProperty(name='Fixed Angle', default=0.0, min=0.0, max=2, subtype='ANGLE', unit='ROTATION')#
execute(context)[source]#

Execute the joinery operation based on the selected objects in the context.

This function checks the selected objects in the provided context and performs different operations depending on the type of the active object. If the active object is a curve or font and there are selected objects, it duplicates the object, converts it to a mesh, and processes its vertices to create a LineString representation. The function then calculates lengths and applies distributed interlock joinery based on the specified parameters. If no valid objects are selected, it defaults to a single interlock operation at the cursor’s location.

Parameters:

context (bpy.context) – The context containing selected objects and active object.

Returns:

A dictionary indicating the operation’s completion status.

Return type:

dict

class CamCurveMortise[source]#

Bases: bpy.types.Operator

Generates Mortise Along a Curve

bl_idname = 'object.curve_mortise'#
bl_label = 'Mortise'#
bl_options#
finger_size: BoolProperty(name='Kurf Bending only', default=False)#
min_finger_size: FloatProperty(name='Minimum Finger Size', default=0.0025, min=0.001, max=3.0, precision=4, unit='LENGTH')#
finger_tolerance: FloatProperty(name='Finger Play Room', default=4.5e-05, min=0, max=0.003, precision=4, unit='LENGTH')#
plate_thickness: FloatProperty(name='Drawer Plate Thickness', default=0.00477, min=0.001, max=3.0, unit='LENGTH')#
side_height: FloatProperty(name='Side Height', default=0.05, min=0.001, max=3.0, unit='LENGTH')#
flex_pocket: FloatProperty(name='Flex Pocket', default=0.004, min=0.0, max=1.0, unit='LENGTH')#
top_bottom: BoolProperty(name='Side Top & Bottom Fingers', default=True)#
opencurve: BoolProperty(name='OpenCurve', default=False)#
adaptive: FloatProperty(name='Adaptive Angle Threshold', default=0.0, min=0.0, max=2, subtype='ANGLE', unit='ROTATION')#
double_adaptive: BoolProperty(name='Double Adaptive Pockets', default=False)#
classmethod poll(context)[source]#
execute(context)[source]#

Execute the joinery process based on the provided context.

This function performs a series of operations to duplicate the active object, convert it to a mesh, and then process its geometry to create joinery features. It extracts vertex coordinates, converts them into a LineString data structure, and applies either variable or fixed finger joinery based on the specified parameters. The function also handles the creation of flexible sides and pockets if required.

Parameters:

context (bpy.context) – The context in which the operation is executed.

Returns:

A dictionary indicating the completion status of the operation.

Return type:

dict

class CamCurvePlate[source]#

Bases: bpy.types.Operator

Perform Generates Rounded Plate with Mounting Holes

bl_idname = 'object.curve_plate'#
bl_label = 'Sign Plate'#
bl_options#
radius: FloatProperty(name='Corner Radius', default=0.025, min=0, max=0.1, precision=4, unit='LENGTH')#
width: FloatProperty(name='Width of Plate', default=0.3048, min=0, max=3.0, precision=4, unit='LENGTH')#
height: FloatProperty(name='Height of Plate', default=0.457, min=0, max=3.0, precision=4, unit='LENGTH')#
hole_diameter: FloatProperty(name='Hole Diameter', default=0.01, min=0, max=3.0, precision=4, unit='LENGTH')#
hole_tolerance: FloatProperty(name='Hole V Tolerance', default=0.005, min=0, max=3.0, precision=4, unit='LENGTH')#
hole_vdist: FloatProperty(name='Hole Vert Distance', default=0.4, min=0, max=3.0, precision=4, unit='LENGTH')#
hole_hdist: FloatProperty(name='Hole Horiz Distance', default=0, min=0, max=3.0, precision=4, unit='LENGTH')#
hole_hamount: IntProperty(name='Hole Horiz Amount', default=1, min=0, max=50)#
resolution: IntProperty(name='Spline Resolution', default=50, min=3, max=150)#
plate_type: EnumProperty(name='Type Plate', items='ROUNDED', 'Rounded corner', 'Makes a rounded corner plate', 'COVE', 'Cove corner', 'Makes a plate with circles cut in each corner ', 'BEVEL', 'Bevel corner', 'Makes a plate with beveled corners ', 'OVAL', 'Elipse', 'Makes an oval plate', description='Type of Plate', default='ROUNDED')#
draw(context)[source]#

Draw the UI layout for plate properties.

This method creates a user interface layout for configuring various properties of a plate, including its type, dimensions, hole specifications, and resolution. It dynamically adds properties to the layout based on the selected plate type, allowing users to input relevant parameters.

Parameters:

context – The context in which the UI is being drawn.

execute(context)[source]#

Execute the creation of a plate based on specified parameters.

This function generates a plate shape in Blender based on the defined attributes such as width, height, radius, and plate type. It supports different plate types including rounded, oval, cove, and bevel. The function also handles the creation of holes in the plate if specified. It utilizes Blender’s curve operations to create the geometry and applies various transformations to achieve the desired shape.

Parameters:

context (bpy.context) – The Blender context in which the operation is performed.

Returns:

A dictionary indicating the result of the operation, typically

{‘FINISHED’} if successful.

Return type:

dict

class CamCurvePuzzle[source]#

Bases: bpy.types.Operator

Generates Puzzle Joints and Interlocks

bl_idname = 'object.curve_puzzle'#
bl_label = 'Puzzle Joints'#
bl_options#
diameter: FloatProperty(name='Tool Diameter', default=0.003175, min=0.001, max=3.0, precision=4, unit='LENGTH')#
finger_tolerance: FloatProperty(name='Finger Play Room', default=5e-05, min=0, max=0.003, precision=4, unit='LENGTH')#
finger_amount: IntProperty(name='Finger Amount', default=1, min=0, max=100)#
stem_size: IntProperty(name='Size of the Stem', default=2, min=1, max=200)#
width: FloatProperty(name='Width', default=0.1, min=0.005, max=3.0, precision=4, unit='LENGTH')#
height: FloatProperty(name='Height or Thickness', default=0.025, min=0.005, max=3.0, precision=4, unit='LENGTH')#
angle: FloatProperty(name='Angle A', default=pi / 4, min=-10, max=10, subtype='ANGLE', unit='ROTATION')#
angleb: FloatProperty(name='Angle B', default=pi / 4, min=-10, max=10, subtype='ANGLE', unit='ROTATION')#
radius: FloatProperty(name='Arc Radius', default=0.025, min=0.005, max=5, precision=4, unit='LENGTH')#
interlock_type: EnumProperty(name='Type of Shape', items='JOINT', 'Joint', 'Puzzle Joint interlock', 'BAR', 'Bar', 'Bar interlock', 'ARC', 'Arc', 'Arc interlock', 'MULTIANGLE', 'Multi angle', 'Multi angle joint', 'CURVEBAR', 'Arc Bar', 'Arc Bar interlock', 'CURVEBARCURVE', 'Arc Bar Arc', 'Arc Bar Arc interlock', 'CURVET', 'T curve', 'T curve interlock', 'T', 'T Bar', 'T Bar interlock', 'CORNER', 'Corner Bar', 'Corner Bar interlock', 'TILE', 'Tile', 'Tile interlock', 'OPENCURVE', 'Open Curve', 'Corner Bar interlock', description='Type of interlock', default='CURVET')#
gender: EnumProperty(name='Type Gender', items='MF', 'Male-Receptacle', 'Male and receptacle', 'F', 'Receptacle only', 'Receptacle', 'M', 'Male only', 'Male', description='Type of interlock', default='MF')#
base_gender: EnumProperty(name='Base Gender', items='MF', 'Male - Receptacle', 'Male - Receptacle', 'F', 'Receptacle', 'Receptacle', 'M', 'Male', 'Male', description='Type of interlock', default='M')#
multiangle_gender: EnumProperty(name='Multiangle Gender', items='MMF', 'Male Male Receptacle', 'M M F', 'MFF', 'Male Receptacle Receptacle', 'M F F', description='Type of interlock', default='MFF')#
mitre: BoolProperty(name='Add Mitres', default=False)#
twist_lock: BoolProperty(name='Add TwistLock', default=False)#
twist_thick: FloatProperty(name='Twist Thickness', default=0.0047, min=0.001, max=3.0, precision=4, unit='LENGTH')#
twist_percent: FloatProperty(name='Twist Neck', default=0.3, min=0.1, max=0.9, precision=4)#
twist_keep: BoolProperty(name='Keep Twist Holes', default=False)#
twist_line: BoolProperty(name='Add Twist to Bar', default=False)#
twist_line_amount: IntProperty(name='Amount of Separators', default=2, min=1, max=600)#
twist_separator: BoolProperty(name='Add Twist Separator', default=False)#
twist_separator_amount: IntProperty(name='Amount of Separators', default=2, min=2, max=600)#
twist_separator_spacing: FloatProperty(name='Separator Spacing', default=0.025, min=-0.004, max=1.0, precision=4, unit='LENGTH')#
twist_separator_edge_distance: FloatProperty(name='Separator Edge Distance', default=0.01, min=0.0005, max=0.1, precision=4, unit='LENGTH')#
tile_x_amount: IntProperty(name='Amount of X Fingers', default=2, min=1, max=600)#
tile_y_amount: IntProperty(name='Amount of Y Fingers', default=2, min=1, max=600)#
interlock_amount: IntProperty(name='Interlock Amount on Curve', default=2, min=0, max=200)#
overcut: BoolProperty(name='Add Overcut', default=False)#
overcut_diameter: FloatProperty(name='Overcut Tool Diameter', default=0.003175, min=-0.001, max=0.5, precision=4, unit='LENGTH')#
draw(context)[source]#

Draws the user interface layout for interlock type properties.

This method is responsible for creating and displaying the layout of various properties related to different interlock types in the user interface. It dynamically adjusts the layout based on the selected interlock type, allowing users to input relevant parameters such as dimensions, tolerances, and other characteristics specific to the chosen interlock type.

Parameters:

context – The context in which the layout is being drawn, typically provided by the user interface framework.

Returns:

This method does not return any value; it modifies the layout

directly.

Return type:

None

execute(context)[source]#

Execute the puzzle joinery process based on the provided context.

This method processes the selected objects in the given context to perform various types of puzzle joinery operations. It first checks if there are any selected objects and if the active object is a curve. If so, it duplicates the object, applies transformations, and converts it to a mesh. The method then extracts vertex coordinates and performs different joinery operations based on the specified interlock type. Supported interlock types include ‘FINGER’, ‘JOINT’, ‘BAR’, ‘ARC’, ‘CURVEBARCURVE’, ‘CURVEBAR’, ‘MULTIANGLE’, ‘T’, ‘CURVET’, ‘CORNER’, ‘TILE’, and ‘OPENCURVE’.

Parameters:

context (Context) – The context containing selected objects and the active object.

Returns:

A dictionary indicating the completion status of the operation.

Return type:

dict

class CamCustomCurve[source]#

Bases: bpy.types.Operator

Object Custom Curve

bl_idname = 'object.customcurve'#
bl_label = 'Custom Curve'#
bl_options#
xstring: StringProperty(name='X Equation', description='Equation x=F(t)', default='t')#
ystring: StringProperty(name='Y Equation', description='Equation y=F(t)', default='0')#
zstring: StringProperty(name='Z Equation', description='Equation z=F(t)', default='0.05*sin(2*pi*4*t)')#
iteration: IntProperty(name='Iteration', default=100, min=50, max=2000)#
maxt: FloatProperty(name='Wave Ends at X', default=0.5, min=-3.0, max=10, precision=4, unit='LENGTH')#
mint: FloatProperty(name='Wave Starts at X', default=0, min=-3.0, max=3, precision=4, unit='LENGTH')#
execute(context)[source]#
class CamHypotrochoidCurve[source]#

Bases: bpy.types.Operator

Hypotrochoid

bl_idname = 'object.hypotrochoid'#
bl_label = 'Spirograph Type Figure'#
bl_options#
typecurve: EnumProperty(name='Type of Curve', items='hypo', 'Hypotrochoid', 'Inside ring', 'epi', 'Epicycloid', 'Outside inner ring')#
R: FloatProperty(name='Big Circle Radius', default=0.25, min=0.001, max=100, precision=4, unit='LENGTH')#
r: FloatProperty(name='Small Circle Radius', default=0.18, min=0.0001, max=100, precision=4, unit='LENGTH')#
d: FloatProperty(name='Distance from Center of Interior Circle', default=0.05, min=0, max=100, precision=4, unit='LENGTH')#
dip: FloatProperty(name='Variable Depth from Center', default=0.0, min=-100, max=100, precision=4)#
execute(context)[source]#
class CamLissajousCurve[source]#

Bases: bpy.types.Operator

Lissajous

bl_idname = 'object.lissajous'#
bl_label = 'Lissajous Figure'#
bl_options#
amplitude_A: FloatProperty(name='Amplitude A', default=0.1, min=0, max=100, precision=4, unit='LENGTH')#
waveA: EnumProperty(name='Wave X', items='sine', 'Sine Wave', 'Sine Wave', 'triangle', 'Triangle Wave', 'triangle wave', default='sine')#
amplitude_B: FloatProperty(name='Amplitude B', default=0.1, min=0, max=100, precision=4, unit='LENGTH')#
waveB: EnumProperty(name='Wave Y', items='sine', 'Sine Wave', 'Sine Wave', 'triangle', 'Triangle Wave', 'triangle wave', default='sine')#
period_A: FloatProperty(name='Period A', default=1.1, min=0.001, max=100, precision=4, unit='LENGTH')#
period_B: FloatProperty(name='Period B', default=1.0, min=0.001, max=100, precision=4, unit='LENGTH')#
period_Z: FloatProperty(name='Period Z', default=1.0, min=0.001, max=100, precision=4, unit='LENGTH')#
amplitude_Z: FloatProperty(name='Amplitude Z', default=0.0, min=0, max=100, precision=4, unit='LENGTH')#
shift: FloatProperty(name='Phase Shift', default=0, min=-360, max=360, precision=4, unit='ROTATION')#
iteration: IntProperty(name='Iteration', default=500, min=50, max=10000)#
maxt: FloatProperty(name='Wave Ends at X', default=11, min=-3.0, max=1000000, precision=4, unit='LENGTH')#
mint: FloatProperty(name='Wave Starts at X', default=0, min=-10.0, max=3, precision=4, unit='LENGTH')#
execute(context)[source]#
class CamSineCurve[source]#

Bases: bpy.types.Operator

Object Sine

bl_idname = 'object.sine'#
bl_label = 'Periodic Wave'#
bl_options#
axis: EnumProperty(name='Displacement Axis', items='XY', 'Y to displace X axis', 'Y constant; X sine displacement', 'YX', 'X to displace Y axis', 'X constant; Y sine displacement', 'ZX', 'X to displace Z axis', 'X constant; Y sine displacement', 'ZY', 'Y to displace Z axis', 'X constant; Y sine displacement', default='ZX')#
wave: EnumProperty(name='Wave', items='sine', 'Sine Wave', 'Sine Wave', 'triangle', 'Triangle Wave', 'triangle wave', 'cycloid', 'Cycloid', 'Sine wave rectification', 'invcycloid', 'Inverse Cycloid', 'Sine wave rectification', default='sine')#
amplitude: FloatProperty(name='Amplitude', default=0.01, min=0, max=10, precision=4, unit='LENGTH')#
period: FloatProperty(name='Period', default=0.5, min=0.001, max=100, precision=4, unit='LENGTH')#
beatperiod: FloatProperty(name='Beat Period Offset', default=0.0, min=0.0, max=100, precision=4, unit='LENGTH')#
shift: FloatProperty(name='Phase Shift', default=0, min=-360, max=360, precision=4, unit='ROTATION')#
offset: FloatProperty(name='Offset', default=0, min=-1.0, max=1, precision=4, unit='LENGTH')#
iteration: IntProperty(name='Iteration', default=100, min=50, max=2000)#
maxt: FloatProperty(name='Wave Ends at X', default=0.5, min=-3.0, max=3, precision=4, unit='LENGTH')#
mint: FloatProperty(name='Wave Starts at X', default=0, min=-3.0, max=3, precision=4, unit='LENGTH')#
wave_distance: FloatProperty(name='Distance Between Multiple Waves', default=0.0, min=0.0, max=100, precision=4, unit='LENGTH')#
wave_angle_offset: FloatProperty(name='Angle Offset for Multiple Waves', default=pi / 2, min=-200 * pi, max=200 * pi, precision=4, unit='ROTATION')#
wave_amount: IntProperty(name='Amount of Multiple Waves', default=1, min=1, max=2000)#
execute(context)[source]#
class CamCurveBoolean[source]#

Bases: bpy.types.Operator

Perform Boolean Operation on Two or More Curves

bl_idname = 'object.curve_boolean'#
bl_label = 'Curve Boolean'#
bl_options#
boolean_type: EnumProperty(name='Type', items='UNION', 'Union', '', 'DIFFERENCE', 'Difference', '', 'INTERSECT', 'Intersect', '', description='Boolean type', default='UNION')#
classmethod poll(context)[source]#
execute(context)[source]#
invoke(context, event)[source]#
class CamCurveConvexHull[source]#

Bases: bpy.types.Operator

Perform Hull Operation on Single or Multiple Curves

bl_idname = 'object.convex_hull'#
bl_label = 'Convex Hull'#
bl_options#
classmethod poll(context)[source]#
execute(context)[source]#
class CamCurveIntarsion[source]#

Bases: bpy.types.Operator

Makes Curve Cuttable Both Inside and Outside, for Intarsion and Joints

bl_idname = 'object.curve_intarsion'#
bl_label = 'Intarsion'#
bl_options#
diameter: FloatProperty(name='Cutter Diameter', default=0.001, min=0, max=0.025, precision=4, unit='LENGTH')#
tolerance: FloatProperty(name='Cutout Tolerance', default=0.0001, min=0, max=0.005, precision=4, unit='LENGTH')#
backlight: FloatProperty(name='Backlight Seat', default=0.0, min=0, max=0.01, precision=4, unit='LENGTH')#
perimeter_cut: FloatProperty(name='Perimeter Cut Offset', default=0.0, min=0, max=0.1, precision=4, unit='LENGTH')#
base_thickness: FloatProperty(name='Base Material Thickness', default=0.0, min=0, max=0.1, precision=4, unit='LENGTH')#
intarsion_thickness: FloatProperty(name='Intarsion Material Thickness', default=0.0, min=0, max=0.1, precision=4, unit='LENGTH')#
backlight_depth_from_top: FloatProperty(name='Backlight Well Depth', default=0.0, min=0, max=0.1, precision=4, unit='LENGTH')#
classmethod poll(context)[source]#
execute(context)[source]#
invoke(context, event)[source]#
class CamCurveOvercuts[source]#

Bases: bpy.types.Operator

Adds Overcuts for Slots

bl_idname = 'object.curve_overcuts'#
bl_label = 'Add Overcuts - A'#
bl_options#
diameter: FloatProperty(name='Diameter', default=0.003175, min=0, max=100, precision=4, unit='LENGTH')#
threshold: FloatProperty(name='Threshold', default=pi / 2 * 0.99, min=-3.14, max=3.14, precision=4, subtype='ANGLE', unit='ROTATION')#
do_outer: BoolProperty(name='Outer Polygons', default=True)#
invert: BoolProperty(name='Invert', default=False)#
classmethod poll(context)[source]#
execute(context)[source]#
invoke(context, event)[source]#
class CamCurveOvercutsB[source]#

Bases: bpy.types.Operator

Adds Overcuts for Slots

bl_idname = 'object.curve_overcuts_b'#
bl_label = 'Add Overcuts - B'#
bl_options#
diameter: FloatProperty(name='Tool Diameter', default=0.003175, description='Tool bit diameter used in cut operation', min=0, max=100, precision=4, unit='LENGTH')#
style: EnumProperty(name='Style', items='OPEDGE', 'opposite edge', 'place corner overcuts on opposite edges', 'DOGBONE', 'Dog-bone / Corner Point', 'place overcuts at center of corners', 'TBONE', 'T-bone', 'place corner overcuts on the same edge', default='DOGBONE', description='style of overcut to use')#
threshold: FloatProperty(name='Max Inside Angle', default=pi / 2, min=-3.14, max=3.14, description='The maximum angle to be considered as an inside corner', precision=4, subtype='ANGLE', unit='ROTATION')#
do_outer: BoolProperty(name='Include Outer Curve', description='Include the outer curve if there are curves inside', default=True)#
do_invert: BoolProperty(name='Invert', description='invert overcut operation on all curves', default=True)#
otherEdge: BoolProperty(name='Other Edge', description='change to the other edge for the overcut to be on', default=False)#
classmethod poll(context)[source]#
execute(context)[source]#
invoke(context, event)[source]#
class CamCurveRemoveDoubles[source]#

Bases: bpy.types.Operator

Curve Remove Doubles

bl_idname = 'object.curve_remove_doubles'#
bl_label = 'Remove Curve Doubles'#
bl_options#
merg_distance: FloatProperty(name='Merge distance', default=0.0001, min=0.0, max=0.01)#
keep_bezier: BoolProperty(name='Keep bezier', default=False)#
classmethod poll(context)[source]#
execute(context)[source]#
draw(context)[source]#
invoke(context, event)[source]#
class CamMeshGetPockets[source]#

Bases: bpy.types.Operator

Detect Pockets in a Mesh and Extract Them as Curves

bl_idname = 'object.mesh_get_pockets'#
bl_label = 'Get Pocket Surfaces'#
bl_options#
threshold: FloatProperty(name='Horizontal Threshold', description='How horizontal the surface must be for a pocket: 1.0 perfectly flat, 0.0 is any orientation', default=0.99, min=0, max=1.0, precision=4)#
zlimit: FloatProperty(name='Z Limit', description='Maximum z height considered for pocket operation, default is 0.0', default=0.0, min=-1000.0, max=1000.0, precision=4, unit='LENGTH')#
classmethod poll(context)[source]#
execute(context)[source]#
class CamOffsetSilhouete[source]#

Bases: bpy.types.Operator

Curve Offset Operation

bl_idname = 'object.silhouete_offset'#
bl_label = 'Silhouette & Offset'#
bl_options#
offset: FloatProperty(name='Offset', default=0.003, min=-100, max=100, precision=4, unit='LENGTH')#
mitrelimit: FloatProperty(name='Mitre Limit', default=2, min=1e-08, max=20, precision=4, unit='LENGTH')#
style: EnumProperty(name='Type of Curve', items='1', 'Round', '', '2', 'Mitre', '', '3', 'Bevel', '')#
opencurve: BoolProperty(name='Dialate Open Curve', default=False)#
classmethod poll(context)[source]#
execute(context)[source]#
draw(context)[source]#
invoke(context, event)[source]#
class CamObjectSilhouete[source]#

Bases: bpy.types.Operator

Object Silhouette

bl_idname = 'object.silhouete'#
bl_label = 'Object Silhouette'#
bl_options#
classmethod poll(context)[source]#
execute(context)[source]#
class CNCCAM_ENGINE[source]#

Bases: bpy.types.RenderEngine

bl_idname = 'CNCCAM_RENDER'#
bl_label = 'CNC CAM'#
bl_use_eevee_viewport = True#
get_panels()[source]#

Retrieve a list of panels for the Blender UI.

This function compiles a list of UI panels that are compatible with the Blender rendering engine. It excludes certain predefined panels that are not relevant for the current context. The function checks all subclasses of the bpy.types.Panel and includes those that have the COMPAT_ENGINES attribute set to include ‘BLENDER_RENDER’, provided they are not in the exclusion list.

Returns:

A list of panel classes that are compatible with the Blender rendering engine, excluding specified panels.

Return type:

list

class machineSettings[source]#

Bases: bpy.types.PropertyGroup

stores all data for machines

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')#
use_position_definitions: BoolProperty(name='Use Position Definitions', description='Define own positions for op start, toolchange, ending position', default=False)#
starting_position: FloatVectorProperty(name='Start Position', default=0, 0, 0, unit='LENGTH', precision=constants.PRECISION, subtype='XYZ', update=updateMachine)#
mtc_position: FloatVectorProperty(name='MTC Position', default=0, 0, 0, unit='LENGTH', precision=constants.PRECISION, subtype='XYZ', update=updateMachine)#
ending_position: FloatVectorProperty(name='End Position', default=0, 0, 0, unit='LENGTH', precision=constants.PRECISION, subtype='XYZ', update=updateMachine)#
working_area: FloatVectorProperty(name='Work Area', default=0.5, 0.5, 0.1, unit='LENGTH', precision=constants.PRECISION, subtype='XYZ', update=updateMachine)#
feedrate_min: FloatProperty(name='Feedrate Minimum /min', default=0.0, min=1e-05, max=320000, precision=constants.PRECISION, unit='LENGTH')#
feedrate_max: FloatProperty(name='Feedrate Maximum /min', default=2, min=1e-05, max=320000, precision=constants.PRECISION, unit='LENGTH')#
feedrate_default: FloatProperty(name='Feedrate Default /min', default=1.5, min=1e-05, max=320000, precision=constants.PRECISION, unit='LENGTH')#
hourly_rate: FloatProperty(name='Price per Hour', default=100, min=0.005, precision=2)#
spindle_min: FloatProperty(name='Spindle Speed Minimum RPM', default=5000, min=1e-05, max=320000, precision=1)#
spindle_max: FloatProperty(name='Spindle Speed Maximum RPM', default=30000, min=1e-05, max=320000, precision=1)#
spindle_default: FloatProperty(name='Spindle Speed Default RPM', default=15000, min=1e-05, max=320000, precision=1)#
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.0, max=320000, precision=1)#
axis4: BoolProperty(name='#4th Axis', description='Machine has 4th axis', default=0)#
axis5: BoolProperty(name='#5th Axis', description='Machine has 5th axis', default=0)#
eval_splitting: BoolProperty(name='Split Files', description='Split gcode file with large number of operations', default=True)#
split_limit: IntProperty(name='Operations per File', description='Split files with larger number of operations than this', min=1000, max=20000000, default=800000)#
collet_size: FloatProperty(name='#Collet Size', description='Collet size for collision detection', default=33, min=1e-05, max=320000, precision=constants.PRECISION, unit='LENGTH')#
output_block_numbers: BoolProperty(name='Output Block Numbers', description='Output block numbers ie N10 at start of line', default=False)#
start_block_number: IntProperty(name='Start Block Number', description='The starting block number ie 10', default=10)#
block_number_increment: IntProperty(name='Block Number Increment', description='How much the block number should increment for the next line', default=10)#
output_tool_definitions: BoolProperty(name='Output Tool Definitions', description='Output tool definitions', default=True)#
output_tool_change: BoolProperty(name='Output Tool Change Commands', description='Output tool change commands ie: Tn M06', default=True)#
output_g43_on_tool_change: BoolProperty(name='Output G43 on Tool Change', description='Output G43 on tool change line', default=False)#
class CalculatePath[source]#

Bases: bpy.types.Operator, cam.async_op.AsyncOperatorMixin

Calculate CAM Paths

bl_idname = 'object.calculate_cam_path'#
bl_label = 'Calculate CAM Paths'#
bl_options#
classmethod poll(context)[source]#

Check if the current camera operation is valid.

This method checks the active camera operation in the given context and determines if it is valid. It retrieves the active operation from the scene’s camera operations and validates it using the isValid function. If the operation is valid, it returns True; otherwise, it returns False.

Parameters:

context (Context) – The context containing the scene and camera operations.

Returns:

True if the active camera operation is valid, False otherwise.

Return type:

bool

async execute_async(context)[source]#

Execute an asynchronous calculation of a path.

This method performs an asynchronous operation to calculate a path based on the provided context. It awaits the result of the calculation and prints the success status along with the return value. The return value can be used for further processing or analysis.

Parameters:

context (Any) – The context in which the path calculation is to be executed.

Returns:

The result of the path calculation.

Return type:

Any

class CamBridgesAdd[source]#

Bases: bpy.types.Operator

Add Bridge Objects to Curve

bl_idname = 'scene.cam_bridges_add'#
bl_label = 'Add Bridges / Tabs'#
bl_options#
classmethod poll(context)[source]#
execute(context)[source]#

Execute the camera operation in the given context.

This function retrieves the active camera operation from the current scene and adds automatic bridges to it. It is typically called within the context of a Blender operator to perform specific actions related to camera operations.

Parameters:

context – The context in which the operation is executed.

Returns:

A dictionary indicating the result of the operation, typically containing the key ‘FINISHED’ to signify successful completion.

Return type:

dict

class CamChainAdd[source]#

Bases: bpy.types.Operator

Add New CAM Chain

bl_idname = 'scene.cam_chain_add'#
bl_label = 'Add New CAM Chain'#
bl_options#
classmethod poll(context)[source]#
execute(context)[source]#

Execute the camera chain creation in the given context.

This function adds a new camera chain to the current scene in Blender. It updates the active camera chain index and assigns a name and filename to the newly created chain. The function is intended to be called within a Blender operator context.

Parameters:

context – The context in which the operation is executed.

Returns:

A dictionary indicating the operation’s completion status,

specifically returning {‘FINISHED’} upon successful execution.

Return type:

dict

class CamChainRemove[source]#

Bases: bpy.types.Operator

Remove CAM Chain

bl_idname = 'scene.cam_chain_remove'#
bl_label = 'Remove CAM Chain'#
bl_options#
classmethod poll(context)[source]#
execute(context)[source]#

Execute the camera chain removal process.

This function removes the currently active camera chain from the scene and decrements the active camera chain index if it is greater than zero. It modifies the Blender context to reflect these changes.

Parameters:

context – The context in which the function is executed.

Returns:

A dictionary indicating the status of the operation,

specifically {‘FINISHED’} upon successful execution.

Return type:

dict

class CamChainOperationAdd[source]#

Bases: bpy.types.Operator

Add Operation to Chain

bl_idname = 'scene.cam_chain_operation_add'#
bl_label = 'Add Operation to Chain'#
bl_options#
classmethod poll(context)[source]#
execute(context)[source]#

Execute an operation in the active camera chain.

This function retrieves the active camera chain from the current scene and adds a new operation to it. It increments the active operation index and assigns the name of the currently selected camera operation to the newly added operation. This is typically used in the context of managing camera operations in a 3D environment.

Parameters:

context – The context in which the operation is executed.

Returns:

A dictionary indicating the execution status, typically {‘FINISHED’}.

Return type:

dict

class CamChainOperationRemove[source]#

Bases: bpy.types.Operator

Remove Operation from Chain

bl_idname = 'scene.cam_chain_operation_remove'#
bl_label = 'Remove Operation from Chain'#
bl_options#
classmethod poll(context)[source]#
execute(context)[source]#

Execute the operation to remove the active operation from the camera chain.

This method accesses the current scene and retrieves the active camera chain. It then removes the currently active operation from that chain and adjusts the index of the active operation accordingly. If the active operation index becomes negative, it resets it to zero to ensure it remains within valid bounds.

Parameters:

context – The context in which the operation is executed.

Returns:

A dictionary indicating the execution status, typically

containing {‘FINISHED’} upon successful completion.

Return type:

dict

class CamChainOperationUp[source]#

Bases: bpy.types.Operator

Add Operation to Chain

bl_idname = 'scene.cam_chain_operation_up'#
bl_label = 'Add Operation to Chain'#
bl_options#
classmethod poll(context)[source]#
execute(context)[source]#

Execute the operation to move the active camera operation in the chain.

This function retrieves the current scene and the active camera chain. If there is an active operation (i.e., its index is greater than 0), it moves the operation one step up in the chain by adjusting the indices accordingly. After moving the operation, it updates the active operation index to reflect the change.

Parameters:

context – The context in which the operation is executed.

Returns:

A dictionary indicating the result of the operation,

specifically returning {‘FINISHED’} upon successful execution.

Return type:

dict

class CamChainOperationDown[source]#

Bases: bpy.types.Operator

Add Operation to Chain

bl_idname = 'scene.cam_chain_operation_down'#
bl_label = 'Add Operation to Chain'#
bl_options#
classmethod poll(context)[source]#
execute(context)[source]#

Execute the operation to move the active camera operation in the chain.

This function retrieves the current scene and the active camera chain. It checks if the active operation can be moved down in the list of operations. If so, it moves the active operation one position down and updates the active operation index accordingly.

Parameters:

context – The context in which the operation is executed.

Returns:

A dictionary indicating the result of the operation,

specifically {‘FINISHED’} when the operation completes successfully.

Return type:

dict

class CamOperationAdd[source]#

Bases: bpy.types.Operator

Add New CAM Operation

bl_idname = 'scene.cam_operation_add'#
bl_label = 'Add New CAM Operation'#
bl_options#
classmethod poll(context)[source]#
execute(context)[source]#

Execute the camera operation based on the active object in the scene.

This method retrieves the active object from the Blender context and performs operations related to camera settings. It checks if an object is selected and retrieves its bounding box dimensions. If no object is found, it reports an error and cancels the operation. If an object is present, it adds a new camera operation to the scene, sets its properties, and ensures that a machine area object is present.

Parameters:

context – The context in which the operation is executed.

class CamOperationCopy[source]#

Bases: bpy.types.Operator

Copy CAM Operation

bl_idname = 'scene.cam_operation_copy'#
bl_label = 'Copy Active CAM Operation'#
bl_options#
classmethod poll(context)[source]#
execute(context)[source]#

Execute the camera operation in the given context.

This method handles the execution of camera operations within the Blender scene. It first checks if there are any camera operations available. If not, it returns a cancellation status. If there are operations, it copies the active operation, increments the active operation index, and updates the name and filename of the new operation. The function also ensures that the new operation’s name is unique by appending a copy suffix or incrementing a numeric suffix.

Parameters:

context – The context in which the operation is executed.

Returns:

A dictionary indicating the status of the operation,

either {‘CANCELLED’} if no operations are available or {‘FINISHED’} if the operation was successfully executed.

Return type:

dict

class CamOperationRemove[source]#

Bases: bpy.types.Operator

Remove CAM Operation

bl_idname = 'scene.cam_operation_remove'#
bl_label = 'Remove CAM Operation'#
bl_options#
classmethod poll(context)[source]#
execute(context)[source]#

Execute the camera operation in the given context.

This function performs the active camera operation by deleting the associated object from the scene. It checks if there are any camera operations available and handles the deletion of the active operation’s object. If the active operation is removed, it updates the active operation index accordingly. Additionally, it manages a dictionary that tracks hidden objects.

Parameters:

context (bpy.context) – The Blender context containing the scene and operations.

Returns:

A dictionary indicating the result of the operation, either

{‘CANCELLED’} if no operations are available or {‘FINISHED’} if the operation was successfully executed.

Return type:

dict

class CamOperationMove[source]#

Bases: bpy.types.Operator

Move CAM Operation

bl_idname = 'scene.cam_operation_move'#
bl_label = 'Move CAM Operation in List'#
bl_options#
direction: EnumProperty(name='Direction', items='UP', 'Up', '', 'DOWN', 'Down', '', description='Direction', default='DOWN')#
classmethod poll(context)[source]#
execute(context)[source]#

Execute a camera operation based on the specified direction.

This method modifies the active camera operation in the Blender context based on the direction specified. If the direction is ‘UP’, it moves the active operation up in the list, provided it is not already at the top. Conversely, if the direction is not ‘UP’, it moves the active operation down in the list, as long as it is not at the bottom. The method updates the active operation index accordingly.

Parameters:

context – The context in which the operation is executed.

Returns:

A dictionary indicating the operation has finished, with the key ‘FINISHED’.

Return type:

dict

class CamOrientationAdd[source]#

Bases: bpy.types.Operator

Add Orientation to CAM Operation, for Multiaxis Operations

bl_idname = 'scene.cam_orientation_add'#
bl_label = 'Add Orientation'#
bl_options#
classmethod poll(context)[source]#
execute(context)[source]#

Execute the camera orientation operation in Blender.

This function retrieves the active camera operation from the current scene, creates an empty object to represent the camera orientation, and adds it to a specified group. The empty object is named based on the operation’s name and the current count of objects in the group. The size of the empty object is set to a predefined value for visibility.

Parameters:

context – The context in which the operation is executed.

Returns:

A dictionary indicating the operation’s completion status,

typically {‘FINISHED’}.

Return type:

dict

class CamPackObjects[source]#

Bases: bpy.types.Operator

Calculate All CAM Paths

bl_idname = 'object.cam_pack_objects'#
bl_label = 'Pack Curves on Sheet'#
bl_options#
execute(context)[source]#

Execute the operation in the given context.

This function sets the Blender object mode to ‘OBJECT’, retrieves the currently selected objects, and calls the packCurves function from the pack module. It is typically used to finalize operations on selected objects in Blender.

Parameters:

context – The context in which the operation is executed.

Returns:

A dictionary indicating the completion status of the operation.

Return type:

dict

draw(context)[source]#
class CamSliceObjects[source]#

Bases: bpy.types.Operator

Slice a Mesh Object Horizontally

bl_idname = 'object.cam_slice_objects'#
bl_label = 'Slice Object - Useful for Lasercut Puzzles etc'#
bl_options#
execute(context)[source]#

Execute the slicing operation on the active Blender object.

This function retrieves the currently active object in the Blender context and performs a slicing operation on it using the sliceObject function from the cam module. The operation is intended to modify the object based on the slicing logic defined in the external module.

Parameters:

context – The context in which the operation is executed.

Returns:

A dictionary indicating the result of the operation,

typically containing the key ‘FINISHED’ upon successful execution.

Return type:

dict

draw(context)[source]#
class CAMSimulate[source]#

Bases: bpy.types.Operator, cam.async_op.AsyncOperatorMixin

Simulate CAM Operation This Is Performed by: Creating an Image, Painting Z Depth of the Brush Subtractively. Works only for Some Operations, Can Not Be Used for 4-5 Axis.

bl_idname = 'object.cam_simulate'#
bl_label = 'CAM Simulation'#
bl_options#
operation: StringProperty(name='Operation', description='Specify the operation to calculate', default='Operation')#
async execute_async(context)[source]#

Execute an asynchronous simulation operation based on the active camera operation.

This method retrieves the current scene and the active camera operation. It constructs the operation name and checks if the corresponding object exists in the Blender data. If it does, it attempts to run the simulation asynchronously. If the simulation is cancelled, it returns a cancellation status. If the object does not exist, it reports an error and returns a finished status.

Parameters:

context – The context in which the operation is executed.

Returns:

A dictionary indicating the status of the operation, either

{‘CANCELLED’} or {‘FINISHED’}.

Return type:

dict

draw(context)[source]#

Draws the user interface for selecting camera operations.

This method creates a layout element in the user interface that allows users to search and select a specific camera operation from a list of available operations defined in the current scene. It utilizes the Blender Python API to integrate with the UI.

Parameters:

context – The context in which the drawing occurs, typically provided by Blender’s UI system.

class CAMSimulateChain[source]#

Bases: bpy.types.Operator, cam.async_op.AsyncOperatorMixin

Simulate CAM Chain, Compared to Single Op Simulation Just Writes Into One Image and Thus Enables to See how Ops Work Together.

bl_idname = 'object.cam_simulate_chain'#
bl_label = 'CAM Simulation'#
bl_options#
classmethod poll(context)[source]#

Check the validity of the active camera chain in the scene.

This method retrieves the currently active camera chain from the scene’s camera chains and checks its validity using the isChainValid function. It returns a boolean indicating whether the active camera chain is valid.

Parameters:

context (object) – The context containing the scene and its properties.

Returns:

True if the active camera chain is valid, False otherwise.

Return type:

bool

operation: StringProperty(name='Operation', description='Specify the operation to calculate', default='Operation')#
async execute_async(context)[source]#

Execute an asynchronous simulation for a specified camera chain.

This method retrieves the active camera chain from the current Blender scene and determines the operations associated with that chain. It checks if all operations are valid and can be simulated. If valid, it proceeds to execute the simulation asynchronously. If any operation is invalid, it logs a message and returns a finished status without performing the simulation.

Parameters:

context – The context in which the operation is executed.

Returns:

A dictionary indicating the status of the operation, either operation completed successfully.

Return type:

dict

draw(context)[source]#

Draw the user interface for selecting camera operations.

This function creates a user interface element that allows the user to search and select a specific camera operation from a list of available operations in the current scene. It utilizes the Blender Python API to create a property search layout.

Parameters:

context – The context in which the drawing occurs, typically containing information about the current scene and UI elements.

class KillPathsBackground[source]#

Bases: bpy.types.Operator

Remove CAM Path Processes in Background.

bl_idname = 'object.kill_calculate_cam_paths_background'#
bl_label = 'Kill Background Computation of an Operation'#
bl_options#
execute(context)[source]#

Execute the camera operation in the given context.

This method retrieves the active camera operation from the scene and checks if there are any ongoing processes related to camera path calculations. If such processes exist and match the current operation, they are terminated. The method then marks the operation as not computing and returns a status indicating that the execution has finished.

Parameters:

context – The context in which the operation is executed.

Returns:

A dictionary with a status key indicating the result of the execution.

Return type:

dict

class PathsAll[source]#

Bases: bpy.types.Operator

Calculate All CAM Paths

bl_idname = 'object.calculate_cam_paths_all'#
bl_label = 'Calculate All CAM Paths'#
bl_options#
execute(context)[source]#

Execute camera operations in the current Blender context.

This function iterates through the camera operations defined in the current scene and executes the background calculation for each operation. It sets the active camera operation index and prints the name of each operation being processed. This is typically used in a Blender add-on or script to automate camera path calculations.

Parameters:

context (bpy.context) – The current Blender context.

Returns:

A dictionary indicating the completion status of the operation,

typically {‘FINISHED’}.

Return type:

dict

draw(context)[source]#

Draws the user interface elements for the operation selection.

This method utilizes the Blender layout system to create a property search interface for selecting operations related to camera functionalities. It links the current instance’s operation property to the available camera operations defined in the Blender scene.

Parameters:

context (bpy.context) – The context in which the drawing occurs,

class PathsBackground[source]#

Bases: bpy.types.Operator

Calculate CAM Paths in Background. File Has to Be Saved Before.

bl_idname = 'object.calculate_cam_paths_background'#
bl_label = 'Calculate CAM Paths in Background'#
bl_options#
execute(context)[source]#

Execute the camera operation in the background.

This method initiates a background process to perform camera operations based on the current scene and active camera operation. It sets up the necessary paths for the script and starts a subprocess to handle the camera computations. Additionally, it manages threading to ensure that the main thread remains responsive while the background operation is executed.

Parameters:

context – The context in which the operation is executed.

Returns:

A dictionary indicating the completion status of the operation.

Return type:

dict

class PathsChain[source]#

Bases: bpy.types.Operator, cam.async_op.AsyncOperatorMixin

Calculate a Chain and Export the G-code Alltogether.

bl_idname = 'object.calculate_cam_paths_chain'#
bl_label = 'Calculate CAM Paths in Current Chain and Export Chain G-code'#
bl_options#
classmethod poll(context)[source]#

Check the validity of the active camera chain in the given context.

This method retrieves the active camera chain from the scene and checks its validity using the isChainValid function. It returns a boolean value indicating whether the camera chain is valid or not.

Parameters:

context (Context) – The context containing the scene and camera chain information.

Returns:

True if the active camera chain is valid, False otherwise.

Return type:

bool

async execute_async(context)[source]#

Execute asynchronous operations for camera path calculations.

This method sets the object mode for the Blender scene and processes a series of camera operations defined in the active camera chain. It reports the progress of each operation and handles any exceptions that may occur during the path calculation. After successful calculations, it exports the resulting mesh data to a specified G-code file.

Parameters:

context (bpy.context) – The Blender context containing scene and

Returns:

A dictionary indicating the result of the operation, typically {‘FINISHED’}.

Return type:

dict

class PathExport[source]#

Bases: bpy.types.Operator

Export G-code. Can Be Used only when the Path Object Is Present

bl_idname = 'object.cam_export'#
bl_label = 'Export Operation G-code'#
bl_options#
execute(context)[source]#

Execute the camera operation and export the G-code path.

This method retrieves the active camera operation from the current scene and exports the corresponding G-code path to a specified filename. It prints the filename and relevant operation details to the console for debugging purposes. The G-code path is generated based on the camera path data associated with the active operation.

Parameters:

context – The context in which the operation is executed.

Returns:

A dictionary indicating the completion status of the operation,

typically {‘FINISHED’}.

Return type:

dict

class PathExportChain[source]#

Bases: bpy.types.Operator

Calculate a Chain and Export the G-code Together.

bl_idname = 'object.cam_export_paths_chain'#
bl_label = 'Export CAM Paths in Current Chain as G-code'#
bl_options#
classmethod poll(context)[source]#

Check the validity of the active camera chain in the given context.

This method retrieves the currently active camera chain from the scene context and checks its validity using the isChainValid function. It returns a boolean indicating whether the active camera chain is valid or not.

Parameters:

context (object) – The context containing the scene and camera chain information.

Returns:

True if the active camera chain is valid, False otherwise.

Return type:

bool

execute(context)[source]#

Execute the camera path export process.

This function retrieves the active camera chain from the current scene and gathers the mesh data associated with the operations of that chain. It then exports the G-code path using the specified filename and the collected mesh data. The function is designed to be called within the context of a Blender operator.

Parameters:

context (bpy.context) – The context in which the operator is executed.

Returns:

A dictionary indicating the completion status of the operation,

typically {‘FINISHED’}.

Return type:

dict

timer_update(context)[source]#

Monitor background processes related to camera path calculations.

This function checks the status of background processes that are responsible for calculating camera paths. It retrieves the current processes and monitors their state. If a process has finished, it updates the corresponding camera operation and reloads the necessary paths. If the process is still running, it restarts the associated thread to continue monitoring.

Parameters:

context – The context in which the function is called, typically containing information about the current scene and operations.

class PackObjectsSettings[source]#

Bases: bpy.types.PropertyGroup

stores all data for machines

sheet_fill_direction: EnumProperty(name='Fill Direction', items='X', 'X', 'Fills sheet in X axis direction', 'Y', 'Y', 'Fills sheet in Y axis direction', description='Fill direction of the packer algorithm', default='Y')#
sheet_x: FloatProperty(name='X Size', description='Sheet size', min=0.001, max=10, default=0.5, precision=constants.PRECISION, unit='LENGTH')#
sheet_y: FloatProperty(name='Y Size', description='Sheet size', min=0.001, max=10, default=0.5, precision=constants.PRECISION, unit='LENGTH')#
distance: FloatProperty(name='Minimum Distance', description='Minimum distance between objects(should be at least cutter diameter!)', min=0.001, max=10, default=0.01, precision=constants.PRECISION, unit='LENGTH')#
tolerance: FloatProperty(name='Placement Tolerance', description='Tolerance for placement: smaller value slower placemant', min=0.001, max=0.02, default=0.005, precision=constants.PRECISION, unit='LENGTH')#
rotate: BoolProperty(name='Enable Rotation', description='Enable rotation of elements', default=True)#
rotate_angle: FloatProperty(name='Placement Angle Rotation Step', description='Bigger rotation angle, faster placemant', default=0.19635 * 4, min=pi / 180, max=pi, precision=5, subtype='ANGLE', unit='ROTATION')#
class AddPresetCamCutter[source]#

Bases: bl_operators.presets.AddPresetBase, bpy.types.Operator

Add a Cutter Preset

bl_idname = 'render.cam_preset_cutter_add'#
bl_label = 'Add Cutter Preset'#
preset_menu = 'CAM_CUTTER_MT_presets'#
preset_defines = ['d = bpy.context.scene.cam_operations[bpy.context.scene.cam_active_operation]']#
preset_values = ['d.cutter_id', 'd.cutter_type', 'd.cutter_diameter', 'd.cutter_length', 'd.cutter_flutes',...#
preset_subdir = 'cam_cutters'#
class AddPresetCamMachine[source]#

Bases: bl_operators.presets.AddPresetBase, bpy.types.Operator

Add a Cam Machine Preset

bl_idname = 'render.cam_preset_machine_add'#
bl_label = 'Add Machine Preset'#
preset_menu = 'CAM_MACHINE_MT_presets'#
preset_defines = ['d = bpy.context.scene.cam_machine', 's = bpy.context.scene.unit_settings']#
preset_values = ['d.post_processor', 's.system', 'd.use_position_definitions', 'd.starting_position',...#
preset_subdir = 'cam_machines'#
class AddPresetCamOperation[source]#

Bases: bl_operators.presets.AddPresetBase, bpy.types.Operator

Add an Operation Preset

bl_idname = 'render.cam_preset_operation_add'#
bl_label = 'Add Operation Preset'#
preset_menu = 'CAM_OPERATION_MT_presets'#
preset_defines = ['from pathlib import Path', 'bpy.ops.scene.cam_operation_add()', 'scene = bpy.context.scene',...#
preset_values = ['o.info.duration', 'o.info.chipload', 'o.info.warnings', 'o.material.estimate_from_model',...#
preset_subdir = 'cam_operations'#
class CAM_CUTTER_MT_presets[source]#

Bases: bpy.types.Menu

bl_label = 'Cutter Presets'#
preset_subdir = 'cam_cutters'#
preset_operator = 'script.execute_preset'#
draw#
class CAM_MACHINE_MT_presets[source]#

Bases: bpy.types.Menu

bl_label = 'Machine Presets'#
preset_subdir = 'cam_machines'#
preset_operator = 'script.execute_preset'#
draw#
classmethod post_cb(context)[source]#
class CAM_OPERATION_MT_presets[source]#

Bases: bpy.types.Menu

bl_label = 'Operation Presets'#
preset_subdir = 'cam_operations'#
preset_operator = 'script.execute_preset'#
draw#
class SliceObjectsSettings[source]#

Bases: bpy.types.PropertyGroup

Stores All Data for Machines

slice_distance: FloatProperty(name='Slicing Distance', description='Slices distance in z, should be most often thickness of plywood sheet.', min=0.001, max=10, default=0.005, precision=constants.PRECISION, unit='LENGTH')#
slice_above0: BoolProperty(name='Slice Above 0', description='only slice model above 0', default=False)#
slice_3d: BoolProperty(name='3D Slice', description='For 3D carving', default=False)#
indexes: BoolProperty(name='Add Indexes', description='Adds index text of layer + index', default=True)#
class CustomPanel[source]#

Bases: bpy.types.Panel

bl_space_type = 'VIEW_3D'#
bl_region_type = 'TOOLS'#
bl_context = 'objectmode'#
bl_label = 'Import G-code'#
bl_idname = 'OBJECT_PT_importgcode'#
bl_options#
classmethod poll(context)[source]#
draw(context)[source]#
class import_settings[source]#

Bases: bpy.types.PropertyGroup

split_layers: BoolProperty(name='Split Layers', description='Save every layer as single Objects in Collection', default=False)#
subdivide: BoolProperty(name='Subdivide', description="Only Subdivide gcode segments that are bigger than 'Segment length' ", default=False)#
output: EnumProperty(name='Output Type', items='mesh', 'Mesh', 'Make a mesh output', 'curve', 'Curve', 'Make curve output', default='curve')#
max_segment_size: FloatProperty(name='', description='Only Segments bigger than this value get subdivided', default=0.001, min=0.0001, max=1.0, unit='LENGTH')#
class VIEW3D_PT_tools_curvetools[source]#

Bases: bpy.types.Panel

bl_space_type = 'VIEW_3D'#
bl_region_type = 'TOOLS'#
bl_context = 'objectmode'#
bl_label = 'Curve CAM Tools'#
draw(context)[source]#
class VIEW3D_PT_tools_create[source]#

Bases: bpy.types.Panel

bl_space_type = 'VIEW_3D'#
bl_region_type = 'TOOLS'#
bl_context = 'objectmode'#
bl_label = 'Curve CAM Creators'#
bl_option = 'DEFAULT_CLOSED'#
draw(context)[source]#
class WM_OT_gcode_import[source]#

Bases: bpy.types.Operator, bpy_extras.io_utils.ImportHelper

Import G-code, Travel Lines Don’t Get Drawn

bl_idname = 'wm.gcode_import'#
bl_label = 'Import G-code'#
filename_ext = '.txt'#
filter_glob: StringProperty(default='*.*', options={'HIDDEN'}, maxlen=255)#
execute(context)[source]#
check_operations_on_load(context)[source]#

Checks for any broken computations on load and resets them.

This function verifies the presence of necessary Blender add-ons and installs any that are missing. It also resets any ongoing computations in camera operations and sets the interface level to the previously used level when loading a new file. If the add-on has been updated, it copies the necessary presets from the source to the target directory. Additionally, it checks for updates to the camera plugin and updates operation presets if required.

Parameters:

context – The context in which the function is executed, typically containing information about the current Blender environment.

updateOperation(self, context)[source]#

Update the visibility and selection state of camera operations in the scene.

This method manages the visibility of objects associated with camera operations based on the current active operation. If the ‘hide_all_others’ flag is set to true, it hides all other objects except for the currently active one. If the flag is false, it restores the visibility of previously hidden objects. The method also attempts to highlight the currently active object in the 3D view and make it the active object in the scene.

Parameters:

context (bpy.types.Context) – The context containing the current scene and

classes[source]#
register() None[source]#
unregister() None[source]#