delete old crosshatch

pull/235/head
abosafia 2023-04-15 13:36:23 +02:00
rodzic 76e68783b6
commit 911d5bf464
1 zmienionych plików z 1 dodań i 7 usunięć

Wyświetl plik

@ -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')