kopia lustrzana https://github.com/vilemduha/blendercam
delete old crosshatch
rodzic
76e68783b6
commit
911d5bf464
|
@ -71,9 +71,7 @@ class CamCurveHatch(bpy.types.Operator):
|
|||
layout.prop(self, 'hull')
|
||||
|
||||
def execute(self, context):
|
||||
|
||||
|
||||
|
||||
simple.remove_multiple("crosshatch")
|
||||
ob = context.active_object
|
||||
ob.select_set(True)
|
||||
bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY', center='MEDIAN')
|
||||
|
@ -90,15 +88,12 @@ class CamCurveHatch(bpy.types.Operator):
|
|||
miny -= self.offset
|
||||
maxx += self.offset
|
||||
maxy += self.offset
|
||||
|
||||
centery = (miny + maxy) / 2
|
||||
height = maxy - miny
|
||||
width = maxx - minx
|
||||
centerx = (minx+maxx) / 2
|
||||
diagonal = math.hypot(width, height)
|
||||
|
||||
simple.add_bound_rectangle(minx, miny, maxx, maxy, 'crosshatch_bound')
|
||||
|
||||
amount = int(2*diagonal/self.distance) + 1
|
||||
|
||||
for x in range(amount):
|
||||
|
@ -123,7 +118,6 @@ class CamCurveHatch(bpy.types.Operator):
|
|||
# remove temporary shapes
|
||||
simple.remove_multiple('crosshatch_bound')
|
||||
simple.remove_multiple('crosshatch_hull')
|
||||
|
||||
simple.select_multiple('crosshatch')
|
||||
bpy.ops.object.editmode_toggle()
|
||||
bpy.ops.curve.select_all(action='SELECT')
|
||||
|
|
Ładowanie…
Reference in New Issue