fabex.operators.curve_tools_ops

Contents

fabex.operators.curve_tools_ops#

Fabex ‘curve_cam_tools.py’ © 2012 Vilem Novak, 2021 Alain Pelletier

Operators that perform various functions on existing curves.

Classes#

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

CamCurveSimpleOvercuts

Adds Simple Fillets / Overcuts for Slots

CamCurveBoneFilletOvercuts

Adds Dogbone, T-bone Fillets / Overcuts for Slots

CamCurveRemoveDoubles

Remove Duplicate Points from the Selected Curve

CamMeshGetPockets

Detect Pockets in a Mesh and Extract Them as Curves

CamOffsetSilhouete

Offset Object Silhouette

CamObjectSilhouette

Create Object Silhouette

Functions#

simple_intarsion(context[, radius])

Rounds sharp corners of a curve with radius

Module Contents#

class CamCurveBoolean[source]#

Bases: bpy.types.Operator

Perform Boolean Operation on Two or More Curves

bl_idname = 'object.curve_boolean'[source]#
bl_label = 'Curve Boolean'[source]#
bl_options: ClassVar[source]#
boolean_type: EnumProperty(name='Type', items='UNION', 'Union', '', 'DIFFERENCE', 'Difference', '', 'INTERSECT', 'Intersect', '', description='Boolean type', default='UNION')[source]#
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'[source]#
bl_label = 'Convex Hull'[source]#
bl_options: ClassVar[source]#
classmethod poll(context)[source]#
execute(context)[source]#
simple_intarsion(context, radius=0.0)[source]#

Rounds sharp corners of a curve with radius :param context: bpy.context :param radius: Radius of rounding

Returns: Renames result to original curve name

class CamCurveIntarsion[source]#

Bases: bpy.types.Operator

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

bl_idname = 'object.curve_intarsion'[source]#
bl_label = 'Intarsia'[source]#
bl_options: ClassVar[source]#
diameter: FloatProperty(name='Cutter Diameter', default=0.003175, min=0, max=0.5, precision=4, unit='LENGTH')[source]#
tolerance: FloatProperty(name='Cutout Tolerance', default=0.0001, min=0, max=0.005, precision=4, unit='LENGTH')[source]#
backlight: FloatProperty(name='Backlight Seat', default=0.0, min=0, max=0.01, precision=4, unit='LENGTH')[source]#
perimeter_cut: FloatProperty(name='Perimeter Cut Offset', default=0.0, min=0, max=0.1, precision=4, unit='LENGTH')[source]#
base_thickness: FloatProperty(name='Base Material Thickness', default=0.0, min=0, max=0.1, precision=4, unit='LENGTH')[source]#
intarsion_thickness: FloatProperty(name='Intarsion Material Thickness', default=0.0, min=0, max=0.1, precision=4, unit='LENGTH')[source]#
backlight_depth_from_bottom: FloatProperty(name='Backlight distance from bottom', default=0.0, min=0, max=0.1, precision=4, unit='LENGTH')[source]#
resolution: IntProperty(name='Curve Resolution', default=100, min=12, max=500)[source]#
keep_outer: BoolProperty(name='Keep outer sharp angles', default=False)[source]#
includeStandoff: BoolProperty(name='Block Standoff', default=False)[source]#
standoffHeight: FloatProperty(name='Standoff Height', default=0.01, min=0.0, max=0.1, precision=4, unit='LENGTH')[source]#
standoffSilhouette: FloatProperty(name='Standoff Offset', default=-0.001, min=-0.1, max=0.1, precision=4, unit='LENGTH')[source]#
includeBacklightInsert: BoolProperty(name='backlight insert', default=False)[source]#
includeDiffuser: BoolProperty(name='Diffuser', default=False)[source]#
diffuserTopThickness: FloatProperty(name='diffuser top thickness', default=0.0006, min=0, max=0.1, precision=4, unit='LENGTH')[source]#
stripPerimetre: BoolProperty(name='Strip glued around Perimetre', default=False)[source]#
stripWidth: FloatProperty(name='LED strip width', default=0.004, min=0, max=0.1, precision=4, unit='LENGTH')[source]#
stripThickness: FloatProperty(name='LED thickness', default=0.002, min=0, max=0.1, precision=4, unit='LENGTH')[source]#
stripBendRadius: FloatProperty(name='LED strip bend radius', default=0.0015, min=0, max=0.1, precision=4, unit='LENGTH')[source]#
classmethod poll(context)[source]#
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]#
invoke(context, event)[source]#
class CamCurveSimpleOvercuts[source]#

