Add FixedRotationOrigin option

This commit is contained in:
Andrei 2021-03-21 12:32:52 +02:00
parent 05200a1b20
commit 1ad1952274
2 changed files with 6 additions and 1 deletions

View File

@ -52,6 +52,7 @@ Config = {
'fiducialpoints': None, # List of X,Y co-ordinates at which to draw fiducials
'fiducialcopperdiameter': 0.08, # Diameter of copper part of fiducial
'fiducialmaskdiameter': 0.32, # Diameter of fiducial soldermask opening
'fixedrotationorigin': 0, # [andreika]: add settings to disable shifting of the rotating origin
}
# This dictionary is indexed by lowercase layer name and has as values a file

View File

@ -1402,7 +1402,11 @@ def rotateJob(job, degrees = 90, firstpass = True):
# We also have to take aperture change commands and
# replace them with the new aperture code if we have
# a rotation.
offset = job.maxy-job.miny
# [andreika]: add 'fixedrotationorigin' setting to disable shifting
if config.Config['fixedrotationorigin']:
offset = 0
else:
offset = job.maxy-job.miny
for layername in job.commands.keys():
J.commands[layername] = []
J.apertures[layername] = []