removed limit curve from unsupported strategies

pull/231/head
palain 2023-03-02 11:27:23 -04:00
rodzic d845135516
commit bbf77969d7
4 zmienionych plików z 12 dodań i 2 usunięć

Wyświetl plik

@ -274,6 +274,7 @@ class CamCurveMortise(bpy.types.Operator):
bl_label = "Mortise"
bl_options = {'REGISTER', 'UNDO', 'PRESET'}
finger_size: bpy.props.BoolProperty(name="kurf bending only", default=False)
finger_size: bpy.props.FloatProperty(name="Maximum Finger Size", default=0.015, min=0.005, max=3.0, precision=4,
unit="LENGTH")
min_finger_size: bpy.props.FloatProperty(name="Minimum Finger Size", default=0.0025, min=0.001, max=3.0,

Wyświetl plik

@ -239,7 +239,7 @@ def make_flex_pocket(length, height, finger_thick, finger_width, pocket_width):
def make_variable_flex_pocket(height, finger_thick, pocket_width, locations):
# creates pockets pocket using mortise function for kerf bending
for dist in locations:
mortise(height - 2 * finger_thick, pocket_width, 0, dist, 0, math.pi / 2)
mortise(height + 2 * finger_thick, pocket_width, 0, dist, 0, math.pi / 2)
simple.active_name("_flex_pocket")
simple.join_multiple("_flex_pocket")
@ -263,6 +263,11 @@ def create_flex_side(length, height, finger_thick, top_bottom=False):
fingers = bpy.context.active_object
bpy.ops.transform.translate(value=(0.0, height / 2 - finger_thick / 2 + 0.0003, 0.0))
bpy.ops.curve.simple(align='WORLD', location=(length / 2 + 0.00025, 0, 0), rotation=(0, 0, 0),
Simple_Type='Rectangle', Simple_width=length, Simple_length=height, shape='3D',
outputType='POLY', use_cyclic_u=True, handleType='AUTO', edit_mode=False)
simple.active_name("no_fingers")
bpy.ops.curve.simple(align='WORLD', location=(length / 2 + 0.00025, 0, 0), rotation=(0, 0, 0),
Simple_Type='Rectangle', Simple_width=length, Simple_length=height, shape='3D',
outputType='POLY', use_cyclic_u=True, handleType='AUTO', edit_mode=False)
@ -456,6 +461,7 @@ def variable_finger(loop, loop_length, min_finger, finger_size, finger_thick, fi
# adaptive finger length start
while finger_sz > min_finger and next_angle_difference > adaptive:
# while finger_sz > min_finger and next_angle_difference > adaptive:
finger_sz *= 0.95 # reduce the size of finger by a percentage... the closer to 1.0, the slower
distance = old_distance + 3 * oldfinger_sz / 2 + finger_sz / 2
mortise_point = loop.interpolate(distance) # get the next mortise point

Wyświetl plik

@ -82,6 +82,7 @@ def sliceObject(ob): # April 2020 Alain Pelletier
bpy.context.scene.collection.children.link(tcollection)
# show object information
print(ob)
print(ob.dimensions)
print(ob.location)

Wyświetl plik

@ -21,7 +21,9 @@ class CAM_AREA_Panel(CAMButtonsPanel, bpy.types.Panel):
return
self.draw_z_limits()
self.draw_xy_limits()
if self.ao.strategy in ['BLOCK', 'SPIRAL', 'CIRCLES', 'PARALLEL', 'CROSS']:
self.draw_xy_limits()
# Draw layers option: use layers(y/n) and choose the stepdown
def draw_z_limits(self):