cam.operators.slice_op#
Fabex ‘slice_op.py’ © 2012 Vilem Novak
Blender Operator definitions are in this file. They mostly call the functions from ‘utils.py’
Classes#
Slice a Mesh Object Horizontally |
Module Contents#
- class CamSliceObjects[source]#
Bases:
bpy.types.Operator
Slice a Mesh Object Horizontally
- 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=PRECISION, unit='LENGTH')[source]#
- slice_above_0: BoolProperty(name='Slice Above 0', description='only slice model above 0', default=False)[source]#
- indexes: BoolProperty(name='Add Indexes', description='Adds index text of layer + index', default=True)[source]#
- execute(context)[source]#
Slice a 3D object into layers based on a specified thickness.
This function takes a 3D object and slices it into multiple layers according to the specified thickness. It creates a new collection for the slices and optionally creates text labels for each slice if the indexes parameter is set. The slicing can be done in either 2D or 3D based on the user’s selection. The function also handles the positioning of the slices based on the object’s bounding box.
- Parameters:
ob (bpy.types.Object) – The 3D object to be sliced.