Print

Print


Commit in GeomConverter on MAIN
test/org/lcsim/detector/solids/PolyconeTest.java+131.2 -> 1.3
src/org/lcsim/detector/solids/Polycone.java+1-11.5 -> 1.6
+14-1
2 modified files
CD - Fix typo resulting in wrong volume calculation + update test.

GeomConverter/test/org/lcsim/detector/solids
PolyconeTest.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- PolyconeTest.java	18 Feb 2008 23:25:50 -0000	1.2
+++ PolyconeTest.java	24 Jun 2008 19:08:15 -0000	1.3
@@ -73,6 +73,19 @@
         double diff = Math.abs(v3 - realv3);
         assertTrue( diff < TOLERANCE) ;
         
+        
+        
+        p1 = new ZPlane(4,5,-100);
+        p2 = new ZPlane(4,5,100); 
+
+        l1.clear();
+        l1.add(p1);
+        l1.add(p2);
+        pc1 = new Polycone("Another tube with pc class",l1);
+        Tube t2 = new Tube("Another tube",4,5,100); 
+        assertTrue(Math.abs(t2.getCubicVolume()-pc1.getCubicVolume())<TOLERANCE); 
+    
+        
     }
 
     

GeomConverter/src/org/lcsim/detector/solids
Polycone.java 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- Polycone.java	6 Jun 2008 00:22:56 -0000	1.5
+++ Polycone.java	24 Jun 2008 19:08:15 -0000	1.6
@@ -112,7 +112,7 @@
                     double a2 = zplanes.get(i).rmin;
                     double b2 = zplanes.get(i).rmax;
 
-                    double dv = Math.PI/(3.0)*(z2-z1)*(b2*b2 + b1*b2 + b1*2 - a2*a2 - a2*a1 - a1*a1);
+                    double dv = Math.PI/(3.0)*(z2-z1)*(b2*b2 + b1*b2 + b1*b1 - a2*a2 - a2*a1 - a1*a1);
                     vol+=Math.abs(dv);
                     z1=z2;  
                     a1=a2;
CVSspam 0.2.8