From 8e8346f83609a4f9387967aa303633c9f8b9cde3 Mon Sep 17 00:00:00 2001 From: Thomas-Alexandre Moreau Date: Fri, 31 Jan 2025 16:22:13 +0100 Subject: [PATCH] need testing --- Calepinage.FCMacro | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Calepinage.FCMacro b/Calepinage.FCMacro index 7c6de95..a1ed73e 100755 --- a/Calepinage.FCMacro +++ b/Calepinage.FCMacro @@ -54,6 +54,11 @@ class WindowDialog(): __O__ = copy_sketchList[index] boundingBox = __O__.Shape.BoundBox if boundingBox.XLength + currentX > plateLength: + if boundingBox.YLength + currentY > plateWidth: + YBlockCounter += 1 + if YBlockCounter >= listSize: + isSVGFull = True + break index += 1 continue if boundingBox.YLength + currentY > plateWidth: @@ -77,8 +82,9 @@ class WindowDialog(): listSize = len(copy_sketchList) App.activeDocument().recompute() index = 0 + YBlockCounter = 0 - + currentX = 0.0 currentY += maxY + spacing maxY = 0.0 index = 0 @@ -89,7 +95,7 @@ class WindowDialog(): fichierSVG = u"" + outputRacine + '--CALEPINAGE-' + str(SVGNameCounter) + '.svg' print('Export SVG de : --CALEPINAGE-' + str(SVGNameCounter) + '.svg') importSVG.export(__obj__, fichierSVG) - for i in __obj__: + for __i__ in __obj__: App.ActiveDocument.removeObject(__i__.Label)