[cgma-dev] r4458 - cgm/branches/merge-cubit12/geom/OCC
jiangtao_ma at yahoo.com
jiangtao_ma at yahoo.com
Fri Jan 21 08:54:13 CST 2011
Author: janehu
Date: 2011-01-21 08:54:12 -0600 (Fri, 21 Jan 2011)
New Revision: 4458
Modified:
cgm/branches/merge-cubit12/geom/OCC/OCCModifyEngine.cpp
cgm/branches/merge-cubit12/geom/OCC/OCCModifyEngine.hpp
Log:
Added function for Imprint_type = INCLUDE_NEIGHBORS and given neighbor_imprint_list for webcuts.
Modified: cgm/branches/merge-cubit12/geom/OCC/OCCModifyEngine.cpp
===================================================================
--- cgm/branches/merge-cubit12/geom/OCC/OCCModifyEngine.cpp 2011-01-20 23:30:04 UTC (rev 4457)
+++ cgm/branches/merge-cubit12/geom/OCC/OCCModifyEngine.cpp 2011-01-21 14:54:12 UTC (rev 4458)
@@ -4864,6 +4864,20 @@
{
CubitStatus stat;
DLIList<BodySM*> new_BodySMs;
+
+ if(preview)
+ {
+ TopoDS_Face* p_face;
+ stat = get_3_point_plane(v1, v2, v3, p_face);
+ if(!stat)
+ return stat;
+ GfxPreview::clear();
+ OCCDrawTool::instance()->draw_TopoDS_Shape(p_face, CUBIT_BLUE, CUBIT_TRUE);
+ GfxPreview::flush();
+ delete p_face;
+ return CUBIT_SUCCESS;
+ }
+
stat = OCCModifyEngine::instance()->section(webcut_body_list, v1, v2, v3, new_BodySMs, true, true,false);
if(stat == CUBIT_FAILURE)
{
@@ -4878,9 +4892,9 @@
return stat;
}
+ BodySM* new_body1, *new_body2;
if(imprint_type > NO_IMPRINT)
{
- BodySM* new_body1, *new_body2;
for(int i = 0; i < new_BodySMs.size()-1; i ++)
{
BodySM* body1 = new_BodySMs[i];
@@ -4897,6 +4911,51 @@
}
results_list = new_BodySMs;
+
+ //now imprint with the neighbors
+ if( imprint_type == INCLUDE_NEIGHBORS )
+ {
+ // Loop over all the neighboring Bodies
+ DLIList<TopoDS_Shape*> shape_list1, shape_list2;
+ DLIList<CubitBoolean> is_volume;
+ stat = get_shape_list(neighbor_imprint_list,shape_list1,is_volume,false);
+ if (!stat)
+ {
+ PRINT_WARNING("Can't imprint using neighouring bodies.\n");
More information about the cgma-dev
mailing list