[cgma-dev] r4495 - cgm/branches/merge-cubit12/geom/OCC
jiangtao_ma at yahoo.com
jiangtao_ma at yahoo.com
Tue Feb 15 13:11:11 CST 2011
Author: janehu
Date: 2011-02-15 13:11:11 -0600 (Tue, 15 Feb 2011)
New Revision: 4495
Modified:
cgm/branches/merge-cubit12/geom/OCC/OCCLoop.cpp
cgm/branches/merge-cubit12/geom/OCC/OCCLoop.hpp
cgm/branches/merge-cubit12/geom/OCC/OCCModifyEngine.cpp
cgm/branches/merge-cubit12/geom/OCC/OCCModifyEngine.hpp
Log:
Added split_curve function for merge_cubit12 specific requirement.
Added update_OCC_entity function in OCCLoop for split curve operation.
Added a check for clean_up_slivers opetion for split_body with vectors.
Consolidate function split_shape_by_location for both split body and split curve funtions
Modified: cgm/branches/merge-cubit12/geom/OCC/OCCLoop.cpp
===================================================================
--- cgm/branches/merge-cubit12/geom/OCC/OCCLoop.cpp 2011-02-15 16:59:02 UTC (rev 4494)
+++ cgm/branches/merge-cubit12/geom/OCC/OCCLoop.cpp 2011-02-15 19:11:11 UTC (rev 4495)
@@ -36,6 +36,8 @@
#include "BRepBuilderAPI_GTransform.hxx"
#include "BRepBuilderAPI_ModifyShape.hxx"
#include "BRepAlgoAPI_BooleanOperation.hxx"
+#include "LocOpe_SplitShape.hxx"
+#include "BRepTools_WireExplorer.hxx"
// ********** END CUBIT INCLUDES **********
// ********** BEGIN STATIC DECLARATIONS **********
@@ -267,3 +269,40 @@
return CUBIT_SUCCESS;
}
+//----------------------------------------------------------------
+// Function: TopoDS_Shape level function to update the core Loop
+// for split Boolean operation of the body.
+// Author: Jane Hu
+//----------------------------------------------------------------
+CubitStatus OCCLoop::update_OCC_entity(TopoDS_Wire & old_loop,
+ LocOpe_SplitShape* sp)
+{
+ TopTools_ListOfShape shapes;
+ shapes.Assign(sp->DescendantShapes(old_loop));
+ assert(shapes.Extent() == 1);
+ TopoDS_Shape new_loop = shapes.First();
+ TopoDS_Shape shape_edge;
+
+ //set curves
+ BRepTools_WireExplorer Ex;
+ for(Ex.Init(old_loop); Ex.More();Ex.Next())
+ {
+ TopoDS_Edge edge = Ex.Current();
+ shapes.Assign(sp->DescendantShapes(edge));
+ if(shapes.Extent() > 1)
+ {
+ //update all attributes first.
+ TopTools_ListIteratorOfListOfShape it;
+ it.Initialize(shapes);
+ for(; it.More(); it.Next())
+ {
+ shape_edge = it.Value();
+ OCCQueryEngine::instance()->copy_attributes(edge, shape_edge);
+ }
+ OCCQueryEngine::instance()->update_OCC_map(edge, shape_edge);
+ }
+ }
+
More information about the cgma-dev
mailing list