cam.operators.pack_op#

Fabex ‘ops.py’ © 2012 Vilem Novak

Blender Operator definitions are in this file. They mostly call the functions from ‘utils.py’

Classes#

CamPackObjects

Calculate All CAM Paths

Module Contents#

class CamPackObjects[source]#

Bases: bpy.types.Operator

Calculate All CAM Paths

bl_idname = 'object.cam_pack_objects'[source]#
bl_label = 'Pack Curves on Sheet'[source]#
bl_options[source]#
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')[source]#
sheet_x: FloatProperty(name='X Size', description='Sheet size', min=0.001, max=10, default=0.5, precision=PRECISION, unit='LENGTH')[source]#
sheet_y: FloatProperty(name='Y Size', description='Sheet size', min=0.001, max=10, default=0.5, precision=PRECISION, unit='LENGTH')[source]#
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=PRECISION, unit='LENGTH')[source]#
tolerance: FloatProperty(name='Placement Tolerance', description='Tolerance for placement: smaller value slower placemant', min=0.001, max=0.02, default=0.005, precision=PRECISION, unit='LENGTH')[source]#
rotate: BoolProperty(name='Enable Rotation', description='Enable rotation of elements', default=True)[source]#
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, step=500, subtype='ANGLE', unit='ROTATION')[source]#
invoke(context, event)[source]#
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 pack_curves 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]#