[cgma-dev] r2817 - cgm/trunk/geom/OCC
jiangtao_ma at yahoo.com
jiangtao_ma at yahoo.com
Tue Apr 14 16:13:03 CDT 2009
Author: janehu
Date: 2009-04-14 16:13:02 -0500 (Tue, 14 Apr 2009)
New Revision: 2817
Modified:
cgm/trunk/geom/OCC/OCCModifyEngine.cpp
Log:
fix for the modify testing.
Modified: cgm/trunk/geom/OCC/OCCModifyEngine.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCModifyEngine.cpp 2009-04-13 18:20:51 UTC (rev 2816)
+++ cgm/trunk/geom/OCC/OCCModifyEngine.cpp 2009-04-14 21:13:02 UTC (rev 2817)
@@ -2376,7 +2376,7 @@
if (count_intersection == 1 )
PRINT_WARNING("Cant make a scar on existing face without splitting it. \n");
}
- if (stat)
+ if (stat || count_intersection == 2)
{
BRepBuilderAPI_MakeWire myWire;
edge_list->reset();
@@ -3511,10 +3511,9 @@
check_operation(common_shape, from_shape, is_volume[i], has_changed,
&intersector, keep_old);
- if(from_shape->IsNull())
+ if(from_shape->IsNull() )
{
PRINT_INFO("The %d body did not have common part with the tool_body.\n", i+1);
- new_bodies.append(from_body);
}
else
tbs += OCCQueryEngine::instance()->populate_topology_bridge(*from_shape);
@@ -3526,6 +3525,9 @@
new_bodies.append(bodysm);
}
+ if(tbs.size() == 0)
+ stat = CUBIT_FAILURE;
+
//ok, we're done with all cuts, delete unnecessaries.
if(!keep_old)
OCCQueryEngine::instance()->delete_solid_model_entities(tool_body_ptr);
@@ -3547,6 +3549,8 @@
delete shape;
}
}
+ if(!stat)
+ return stat;
return CUBIT_SUCCESS;
}
@@ -3589,7 +3593,7 @@
}
//got cut. Update the entities
- if(after_mass < TOL && !no_volume) //no common section
+ if(after_mass < TOL || no_volume) //no common section
cut_shape.Nullify();
has_changed = CUBIT_TRUE;
TopExp_Explorer Ex;
@@ -4443,7 +4447,10 @@
continue;
}
OCCQueryEngine::instance()->delete_solid_model_entities(acurve);
- return CUBIT_SUCCESS;
+ if(result_body_list.size()>0)
+ return CUBIT_SUCCESS;
+ else
+ return CUBIT_FAILURE;
}
//===============================================================================
More information about the cgma-dev
mailing list