Author: janehu Date: 2012-04-18 13:07:10 -0500 (Wed, 18 Apr 2012) New Revision: 5483 Modified: cgm/trunk/geom/GeometryModifyEngine.hpp cgm/trunk/geom/OCC/OCCModifyEngine.cpp Log: Added a fix for mcnp2cad/cone test. Modified: cgm/trunk/geom/GeometryModifyEngine.hpp =================================================================== --- cgm/trunk/geom/GeometryModifyEngine.hpp 2012-04-16 20:14:10 UTC (rev 5482) +++ cgm/trunk/geom/GeometryModifyEngine.hpp 2012-04-18 18:07:10 UTC (rev 5483) @@ -495,6 +495,7 @@ //- for some reason, the hollow operation did not go well, the output //- argument is assigned a NULL value and the function returns //- CUBIT_FAILURE. + virtual CubitStatus flip_normals( DLIList<Surface*>& face_list ) const = 0; //R CubitStatus //R-the result of the flip_normal operation: Success or Failure Modified: cgm/trunk/geom/OCC/OCCModifyEngine.cpp =================================================================== --- cgm/trunk/geom/OCC/OCCModifyEngine.cpp 2012-04-16 20:14:10 UTC (rev 5482) +++ cgm/trunk/geom/OCC/OCCModifyEngine.cpp 2012-04-18 18:07:10 UTC (rev 5483) @@ -1972,8 +1972,19 @@ if(list.size() == 0) { k = OCCQueryEngine::instance()->OCCMap->Find(orig_shape); - OCCSurface *orig_surf = (OCCSurface*) (OCCQueryEngine::instance()->OccToCGM->find(k))->second; - OCCBody* body = orig_surf->my_body(); + OCCBody* body = NULL; + if(orig_shape.ShapeType() == TopAbs_FACE) + { + OCCSurface *orig_surf = (OCCSurface*) (OCCQueryEngine::instance()->OccToCGM->find(k))->second; + body = orig_surf->my_body(); + } + else if(orig_shape.ShapeType() == TopAbs_SHELL) + { + OCCShell* orig_shell = (OCCShell*) (OCCQueryEngine::instance()->OccToCGM->find(k))->second; + body = orig_shell->my_body(); + } + else + body = (OCCBody*) (OCCQueryEngine::instance()->OccToCGM->find(k))->second; if(body) { body->get_simple_attribute(list);
participants (1)
-
jiangtao_ma@yahoo.com