Merged in thrusty/flatcam/panelization_fix (pull request #58)
Add panel instances to panelization list properly
This commit is contained in:
commit
1d50f6fdab
|
@ -1,4 +1,6 @@
|
||||||
from ObjectCollection import *
|
from ObjectCollection import *
|
||||||
|
from copy import copy,deepcopy
|
||||||
|
|
||||||
import TclCommand
|
import TclCommand
|
||||||
|
|
||||||
|
|
||||||
|
@ -102,15 +104,22 @@ class TclCommandPanelize(TclCommand.TclCommand):
|
||||||
def initialize_local(obj_init, app):
|
def initialize_local(obj_init, app):
|
||||||
obj_init.solid_geometry = obj.solid_geometry
|
obj_init.solid_geometry = obj.solid_geometry
|
||||||
obj_init.offset([float(currentx), float(currenty)]),
|
obj_init.offset([float(currentx), float(currenty)]),
|
||||||
|
objs.append(obj_init)
|
||||||
|
|
||||||
def initialize_local_excellon(obj_init, app):
|
def initialize_local_excellon(obj_init, app):
|
||||||
FlatCAMExcellon.merge(obj, obj_init)
|
obj_init.tools = obj.tools
|
||||||
obj_init.offset([float(currentx), float(currenty)]),
|
# drills are offset, so they need to be deep copied
|
||||||
|
obj_init.drills = deepcopy(obj.drills)
|
||||||
|
obj_init.offset([float(currentx), float(currenty)])
|
||||||
|
obj_init.create_geometry()
|
||||||
|
objs.append(obj_init)
|
||||||
|
|
||||||
def initialize_geometry(obj_init, app):
|
def initialize_geometry(obj_init, app):
|
||||||
FlatCAMGeometry.merge(objs, obj_init)
|
FlatCAMGeometry.merge(objs, obj_init)
|
||||||
|
|
||||||
def initialize_excellon(obj_init, app):
|
def initialize_excellon(obj_init, app):
|
||||||
|
# merge expects tools to exist in the target object
|
||||||
|
obj_init.tools = obj.tools.copy()
|
||||||
FlatCAMExcellon.merge(objs, obj_init)
|
FlatCAMExcellon.merge(objs, obj_init)
|
||||||
|
|
||||||
objs = []
|
objs = []
|
||||||
|
|
Loading…
Reference in New Issue