[cgma-dev] r5088 - cgm/trunk/geom/OCC
jiangtao_ma at yahoo.com
jiangtao_ma at yahoo.com
Thu Aug 11 09:21:55 CDT 2011
Author: janehu
Date: 2011-08-11 09:21:55 -0500 (Thu, 11 Aug 2011)
New Revision: 5088
Modified:
cgm/trunk/geom/OCC/OCCCurve.cpp
cgm/trunk/geom/OCC/OCCModifyEngine.cpp
cgm/trunk/geom/OCC/OCCQueryEngine.cpp
cgm/trunk/geom/OCC/OCCSurface.cpp
Log:
Added changes to make coedge and loop direction correct. For surfaces, opposite to acis where face is always forward direction respect to its volume, OCC surfaces and shell might be reversed direction with respect to its solid. This may cause volume mesh fail, I am looking into it now, and might need to change some logic in the geom level of cgm.
Modified: cgm/trunk/geom/OCC/OCCCurve.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCCurve.cpp 2011-08-09 22:27:32 UTC (rev 5087)
+++ cgm/trunk/geom/OCC/OCCCurve.cpp 2011-08-11 14:21:55 UTC (rev 5088)
@@ -123,10 +123,10 @@
void OCCCurve::set_TopoDS_Edge(TopoDS_Edge edge)
{
- if(edge.IsEqual(*myTopoDSEdge))
+ if(edge.IsSame(*myTopoDSEdge))
return;
- if(!edge.IsSame(*myTopoDSEdge))
+ else
{
DLIList<OCCPoint*> points ;
this->get_points(points);
@@ -737,8 +737,7 @@
double OCCCurve::start_param()
{
double start = 0.0, end = 0.0;
-
- get_param_range( start, end );
+ get_param_range( start, end );
return start;
}
@@ -781,29 +780,22 @@
{
TopTools_IndexedMapOfShape M;
TopExp::MapShapes(*myTopoDSEdge, TopAbs_VERTEX, M);
- TopologyBridge *point1, *point2;
- if (M.Extent()==1) {
- point1 = OCCQueryEngine::instance()->occ_to_cgm(M(1));
- if (point1)
- children.append_unique(point1);
- } else if (M.Extent()==2) {
- if ( fabs(BRep_Tool::Parameter(TopoDS::Vertex(M(1)), *myTopoDSEdge)-start_param()) >
- fabs(BRep_Tool::Parameter(TopoDS::Vertex(M(2)), *myTopoDSEdge)-start_param()) ) {
- point1 = OCCQueryEngine::instance()->occ_to_cgm(M(2));
- point2 = OCCQueryEngine::instance()->occ_to_cgm(M(1));
- } else {
- point1 = OCCQueryEngine::instance()->occ_to_cgm(M(1));
- point2 = OCCQueryEngine::instance()->occ_to_cgm(M(2));
- }
- if (point1 && point1 == point2) {
- children.append_unique(point1);
- } else {
- if (point1)
- children.append_unique(point1);
- if (point2)
More information about the cgma-dev
mailing list