kopia lustrzana https://github.com/vilemduha/blendercam
curve remove doubles
just for polycurves, for beziers, it ruins beziers because it does conversion into mesh and back.pull/4/head
rodzic
f63002c250
commit
6ec4121c83
|
@ -674,6 +674,7 @@ def get_panels():#convenience function for bot register and unregister functions
|
|||
ops.CamOffsetSilhouete,
|
||||
ops.CamObjectSilhouete,
|
||||
ops.CamCurveIntarsion,
|
||||
ops.CamCurveRemoveDoubles,
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -644,7 +644,30 @@ class CamCurveIntarsion(bpy.types.Operator):
|
|||
o3.select=True
|
||||
return {'FINISHED'}
|
||||
|
||||
class CamCurveRemoveDoubles(bpy.types.Operator):
|
||||
'''curve remove doubles - warning, removes beziers!'''
|
||||
bl_idname = "object.curve_remove_doubles"
|
||||
bl_label = "Remove doubles - curve"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
||||
def execute(self, context):
|
||||
mode=False
|
||||
if bpy.context.mode=='EDIT_CURVE':
|
||||
bpy.ops.object.editmode_toggle()
|
||||
mode=True
|
||||
bpy.ops.object.convert(target='MESH')
|
||||
bpy.ops.object.editmode_toggle()
|
||||
bpy.ops.mesh.select_all(action='TOGGLE')
|
||||
bpy.ops.mesh.remove_doubles()
|
||||
bpy.ops.object.editmode_toggle()
|
||||
bpy.ops.object.convert(target='CURVE')
|
||||
|
||||
if mode:
|
||||
bpy.ops.object.editmode_toggle()
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
#this operator finds the silhouette of objects(meshes, curves just get converted) and offsets it.
|
||||
class CamOffsetSilhouete(bpy.types.Operator):
|
||||
'''Curve offset operation '''
|
||||
|
|
|
@ -681,4 +681,4 @@ class VIEW3D_PT_tools_curvetools(bpy.types.Panel):
|
|||
layout.operator("object.curve_boolean")
|
||||
layout.operator("object.curve_intarsion")
|
||||
layout.operator("object.silhouete_offset")
|
||||
layout.operator("object.make_lod")
|
||||
layout.operator("object.curve_remove_doubles")
|
|
@ -913,7 +913,8 @@ def chunksToMesh(chunks,o):
|
|||
last=Vector(ch.points[-1])
|
||||
first=Vector(chunks[chi+1].points[0])
|
||||
vect=first-last
|
||||
if (o.strategy=='PARALLEL' or o.strategy=='CROSS') and vect.z==0 and vect.length<o.dist_between_paths*2.5:#case of neighbouring paths
|
||||
if (o.machine_axes=='3' and (o.strategy=='PARALLEL' or o.strategy=='CROSS') and vect.z==0 and vect.length<o.dist_between_paths*2.5):
|
||||
#or (o.machine_axes =='4' and vect.lengt<o.dist_between_paths*4):#case of neighbouring paths
|
||||
lift=False
|
||||
if abs(vect.x)<e and abs(vect.y)<e:#case of stepdown by cutting.
|
||||
lift=False
|
||||
|
|
Ładowanie…
Reference in New Issue