[cgma-dev] r5132 - cgm/trunk/geom/OCC
jiangtao_ma at yahoo.com
jiangtao_ma at yahoo.com
Tue Aug 30 10:27:29 CDT 2011
Author: janehu
Date: 2011-08-30 10:27:28 -0500 (Tue, 30 Aug 2011)
New Revision: 5132
Modified:
cgm/trunk/geom/OCC/OCCCurve.cpp
cgm/trunk/geom/OCC/OCCModifyEngine.cpp
cgm/trunk/geom/OCC/OCCQueryEngine.cpp
Log:
Fixed mcnp2cad/INP-box4 test, which after I added curveList for points, failed to update the curveLists in certain situations. And some minor changes. Passed make check under cgm.
Modified: cgm/trunk/geom/OCC/OCCCurve.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCCurve.cpp 2011-08-29 15:51:42 UTC (rev 5131)
+++ cgm/trunk/geom/OCC/OCCCurve.cpp 2011-08-30 15:27:28 UTC (rev 5132)
@@ -1001,17 +1001,26 @@
if(!shape.IsNull())
curve = TopoDS::Edge(shape);
- //set the vertices
- DLIList<TopologyBridge*> vertices;
- get_children_virt(vertices);
- for (int i = 1; i <= vertices.size(); i++)
+ //make sure the shape (edge) length is greater than 0.
+ GProp_GProps myProps;
+ BRepGProp::LinearProperties(curve, myProps);
+ double d = myProps.Mass();
+ if(d > OCCQueryEngine::instance()->get_sme_resabs_tolerance())
{
- TopologyBridge* tb = vertices.get_and_step();
- OCCPoint *point = CAST_TO(tb, OCCPoint);
- if (point)
- point->update_OCC_entity(aBRepTrsf, op);
+ //set the vertices
+ DLIList<TopologyBridge*> vertices;
+ get_children_virt(vertices);
+ for (int i = 1; i <= vertices.size(); i++)
+ {
+ TopologyBridge* tb = vertices.get_and_step();
+ OCCPoint *point = CAST_TO(tb, OCCPoint);
+ if (point)
+ point->update_OCC_entity(aBRepTrsf, op);
+ }
+ myMarked = 1;
}
- myMarked = 1;
+ else
+ curve.Nullify();
OCCQueryEngine::instance()->update_OCC_map(*myTopoDSEdge, curve);
}
Modified: cgm/trunk/geom/OCC/OCCModifyEngine.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCModifyEngine.cpp 2011-08-29 15:51:42 UTC (rev 5131)
+++ cgm/trunk/geom/OCC/OCCModifyEngine.cpp 2011-08-30 15:27:28 UTC (rev 5132)
@@ -2456,7 +2456,12 @@
for(int j = 0; j < edge_list->size(); j++)
{
TopoDS_Edge e = *(edge_list->get_and_step());
- myWire.Add(e);
+ //Don't include zero length edge.
More information about the cgma-dev
mailing list