Commits

iorodeo committed 7e46d35

Fixed issue with math.radians math.degree functions.

Comments (0)

Files changed (2)

py2scad/highlevel.py

     rect_base = Cube(size=[x,y,z])
     rect_diff = Cube(size=[2*numpy.sqrt(x**2+y**2),y,2*z])
     rect_diff = Translate(rect_diff,v=[0,0.5*y,0])
-    theta = -numpy.arctan2(y,x)*RAD2DEG
+    theta = -RAD2DEG(numpy.arctan2(y,x))
     rect_diff = Rotate(rect_diff,a=theta,v=[0,0,1])
     triangle = Difference([rect_base,rect_diff])
     triangle = Translate(triangle,v=[0.5*x, 0.5*y, 0])
     bracket_pos = Translate(bracket,v=[0,y_shift,0])
     bracket_neg = Translate(bracket,v=[0,-y_shift,0])
 
-    base.mod = '%'
-    face.mod = '%'
+    #base.mod = '%'
+    #face.mod = '%'
     return [base,face,bracket_pos,bracket_neg]

py2scad/utility.py

 TAB_WIDTH = 4
 #DEG2RAD = math.pi/180.0
 #RAD2DEG = 180.0/math.pi
-DEG2RAD = math.degrees
-RAD2DEG = math.radians
+#DEG2RAD = math.degrees
+#RAD2DEG = math.radians
+DEG2RAD = math.radians
+RAD2DEG = math.degrees
 
 # Utility functions -----------------------------------------------------------
 """ Depreciated!