cam.properties#
Fabex ‘properties.__init__.py’ © 2012 Vilem Novak
Import Properties, Register and Unregister Classes
Submodules#
Attributes#
Classes#
Functions#
|
|
|
Update the camera operation based on the current context. |
|
|
Package Contents#
- class CAM_CHAIN_Properties[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)#
- invalid_reason: StringProperty(name='Chain Error', default='', update=chain_valid)#
- computing: BoolProperty(name='Computing Right Now', description='', default=False)#
- operations: CollectionProperty(type=CAM_OP_REFERENCE_Properties)#
- class CAM_OP_REFERENCE_Properties[source]#
Bases:
bpy.types.PropertyGroup
- name: StringProperty(name='Operation Name', default='Operation')#
- computing = False#
- class CAM_INFO_Properties[source]#
Bases:
bpy.types.PropertyGroup
- warnings: StringProperty(name='Warnings', description='Warnings', default='', update=update_operation)#
- chipload: FloatProperty(name='Chipload', description='Calculated chipload', default=0.0, unit='LENGTH', precision=CHIPLOAD_PRECISION)#
- chipload_per_tooth: StringProperty(name='Chipload per Tooth', description='The chipload divided by the number of teeth', default='')#
- duration: FloatProperty(name='Estimated Time', default=0.01, min=0.0, max=MAX_OPERATION_TIME, precision=PRECISION, unit='TIME')#
- class CAM_INTERFACE_Properties[source]#
Bases:
bpy.types.PropertyGroup
- level: EnumProperty(name='Interface', description='Choose visible options', items=['0', 'Basic', 'Only show essential options', '', 0, '1', 'Advanced', 'Show advanced options', '', 1, '2', 'Complete', 'Show all options', '', 2, '3', 'Experimental', 'Show experimental options', 'EXPERIMENTAL', 3], default='0', update=update_interface)#
- shading: EnumProperty(name='Shading', description='Choose viewport shading preset', items=['DEFAULT', 'Default', 'Standard viewport shading', 'DELUXE', 'Deluxe', 'Cavity, Curvature, Depth of Field, Shadows & Object Colors', 'CLEAN_DEFAULT', 'Clean Default', 'Standard viewport shading with no overlays', 'CLEAN_DELUXE', 'Clean Deluxe', 'Deluxe shading with no overlays', 'PREVIEW', 'Preview', 'HDRI Lighting Preview'], default='DEFAULT', update=update_shading)#
- layout: EnumProperty(name='Layout', description='Presets for all panel locations', items=['CLASSIC', 'Classic', 'Properties Area holds most panels, Tools holds the rest', 'MODERN', 'Modern', 'Properties holds Main panels, Sidebar holds Operation panels, Tools holds Tools', 'USER', 'User', 'Define your own locations for panels'], default='MODERN', update=update_layout)#
- main_location: EnumProperty(name='Main Panels', description='Location for Chains, Operations, Material, Machine, Pack, Slice Panels', items=['PROPERTIES', 'Properties', 'Default panel location is the Render tab of the Properties Area', 'SIDEBAR', 'Sidebar (N-Panel)', 'Common location for addon UI, press N to show/hide', 'TOOLS', 'Tools (T-Panel)', "Blender's Tool area, press T to show/hide"], default='PROPERTIES', update=update_user_layout)#
- operation_location: EnumProperty(name='Operation Panels', description='Location for Setup, Area, Cutter, Feedrate, Optimisation, Movement, G-code', items=['PROPERTIES', 'Properties', 'Default panel location is the Render tab of the Properties Area', 'SIDEBAR', 'Sidebar (N-Panel)', 'Common location for addon UI, press N to show/hide', 'TOOLS', 'Tools (T-Panel)', "Blender's Tool area, press T to show/hide"], default='SIDEBAR', update=update_user_layout)#
- tools_location: EnumProperty(name='Tools Panels', description='Location for Curve Tools, Curve Creators, Info', items=['PROPERTIES', 'Properties', 'Default panel location is the Render tab of the Properties Area', 'SIDEBAR', 'Sidebar (N-Panel)', 'Common location for addon UI, press N to show/hide', 'TOOLS', 'Tools (T-Panel)', "Blender's Tool area, press T to show/hide"], default='TOOLS', update=update_user_layout)#
- class CAM_MACHINE_Properties[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=PRECISION, subtype='XYZ', update=update_machine)#
- mtc_position: FloatVectorProperty(name='MTC Position', default=0, 0, 0, unit='LENGTH', precision=PRECISION, subtype='XYZ', update=update_machine)#
- ending_position: FloatVectorProperty(name='End Position', default=0, 0, 0, unit='LENGTH', precision=PRECISION, subtype='XYZ', update=update_machine)#
- working_area: FloatVectorProperty(name='Work Area', default=0.5, 0.5, 0.1, unit='LENGTH', precision=PRECISION, subtype='XYZ', update=update_machine)#
- feedrate_min: FloatProperty(name='Feedrate Minimum /min', default=0.0, min=1e-05, max=320000, precision=PRECISION, unit='LENGTH')#
- feedrate_max: FloatProperty(name='Feedrate Maximum /min', default=2, min=1e-05, max=320000, precision=PRECISION, unit='LENGTH')#
- feedrate_default: FloatProperty(name='Feedrate Default /min', default=1.5, min=1e-05, max=320000, precision=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)#
- axis_4: BoolProperty(name='4th Axis', description='Machine has 4th axis', default=0)#
- axis_5: 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=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 CAM_MATERIAL_Properties[source]#
Bases:
bpy.types.PropertyGroup
- estimate_from_model: BoolProperty(name='Estimate Cut Area from Model', description='Estimate cut area based on model geometry', default=True, update=update_material)#
- radius_around_model: FloatProperty(name='Radius Around Model', description='Increase cut area around the model on X and Y by this amount', default=0.0, unit='LENGTH', precision=PRECISION, update=update_material)#
- center_x: BoolProperty(name='Center on X Axis', description='Position model centered on X', default=False, update=update_material)#
- center_y: BoolProperty(name='Center on Y Axis', description='Position model centered on Y', default=False, update=update_material)#
- z_position: EnumProperty(name='Z Placement', items='ABOVE', 'Above', 'Place object vertically above the XY plane', 'BELOW', 'Below', 'Place object vertically below the XY plane', 'CENTERED', 'Centered', 'Place object vertically centered on the XY plane', description='Position below Zero', default='BELOW', update=update_material)#
- origin: FloatVectorProperty(name='Material Origin', default=0, 0, 0, unit='LENGTH', precision=PRECISION, subtype='XYZ', update=update_material)#
- size: FloatVectorProperty(name='Material Size', default=0.2, 0.2, 0.1, min=0, unit='LENGTH', precision=PRECISION, subtype='XYZ', update=update_material)#
- class CAM_MOVEMENT_Properties[source]#
Bases:
bpy.types.PropertyGroup
- type: EnumProperty(name='Movement Type', items='CONVENTIONAL', 'Conventional (Up)', 'Cutter rotates against the direction of the feed', 'CLIMB', 'Climb (Down)', 'Cutter rotates with the direction of the feed', 'MEANDER', 'Meander (Zig Zag)', 'Cutting is done both with and against the rotation of the spindle', description='movement type', default='CLIMB', update=update_operation)#
- insideout: EnumProperty(name='Direction', items='INSIDEOUT', 'Inside out', 'a', 'OUTSIDEIN', 'Outside in', 'a', description='Approach to the piece', default='INSIDEOUT', update=update_operation)#
- spindle_rotation: EnumProperty(name='Spindle Rotation', items='CW', 'Clockwise', 'a', 'CCW', 'Counter clockwise', 'a', description='Spindle rotation direction', default='CW', update=update_operation)#
- free_height: FloatProperty(name='Safe Height', description='Height where the machine can freely move without hitting the workpiece', default=0.01, min=0.0, max=32, precision=PRECISION, unit='LENGTH', update=update_operation)#
- useG64: BoolProperty(name='G64 Trajectory', description='Use only if your machine supports G64 code. LinuxCNC and Mach3 do', default=False, update=update_operation)#
- G64: FloatProperty(name='Path Control Mode with Optional Tolerance', default=0.0001, min=0.0, max=0.005, precision=PRECISION, unit='LENGTH', update=update_operation)#
- parallel_step_back: BoolProperty(name='Parallel Step Back', description='For roughing and finishing in one pass: mills material in climb mode, then steps back and goes between 2 last chunks back', default=False, update=update_operation)#
- helix_enter: BoolProperty(name='Helix Enter - EXPERIMENTAL', description='Enter material in helix', default=False, update=update_operation)#
- ramp_in_angle: FloatProperty(name='Ramp-in Angle', default=pi / 6, min=0, max=pi * 0.4999, precision=1, step=500, subtype='ANGLE', unit='ROTATION', update=update_operation)#
- helix_diameter: FloatProperty(name='Helix Diameter - % of Cutter Diameter', default=90, min=10, max=100, precision=1, subtype='PERCENTAGE', update=update_operation)#
- ramp: BoolProperty(name='Ramp-in - EXPERIMENTAL', description='Ramps down the whole contour, so the cutline looks like helix', default=False, update=update_operation)#
- zig_zag_ramp: BoolProperty(name='Zigzag_ramp - EXPERIMENTAL', description='Ramps down the whole contour, so the cutline looks like zigzag_', default=False, update=update_operation)#
- ramp_out: BoolProperty(name='Ramp-out - EXPERIMENTAL', description='Ramp out to not leave mark on surface', default=False, update=update_operation)#
- ramp_out_angle: FloatProperty(name='Ramp-out Angle', default=pi / 6, min=0, max=pi * 0.4999, precision=1, step=500, subtype='ANGLE', unit='ROTATION', update=update_operation)#
- retract_tangential: BoolProperty(name='Retract Tangential - EXPERIMENTAL', description='Retract from material in circular motion', default=False, update=update_operation)#
- retract_radius: FloatProperty(name='Retract Arc Radius', default=0.001, min=1e-06, max=100, precision=PRECISION, unit='LENGTH', update=update_operation)#
- retract_height: FloatProperty(name='Retract Arc Height', default=0.001, min=0.0, max=100, precision=PRECISION, unit='LENGTH', update=update_operation)#
- stay_low: BoolProperty(name='Stay Low if Possible', default=True, update=update_operation)#
- merge_distance: FloatProperty(name='Merge Distance - EXPERIMENTAL', default=0.0, min=0.0, max=0.1, precision=PRECISION, unit='LENGTH', update=update_operation)#
- protect_vertical: BoolProperty(name='Protect Vertical', description='The path goes only vertically next to steep areas', default=True, update=update_operation)#
- protect_vertical_limit: FloatProperty(name='Verticality Limit', description='What angle is already considered vertical', default=pi / 45, min=0, max=pi * 0.5, precision=0, step=100, subtype='ANGLE', unit='ROTATION', update=update_operation)#
- class CAM_OPTIMISATION_Properties[source]#
Bases:
bpy.types.PropertyGroup
- optimize: BoolProperty(name='Reduce Path Points', description='Reduce path points', default=True, update=update_operation)#
- optimize_threshold: FloatProperty(name='Reduction Threshold in μm', default=0.2, min=1e-09, max=1000, precision=20, update=update_operation)#
- use_exact: BoolProperty(name='Use Exact Mode', description='Exact mode allows greater precision, but is slower with complex meshes', default=True, update=update_exact_mode)#
- imgres_limit: IntProperty(name='Maximum Resolution in Megapixels', default=16, min=1, max=512, description='Limits total memory usage and prevents crashes. Increase it if you know what are doing', update=update_zbuffer_image)#
- pixsize: FloatProperty(name='Sampling Raster Detail', default=0.0001, min=1e-05, max=0.1, precision=PRECISION, unit='LENGTH', update=update_zbuffer_image)#
- use_opencamlib: BoolProperty(name='Use OpenCAMLib', description='Use OpenCAMLib to sample paths or get waterline shape', default=False, update=update_opencamlib)#
- exact_subdivide_edges: BoolProperty(name='Auto Subdivide Long Edges', description='This can avoid some collision issues when importing CAD models', default=False, update=update_exact_mode)#
- circle_detail: IntProperty(name='Detail of Circles Used for Curve Offsets', default=64, min=12, max=512, update=update_operation)#
- simulation_detail: FloatProperty(name='Simulation Sampling Raster Detail', default=0.0002, min=1e-05, max=0.01, precision=PRECISION, unit='LENGTH', update=update_operation)#
- update_operation(self, context)[source]#
Update the camera operation based on the current context.
This function retrieves the active camera operation from the Blender context and updates it using the updateRest function. It accesses the active operation from the scene’s camera operations and passes the current context to the updating function.
- Parameters:
context – The context in which the operation is being updated.