- fixed the Tcl Command Delete to have an argument -f that will force deletion evading the popup (if the popup is enabled). The sme command without a name now will delete all objects

- fixed the Tcl Command JoinExcellons
- fixed the Tcl Command JoinGeometry
- fixed the Tcl Command Mirror
- updated the Tcl Command Mirror to use a (X,Y) origin parameter. Works if the -box parameter is not used.
- updated the Tcl Command Offset. Now it can use only -x or -y parameter no longer is mandatory to have both. The one that is not present will be assumed 0.0
- updated the Tcl Command Panelize. The -rows and -columns parameters are no longer both required. If one is not present then it is assumed to be zero.
- updated the Tcl Command Scale. THe -origin parameter can now be a tuple of (x,y) coordinates.
- updated the Tcl Command Skew. Now it can use only -x or -y parameter no longer is mandatory to have both. The one that is not present will be assumed 0.0
- updated the help for all the Tcl Commands
This commit is contained in:
Marius Stanciu
2020-04-09 04:13:04 +03:00
committed by Marius
parent ecba1a9232
commit 42949021b1
53 changed files with 322 additions and 178 deletions

View File

@@ -38,7 +38,7 @@ class TclCommandPanelize(TclCommand):
])
# array of mandatory options for current Tcl command: required = {'name','outname'}
required = ['name', 'rows', 'columns']
required = ['name']
# structured help for current command, args needs to be ordered
help = {
@@ -54,7 +54,14 @@ class TclCommandPanelize(TclCommand):
('outname', 'Name of the new geometry object.'),
('run_threaded', 'False = non-threaded || True = threaded')
]),
'examples': []
'examples': [
'panelize obj_name',
'panel obj_name -rows 2 -columns 2 -spacing_columns 0.4 -spacing_rows 1.3 -box box_obj_name '
'-outname panelized_name',
'panel obj_name -columns 2 -box box_obj_name -outname panelized_name',
]
}
def execute(self, args, unnamed_args):
@@ -85,8 +92,18 @@ class TclCommandPanelize(TclCommand):
else:
box = obj
if 'columns' not in args or 'rows' not in args:
return "ERROR: Specify -columns and -rows"
if 'columns' in args:
columns = int(args['columns'])
else:
columns = int(0)
if 'rows' in args:
rows = int(args['rows'])
else:
rows = int(0)
if 'columns' not in args and 'rows' not in args:
return "ERROR: Specify either -columns or -rows. The one not specified it will assumed to be 0"
if 'outname' in args:
outname = args['outname']
@@ -108,9 +125,6 @@ class TclCommandPanelize(TclCommand):
else:
spacing_rows = 5
rows = int(args['rows'])
columns = int(args['columns'])
xmin, ymin, xmax, ymax = box.bounds()
lenghtx = xmax - xmin + spacing_columns
lenghty = ymax - ymin + spacing_rows