[cgma-dev] r2482 - cgm/trunk/geom/OCC
janehu at mcs.anl.gov
janehu at mcs.anl.gov
Fri Dec 12 14:02:20 CST 2008
Author: janehu
Date: 2008-12-12 14:02:20 -0600 (Fri, 12 Dec 2008)
New Revision: 2482
Modified:
cgm/trunk/geom/OCC/OCCModifyEngine.cpp
cgm/trunk/geom/OCC/OCCQueryEngine.cpp
cgm/trunk/geom/OCC/OCCShell.cpp
cgm/trunk/geom/OCC/OCCSurface.cpp
Log:
Fixed for 32-bit build crash.
Modified: cgm/trunk/geom/OCC/OCCModifyEngine.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCModifyEngine.cpp 2008-12-11 21:18:43 UTC (rev 2481)
+++ cgm/trunk/geom/OCC/OCCModifyEngine.cpp 2008-12-12 20:02:20 UTC (rev 2482)
@@ -3562,8 +3562,10 @@
bool keep_old) const
{
if(bodies.size() < 2)
+ {
+ newBodies = bodies;
return CUBIT_SUCCESS;
-
+ }
//all bodies must have only one lump in order for boolean operation to work.
DLIList<Lump*> lumps;
for (int i = 0; i < bodies.size(); i++)
Modified: cgm/trunk/geom/OCC/OCCQueryEngine.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCQueryEngine.cpp 2008-12-11 21:18:43 UTC (rev 2481)
+++ cgm/trunk/geom/OCC/OCCQueryEngine.cpp 2008-12-12 20:02:20 UTC (rev 2482)
@@ -1555,15 +1555,22 @@
OCCLoop* old_loop = old_loops.get_and_step();
DLIList<OCCCoEdge*> test_coedges = old_loop->coedges();
int found = 0;
- if(test_coedges.get()->curve() != curve)
- test_coedges.step();
- else
- found = 1;
+ for(int j = 0; j < test_coedges.size() ; j++)
+ {
+ if(test_coedges.get()->curve() != curve)
+ test_coedges.step();
+ else
+ {
+ found = 1;
+ break;
+ }
+ }
if(!found)
occ_curve->remove_loop(old_loop);
}
}
- assert(occ_curve->loops().size() < 2);
+ //for unite case, it's possible that the a curve has 3 coedges because
+ //opencascade do not perform unite on surfaces.
coedge = new OCCCoEdge( curve, loop, sense);
coedges_new.append(coedge);
occ_curve->add_loop(loop);
Modified: cgm/trunk/geom/OCC/OCCShell.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCShell.cpp 2008-12-11 21:18:43 UTC (rev 2481)
+++ cgm/trunk/geom/OCC/OCCShell.cpp 2008-12-12 20:02:20 UTC (rev 2482)
@@ -310,7 +310,7 @@
shape = it.Value();
OCCQueryEngine::instance()->copy_attributes(face, shape);
}
- shape = shapes.First();
+ shape.Nullify() ;
}
else
shape.Nullify();
Modified: cgm/trunk/geom/OCC/OCCSurface.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCSurface.cpp 2008-12-11 21:18:43 UTC (rev 2481)
+++ cgm/trunk/geom/OCC/OCCSurface.cpp 2008-12-12 20:02:20 UTC (rev 2482)
@@ -929,7 +929,7 @@
shape_edge = it.Value();
OCCQueryEngine::instance()->copy_attributes(edge, shape_edge);
}
- shape_edge = shapes.First();
+ shape_edge.Nullify();
}
else if (op->IsDeleted(edge))
shape_edge.Nullify();
@@ -956,7 +956,7 @@
shape_vertex = it.Value();
OCCQueryEngine::instance()->copy_attributes(vertex, shape_vertex);
}
- shape_vertex = shapes.First();
+ shape_vertex.Nullify() ;
}
else
shape_vertex.Nullify();
More information about the cgma-dev
mailing list