Skip to content

Commit

Permalink
fix nesting
Browse files Browse the repository at this point in the history
  • Loading branch information
addam committed May 1, 2023
1 parent a8a71ae commit 2ff2202
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nesting.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self, num=1, islands=None):

def can_pack_ccor(islands, cage_size):
if len(islands) <= 1:
islands[0].bounding_box.xy = 0, 0
islands[0].pos.xy = 0, 0
return True
for isle in islands[1:]:
...
Expand All @@ -31,7 +31,7 @@ def can_pack_ccor(islands, cage_size):

def can_pack_bpy(islands, cage_size):
if len(islands) <= 1:
islands[0].bounding_box.xy = 0, 0
islands[0].pos.xy = 0, 0
return True
aspect = cage_size.y / cage_size.x
boxes = [[0, 0, isle.bounding_box.x, isle.bounding_box.y / aspect] for isle in islands]
Expand Down

0 comments on commit 2ff2202

Please sign in to comment.