Eyeball swig fix after the units changes
This commit is contained in:
parent
3d5913c825
commit
1e0eca0916
|
@ -33,7 +33,7 @@
|
||||||
%{
|
%{
|
||||||
def ToMM(iu):
|
def ToMM(iu):
|
||||||
if type(iu) in [int,float]:
|
if type(iu) in [int,float]:
|
||||||
return float(iu) / float(IU_PER_MM)
|
return float(iu) / float(pcbIUScale.IU_PER_MM)
|
||||||
elif type(iu) in [wxPoint,wxSize,VECTOR2I]:
|
elif type(iu) in [wxPoint,wxSize,VECTOR2I]:
|
||||||
return tuple(map(ToMM,iu))
|
return tuple(map(ToMM,iu))
|
||||||
else:
|
else:
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
|
|
||||||
def FromMM(mm):
|
def FromMM(mm):
|
||||||
if type(mm) in [int,float]:
|
if type(mm) in [int,float]:
|
||||||
return int(float(mm) * float(IU_PER_MM))
|
return int(float(mm) * float(pcbIUScale.IU_PER_MM))
|
||||||
elif type(mm) in [wxPoint,wxSize,VECTOR2I]:
|
elif type(mm) in [wxPoint,wxSize,VECTOR2I]:
|
||||||
return tuple(map(FromMM,mm))
|
return tuple(map(FromMM,mm))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue