Pipe radius is centralized in edges.py
authorDmitriy Morozov <dmitriy@mrzv.org>
Tue, 21 Jun 2011 16:48:36 -0700
changeset 18 7d5e8fdf69f2
parent 17 9f4bf1795d51
child 19 c1c2dda0c427
Pipe radius is centralized in edges.py
edges.py
--- a/edges.py	Tue Jun 21 16:24:27 2011 -0700
+++ b/edges.py	Tue Jun 21 16:48:36 2011 -0700
@@ -17,6 +17,7 @@
 
         self.read_edges(filename)
 
+        self.radius = 0.25
         self.create_display_list()
         self.center, self.min, self.max = centerMinMax(self.vertices())
         self.pipes = False
@@ -58,7 +59,7 @@
                              (v.x,v.y,v.z),
                              (v.x,v.y,v.z),],
                             None,
-                            .5)
+                            self.radius)
 
     def draw(self):
         if not self.visible: return
@@ -81,9 +82,9 @@
         cr,cg,cb,ca = self.color.getRgb()
         cr,cg,cb = cr/255., cg/255., cb/255.
         for (u,v) in self.edges:
-            f.write(povray.cylinder(u,v,.5,(cr,cg,cb)))
-            f.write(povray.sphere(u,.5,(cr,cg,cb)))
-            f.write(povray.sphere(v,.5,(cr,cg,cb)))
+            f.write(povray.cylinder(u,v,self.radius,(cr,cg,cb)))
+            f.write(povray.sphere(u,self.radius,(cr,cg,cb)))
+            f.write(povray.sphere(v,self.radius,(cr,cg,cb)))
             f.write('\n')
 
     def read_edges(self, filename):