kopia lustrzana https://github.com/vilemduha/blendercam
Porównaj commity
8 Commity
3f78a27c04
...
dba230e600
Autor | SHA1 | Data |
---|---|---|
Alain Pelletier | dba230e600 | |
Alain Pelletier | fd4ace195c | |
abosafia | 37f9201921 | |
palain | bbf77969d7 | |
Alain Pelletier | d845135516 | |
abosafia | 4d0d88afd4 | |
Alain Pelletier | 249bef9eec | |
abosafia | 91bd967ef8 |
|
@ -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")
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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':
|
||||
|
|
Ładowanie…
Reference in New Issue