[cgma-dev] r2219 - cgm/trunk/geom/OCC

janehu at mcs.anl.gov janehu at mcs.anl.gov
Thu Nov 6 15:54:18 CST 2008


Author: janehu
Date: 2008-11-06 15:54:18 -0600 (Thu, 06 Nov 2008)
New Revision: 2219

Modified:
   cgm/trunk/geom/OCC/Makefile.am
   cgm/trunk/geom/OCC/OCCModifyEngine.cpp
Log:
Changed primitive creation function for bricks, cylinders, etc to centered at origin like in Acis.

Modified: cgm/trunk/geom/OCC/Makefile.am
===================================================================
--- cgm/trunk/geom/OCC/Makefile.am	2008-11-06 18:06:43 UTC (rev 2218)
+++ cgm/trunk/geom/OCC/Makefile.am	2008-11-06 21:54:18 UTC (rev 2219)
@@ -7,7 +7,7 @@
 INCLUDES = -I$(top_srcdir)/util \
            -I$(top_srcdir)/geom \
            -I$(top_srcdir)/geom/Cholla \
-           -I$(top_srcdir)/geom/facetbool\
+           -I$(top_srcdir)/geom/facetbool \
            $(OCC_INC_FLAG)
 
 # The name of the library to build

Modified: cgm/trunk/geom/OCC/OCCModifyEngine.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCModifyEngine.cpp	2008-11-06 18:06:43 UTC (rev 2218)
+++ cgm/trunk/geom/OCC/OCCModifyEngine.cpp	2008-11-06 21:54:18 UTC (rev 2219)
@@ -1266,7 +1266,10 @@
   if (lump == NULL)
     return (BodySM*)NULL;
 
-  return CAST_TO(lump, OCCLump)->get_body();
+  BodySM* body = CAST_TO(lump, OCCLump)->get_body();
+  if(body)
+    CAST_TO(body,OCCBody)->move(-wid/2.0, -dep/2.0, -hi/2.0);
+  return body;
 }
 
 
@@ -1342,7 +1345,10 @@
   if (lump == NULL)
     return (BodySM*)NULL;
 
-  return CAST_TO(lump, OCCLump)->get_body();
+  BodySM* body = CAST_TO(lump, OCCLump)->get_body();
+  if(body)
+    CAST_TO(body, OCCBody)->move(-major, -minor, -height/2.0);
+  return body;
   
 }
 
@@ -1410,7 +1416,10 @@
     return (BodySM*)NULL;
   }
 
-  return CAST_TO(lump, OCCLump)->get_body();
+  BodySM* body = CAST_TO(lump, OCCLump)->get_body();
+  if(body)
+    CAST_TO(body, OCCBody)->move(0, 0, -hi/2.0);
+  return body;
 }
 
 //===============================================================================




More information about the cgma-dev mailing list