Added rotation param to the non-dimension parameter list (Avoids unit conversion)
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
flatcam.sublime*
|
flatcam.sublime*
|
||||||
|
.nfs*
|
||||||
11
camlib.py
11
camlib.py
@@ -375,11 +375,14 @@ class Gerber (Geometry):
|
|||||||
:type factor: float
|
:type factor: float
|
||||||
:rtype : None
|
:rtype : None
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Apertures
|
# Apertures
|
||||||
#print "Scaling apertures..."
|
#print "Scaling apertures..."
|
||||||
|
#List of the non-dimension aperture parameters
|
||||||
|
nonDimensions = ["type", "nVertices", "rotation"]
|
||||||
for apid in self.apertures:
|
for apid in self.apertures:
|
||||||
for param in self.apertures[apid]:
|
for param in self.apertures[apid]:
|
||||||
if param != "type" and param != "nVertices": # All others are dimensions.
|
if param not in nonDimensions: # All others are dimensions.
|
||||||
print "Tool:", apid, "Parameter:", param
|
print "Tool:", apid, "Parameter:", param
|
||||||
self.apertures[apid][param] *= factor
|
self.apertures[apid][param] *= factor
|
||||||
|
|
||||||
@@ -484,7 +487,9 @@ class Gerber (Geometry):
|
|||||||
:param apertureId: Id of the aperture being defined.
|
:param apertureId: Id of the aperture being defined.
|
||||||
:param apertureType: Type of the aperture.
|
:param apertureType: Type of the aperture.
|
||||||
:param apParameters: Parameters of the aperture.
|
:param apParameters: Parameters of the aperture.
|
||||||
:type gline: str
|
:type apertureId: str
|
||||||
|
:type apertureType: str
|
||||||
|
:type apParameters: str
|
||||||
:return: Identifier of the aperture.
|
:return: Identifier of the aperture.
|
||||||
:rtype: str
|
:rtype: str
|
||||||
"""
|
"""
|
||||||
@@ -519,7 +524,7 @@ class Gerber (Geometry):
|
|||||||
self.apertures[apid]["rotation"] = float(paramList[2])
|
self.apertures[apid]["rotation"] = float(paramList[2])
|
||||||
return apid
|
return apid
|
||||||
|
|
||||||
print "WARNING: Aperture not implemented:", apertureId
|
print "WARNING: Aperture not implemented:", apertureType
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def parse_file(self, filename):
|
def parse_file(self, filename):
|
||||||
|
|||||||
Reference in New Issue
Block a user