[cgma-dev] r3467 - cgm/trunk/test

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Fri Jan 22 09:42:23 CST 2010


Author: kraftche
Date: 2010-01-22 09:42:23 -0600 (Fri, 22 Jan 2010)
New Revision: 3467

Modified:
   cgm/trunk/test/brick.cpp
Log:
fix brick test: do not test parameterization of non-parametric surfaces

Modified: cgm/trunk/test/brick.cpp
===================================================================
--- cgm/trunk/test/brick.cpp	2010-01-22 15:31:07 UTC (rev 3466)
+++ cgm/trunk/test/brick.cpp	2010-01-22 15:42:23 UTC (rev 3467)
@@ -206,8 +206,10 @@
   face->get_child_ref_entities( edges );
   
   double u_min, u_max, v_min, v_max, u, v;
-  face->get_param_range_U( u_min, u_max );
-  face->get_param_range_V( v_min, v_max );
+  if (face->is_parametric()) {
+    face->get_param_range_U( u_min, u_max );
+    face->get_param_range_V( v_min, v_max );
+  }
   
     // Check that each edge is on the face
   for (int i = 0; i < edges.size(); ++i) {
@@ -227,15 +229,18 @@
       face->move_to_surface( close );
       assert( (close - p[j]).length() < 1e-6 );
         // Check that point is within UV bounds
-      CubitStatus s = face->u_v_from_position( p[j], u, v );
-      assert( CUBIT_SUCCESS == s );
-      assert( (u - u_min) > -1e-6 );
-      assert( (u_max - u) > -1e-6 );
-      assert( (v - v_min) > -1e-6 );
-      assert( (v_max - v) > -1e-6 );
+      if (face->is_parametric()) {
+        CubitStatus s = face->u_v_from_position( p[j], u, v );
+        assert( CUBIT_SUCCESS == s );
+        assert( (u - u_min) > -1e-6 );
+        assert( (u_max - u) > -1e-6 );
+        assert( (v - v_min) > -1e-6 );
+        assert( (v_max - v) > -1e-6 );
+      }
     }
   }
   
+  
     // Check reverse query from edge to face brings us back to the
     // input face.
   for (int i = 0; i < edges.size(); ++i) {



More information about the cgma-dev mailing list