[cgma-dev] r1550 - in cgm/trunk: geom geom/OCC test

janehu at mcs.anl.gov janehu at mcs.anl.gov
Tue Jan 22 11:18:28 CST 2008


Author: janehu
Date: 2008-01-22 11:18:28 -0600 (Tue, 22 Jan 2008)
New Revision: 1550

Modified:
   cgm/trunk/geom/OCC/OCCSurface.cpp
   cgm/trunk/geom/RefFace.cpp
   cgm/trunk/test/Makefile.am
   cgm/trunk/test/makept.cpp
Log:
changed the call to get_point_normal in test file to normal_at; returned the get_point_normal to its original design of getting origin and normal for planar surface; added back webcut test in the Makefile per Jason's suggestion.

Modified: cgm/trunk/geom/OCC/OCCSurface.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCSurface.cpp	2008-01-22 02:10:10 UTC (rev 1549)
+++ cgm/trunk/geom/OCC/OCCSurface.cpp	2008-01-22 17:18:28 UTC (rev 1550)
@@ -227,8 +227,7 @@
 CubitStatus OCCSurface::get_point_normal( CubitVector& location,
                                             CubitVector& normal )
 {
-  //assert(0);
-  return closest_point( location, NULL, &normal );
+  return closest_point( bounding_box().center_point(), &location, &normal );
 }   
 
 CubitStatus OCCSurface::closest_point_uv_guess(  

Modified: cgm/trunk/geom/RefFace.cpp
===================================================================
--- cgm/trunk/geom/RefFace.cpp	2008-01-22 02:10:10 UTC (rev 1549)
+++ cgm/trunk/geom/RefFace.cpp	2008-01-22 17:18:28 UTC (rev 1550)
@@ -1484,13 +1484,11 @@
    }
 }
 
+//To get planar surface's origin and normal, both are pure output.
 CubitStatus RefFace::get_point_normal( CubitVector& origin, CubitVector& normal )
 {
-   // non-planar surface can calculate for point normal too. If certain
-   //geometry engine can't provide normal for non-planar surfaces, check 
-   //should be done in the geometry engine level.
-   //if( is_planar() == CUBIT_FALSE)
-   //   return CUBIT_FAILURE;
+   if( is_planar() == CUBIT_FALSE)
+      return CUBIT_FAILURE;
 
    Surface* surface_ptr = get_surface_ptr();
 

Modified: cgm/trunk/test/Makefile.am
===================================================================
--- cgm/trunk/test/Makefile.am	2008-01-22 02:10:10 UTC (rev 1549)
+++ cgm/trunk/test/Makefile.am	2008-01-22 17:18:28 UTC (rev 1550)
@@ -13,8 +13,13 @@
 	   -I..\$(OCC_INC_FLAG)
 
 TESTS = makept
+if build_ACIS
+  TESTS += webcut
+endif
+
 check_PROGRAMS = $(TESTS)
 
+webcut_SOURCES = webcut.cpp
 makept_SOURCES = makept.cpp
 opt_libs=
 LDADD = ../geom/virtual/libcubit_virtual.la \
@@ -25,6 +30,9 @@
         ../geom/libcubit_geom.la \
         ../util/libcubit_util.la 
 
+if build_ACIS
+  opt_libs += ../geom/ACIS/libcubit_ACIS.la 
+endif
 if WITH_OCC
   opt_libs += ../geom/OCC/libcubit_OCC.la $(OCC_LIB_FLAG) $(OCC_LIBS)
 endif

Modified: cgm/trunk/test/makept.cpp
===================================================================
--- cgm/trunk/test/makept.cpp	2008-01-22 02:10:10 UTC (rev 1549)
+++ cgm/trunk/test/makept.cpp	2008-01-22 17:18:28 UTC (rev 1550)
@@ -223,7 +223,7 @@
   // center point
 
   CubitVector normal;
-  ref_face->get_point_normal(vi, normal);
+  normal = ref_face->normal_at(vi);
   // surface normal at center point.
 
   CubitVector closest_location ;




More information about the cgma-dev mailing list