Porównaj commity

...

8 Commity

Autor SHA1 Wiadomość Data
Alain Pelletier dba230e600
Merge pull request #231 from pppalain/master
march 2023 bug fixes
2023-03-08 11:48:25 -04:00
Alain Pelletier fd4ace195c
Merge pull request #82 from abosafia/master
object is not in collection bug fix
2023-03-08 11:41:45 -04:00
abosafia 37f9201921 object is not in collection bug fix 2023-03-08 17:25:09 +02:00
palain bbf77969d7 removed limit curve from unsupported strategies 2023-03-02 11:27:23 -04:00
Alain Pelletier d845135516
Merge pull request #81 from abosafia/master
remove laser and plasma if not cut or pocket
2023-02-24 11:49:50 -04:00
abosafia 4d0d88afd4 remove laser and plasma if not cut or pocket 2023-02-24 17:45:32 +02:00
Alain Pelletier 249bef9eec
Merge pull request #80 from abosafia/master
Material size non negative
2023-02-06 10:42:10 -04:00
abosafia 91bd967ef8 Material size non negative 2023-02-05 08:12:25 +02:00
7 zmienionych plików z 32 dodań i 6 usunięć

Wyświetl plik

@ -504,7 +504,7 @@ class camOperation(bpy.types.PropertyGroup):
('IMAGE', 'Image', 'a')),
description='Geometry source',
default='OBJECT', update=updateOperationValid)
cutter_type: EnumProperty(name='Cutter',
cutter_typeb: EnumProperty(name='Cutter',
items=(
('END', 'End', 'end - flat cutter'),
('BALLNOSE', 'Ballnose', 'ballnose cutter'),
@ -517,6 +517,18 @@ class camOperation(bpy.types.PropertyGroup):
('CUSTOM', 'Custom-EXPERIMENTAL', 'modelled cutter - not well tested yet.')),
description='Type of cutter used',
default='END', update=updateZbufferImage)
cutter_type: EnumProperty(name='Cutter',
items=(
('END', 'End', 'end - flat cutter'),
('BALLNOSE', 'Ballnose', 'ballnose cutter'),
('BULLNOSE', 'Bullnose', 'bullnose cutter ***placeholder **'),
('VCARVE', 'V-carve', 'v carve cutter'),
('BALLCONE', 'Ballcone', 'Ball with a Cone for Parallel - X'),
('CYLCONE', 'Cylinder cone', 'Cylinder end with a Cone for Parallel - X'),
('CUSTOM', 'Custom-EXPERIMENTAL', 'modelled cutter - not well tested yet.')),
description='Type of cutter used',
default='END', update=updateZbufferImage)
cutter_object_name: bpy.props.StringProperty(name='Cutter object',
description='object used as custom cutter for this operation',
update=updateZbufferImage)
@ -964,7 +976,7 @@ class camOperation(bpy.types.PropertyGroup):
material_origin: bpy.props.FloatVectorProperty(name='Material origin', default=(0, 0, 0), unit='LENGTH',
precision=PRECISION, subtype="XYZ", update=updateMaterial)
material_size: bpy.props.FloatVectorProperty(name='Material size', default=(0.200, 0.200, 0.100), unit='LENGTH',
material_size: bpy.props.FloatVectorProperty(name='Material size', default=(0.200, 0.200, 0.100), min=0, unit='LENGTH',
precision=PRECISION, subtype="XYZ", update=updateMaterial)
min: bpy.props.FloatVectorProperty(name='Operation minimum', default=(0, 0, 0), unit='LENGTH', precision=PRECISION,
subtype="XYZ")

Wyświetl plik

@ -263,7 +263,8 @@ def prepareBulletCollision(o):
collisionob.location = collisionob.location * BULLET_SCALE
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
bpy.context.view_layer.objects.active = collisionob
active_collection.objects.unlink(collisionob)
if active_collection in collisionob.users_collection:
active_collection.objects.unlink(collisionob)
getCutterBullet(o)

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):

Wyświetl plik

@ -43,7 +43,10 @@ class CAM_CUTTER_Panel(CAMButtonsPanel, bpy.types.Panel):
row.operator("render.cam_preset_cutter_add", text="", icon='ADD')
row.operator("render.cam_preset_cutter_add", text="", icon='REMOVE').remove_active = True
layout.prop(ao, 'cutter_id')
layout.prop(ao, 'cutter_type')
if ao.strategy == "POCKET" or ao.strategy == "CUTOUT" :
layout.prop(ao, 'cutter_typeb')
else:
layout.prop(ao, 'cutter_type')
if ao.cutter_type == 'VCARVE':
layout.prop(ao, 'cutter_tip_angle')
if ao.cutter_type == 'BALLCONE':