Bases: bpy.types.Operator

Adds Simple Fillets / Overcuts for Slots

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

Bases: bpy.types.Operator

Adds Dogbone, T-bone Fillets / Overcuts for Slots

bl_idname = 'object.curve_overcuts_b'[source]#
bl_label = 'Bone Fillet Overcuts'[source]#
bl_options: ClassVar[source]#
diameter: FloatProperty(name='Tool Diameter', default=0.003175, description='Tool bit diameter used in cut operation', min=0, max=100, precision=4, unit='LENGTH')[source]#
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')[source]#
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, step=500, subtype='ANGLE', unit='ROTATION')[source]#
do_outer: BoolProperty(name='Include Outer Curve', description='Include the outer curve if there are curves inside', default=True)[source]#
do_invert: BoolProperty(name='Invert', description='invert overcut operation on all curves', default=True)[source]#
other_edge: BoolProperty(name='Other Edge', description='change to the other edge for the overcut to be on', default=False)[source]#
classmethod poll(context)[source]#
execute(context)[source]#
invoke(context, event)[source]#
class CamCurveRemoveDoubles[source]#

Bases: bpy.types.Operator

Remove Duplicate Points from the Selected Curve

bl_idname = 'object.curve_remove_doubles'[source]#
bl_label = 'Validate/Remove Curve Doubles'[source]#
bl_options: ClassVar[source]#
validateCurve: BoolProperty(name='Validate curve', default=False)[source]#
merge_distance: FloatProperty(name='Merge distance', default=0.0001, min=0, max=0.01)[source]#
keep_bezier: BoolProperty(name='Keep bezier', default=False)[source]#
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'[source]#
bl_label = 'Get Pocket Surfaces'[source]#
bl_options: ClassVar[source]#
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)[source]#
z_limit: 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')[source]#
classmethod poll(context)[source]#
execute(context)[source]#
class CamOffsetSilhouete[source]#

Bases: bpy.types.Operator

Offset Object Silhouette

bl_idname = 'object.silhouette_offset'[source]#
bl_label = 'Silhouette & Offset'[source]#
bl_options: ClassVar[source]#
offset: FloatProperty(name='Offset', default=0.003, min=-100, max=100, precision=4, unit='LENGTH')[source]#
mitre_limit: FloatProperty(name='Mitre Limit', default=2, min=1e-08, max=20, precision=4, unit='LENGTH')[source]#
style: EnumProperty(name='Corner Type', items='1', 'Round', '', '2', 'Mitre', '', '3', 'Bevel', '')[source]#
caps: EnumProperty(name='Cap Type', items='round', 'Round', '', 'square', 'Square', '', 'flat', 'Flat', '')[source]#
align: EnumProperty(name='Alignment', items='worldxy', 'World XY', '', 'bottom', 'Base Bottom', '', 'top', 'Base Top', '')[source]#
open_type: EnumProperty(name='Curve Type', items='dilate', 'Dilate open curve', '', 'leaveopen', 'Leave curve open', '', 'closecurve', 'Close curve', '', default='closecurve')[source]#
classmethod poll(context)[source]#
is_straight(geom)[source]#
execute(context)[source]#
draw(context)[source]#
invoke(context, event)[source]#
class CamObjectSilhouette[source]#

Bases: bpy.types.Operator

Create Object Silhouette

bl_idname = 'object.silhouette'[source]#
bl_label = 'Object Silhouette'[source]#
bl_options: ClassVar[source]#
classmethod poll(context)[source]#
execute(context)[source]#