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

jiangtao_ma at yahoo.com jiangtao_ma at yahoo.com
Wed Jan 25 12:33:53 CST 2012


Author: janehu
Date: 2012-01-25 12:33:53 -0600 (Wed, 25 Jan 2012)
New Revision: 5345

Added:
   cgm/trunk/geom/OCC/occ_patches_6.5.2
Modified:
   cgm/trunk/geom/OCC/OCCLump.cpp
   cgm/trunk/geom/OCC/OCCModifyEngine.cpp
Log:
Updated for build with Opencascade6.5.2. Passed make check in cgm.

Modified: cgm/trunk/geom/OCC/OCCLump.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCLump.cpp	2012-01-24 22:23:45 UTC (rev 5344)
+++ cgm/trunk/geom/OCC/OCCLump.cpp	2012-01-25 18:33:53 UTC (rev 5345)
@@ -374,12 +374,24 @@
   assert(aBRepTrsf != NULL || op != NULL);
  
   TopoDS_Shape shape;
+  TopTools_ListOfShape shapes;
+ 
   if(aBRepTrsf)
-    shape = aBRepTrsf->ModifiedShape(*get_TopoDS_Solid());
+  {
+    shapes = aBRepTrsf->Modified(*get_TopoDS_Solid());
+    if(shapes.Extent() == 1)
+      shape = shapes.First();
+    else
+    {
+      PRINT_ERROR("Tranformation is wrong. \n");
+      return CUBIT_FAILURE;
+    }
+  }
+ 
+    //shape = aBRepTrsf->ModifiedShape(*get_TopoDS_Solid());
 
   else
   {
-    TopTools_ListOfShape shapes;
     shapes.Assign(op->Modified(*get_TopoDS_Solid()));
     if(shapes.Extent() == 0)
       shapes.Assign(op->Generated(*get_TopoDS_Solid()));

Modified: cgm/trunk/geom/OCC/OCCModifyEngine.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCModifyEngine.cpp	2012-01-24 22:23:45 UTC (rev 5344)
+++ cgm/trunk/geom/OCC/OCCModifyEngine.cpp	2012-01-25 18:33:53 UTC (rev 5345)
@@ -113,6 +113,10 @@
 #include "TopOpeBRep_EdgesIntersector.hxx"
 #include "TopExp_Explorer.hxx"
 #include "TopExp.hxx"
+#ifndef OCC_VERSION_MINOR
+#include "Standard_Version.hxx"
+#endif
+
 #include "OCCDrawTool.hpp"
 #include "OCCModifyEngine.hpp"
 #include "OCCQueryEngine.hpp"
@@ -703,7 +707,11 @@
 	 radius2 = height * tan(fabs(semi_angle));
          Handle(Geom_RectangularTrimmedSurface) trimmed_cone;
          trimmed_cone = GC_MakeTrimmedCone(Apex, p2, 0, radius2); 


More information about the cgma-dev mailing list