You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There an issue at https://bitbucket.org/jpcgt/flatcam discussing offsetting all the files. In may case the gerbers and excellon files from KiCAD are referenced to the PCB editor 0,0. This is always off the PCB and is ni use for setting up the CNC miller/router I want the ref point to be a corner of the PCB blankm so I need to fix the offset in all the files. Here's a patch of my install that "works for me".
I didn't use BitBucket issues as they want to "make it easier for me" by insisting I use, and set up, an Atlassian login. It's not easier it's a PITA.
Anyway here's the diff:
diff --git tclCommands/TclCommandOffset.py tclCommands/TclCommandOffset.py
index 17ffdaa..4cd9576 100644
--- tclCommands/TclCommandOffset.py
+++ tclCommands/TclCommandOffset.py
@@ -48,6 +48,12 @@ class TclCommandOffset(TclCommand.TclCommand):
"""
name = args['name']
- x, y = args['x'], args['y']
-
- self.app.collection.get_by_name(name).offset(x, y)
+ x, y = float(args['x']), float(args['y'])
+ if name == 'all':
+ names = self.app.collection.get_names()
+ for name in names:
+ object = self.app.collection.get_by_name(name)
+ if object.kind == 'gerber' or object.kind == "excellon":
+ object.offset((x, y))
+ else:
+ self.app.collection.get_by_name(name).offset((x, y))
I'm not sure that name == 'all' is the right trigger but, like I say, it works for me. Oh, this also fixes a bug where the shell command "offset" doesn't work at all.
The text was updated successfully, but these errors were encountered:
There an issue at https://bitbucket.org/jpcgt/flatcam discussing offsetting all the files. In may case the gerbers and excellon files from KiCAD are referenced to the PCB editor 0,0. This is always off the PCB and is ni use for setting up the CNC miller/router I want the ref point to be a corner of the PCB blankm so I need to fix the offset in all the files. Here's a patch of my install that "works for me".
I didn't use BitBucket issues as they want to "make it easier for me" by insisting I use, and set up, an Atlassian login. It's not easier it's a PITA.
Anyway here's the diff:
I'm not sure that name == 'all' is the right trigger but, like I say, it works for me. Oh, this also fixes a bug where the shell command "offset" doesn't work at all.
The text was updated successfully, but these errors were encountered: