X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_TopoCurve.cxx;h=2323240709a5ca436f4d7c3a041ed3de93549f0c;hb=b86ee42a0010ef6bde30373a8741dd865d557dd3;hp=540dd8b08489e2a9f8d35f4c41d0270bcf9e30be;hpb=7de2b9cfd8501129720f9338fcdf1766007511b9;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_TopoCurve.cxx b/src/HYDROData/HYDROData_TopoCurve.cxx index 540dd8b0..23232407 100644 --- a/src/HYDROData/HYDROData_TopoCurve.cxx +++ b/src/HYDROData/HYDROData_TopoCurve.cxx @@ -39,7 +39,7 @@ #include #include -#define _DEVDEBUG_ +//#define _DEVDEBUG_ #include "HYDRO_trace.hxx" #include @@ -134,7 +134,7 @@ static TopoDS_Edge ReplaceVertex( } // Projects the point to the curve. -static double ProjectPointToCurve( +double ProjectPointToCurve( const gp_XYZ& thePoint, const Adaptor3d_Curve& theCurve, double& theParameter) @@ -283,12 +283,13 @@ static int IntersectCurve( if (ProjectPointToCurve(aEndPs[aPI], theCurve1, aParameter) <= Precision::SquareConfusion()) { + DEBTRACE("aParameter " << aParameter); aIntCount += AddParameter(theCurve1, aParameter, theParameters); } } // Process the internal extremums. - Extrema_ExtCC aAlgo(theCurve1, theCurve2); + Extrema_ExtCC aAlgo(theCurve1, theCurve2); //, 1.e-6, 1.e-6); if (aAlgo.IsDone()) { const int aECount = aAlgo.NbExt(); @@ -296,9 +297,11 @@ static int IntersectCurve( { Extrema_POnCurv aP1, aP2; aAlgo.Points(aEN, aP1, aP2); + DEBTRACE("SquareDistance " << aP1.Value().SquareDistance(aP2.Value())); if (aP1.Value().SquareDistance(aP2.Value()) <= Precision::SquareConfusion()) { + DEBTRACE("aP1.Parameter() " << aP1.Parameter()); aIntCount += AddParameter(theCurve1, aP1.Parameter(), theParameters); } } @@ -666,17 +669,20 @@ int HYDROData_TopoCurve::Intersect( int aIntCount = 0; theParameters.resize(myEdges.size()); + DEBTRACE("myEdges.size() " << myEdges.size()); std::list::const_iterator aEIt = myEdges.begin(); std::list::const_iterator aLastEIt = myEdges.end(); std::deque >::iterator aPIt = theParameters.begin(); for (; aEIt != aLastEIt; ++aPIt, ++aEIt) { + DEBTRACE("---"); const TopoDS_Edge& aEdge = *aEIt; std::list& aParams = *aPIt; TopExp_Explorer aEIt2(theWire, TopAbs_EDGE); for (; aEIt2.More(); aEIt2.Next()) { aIntCount += IntersectEdge(aEdge,TopoDS::Edge(aEIt2.Current()), aParams); + DEBTRACE("aParams.size() " << aParams.size()); } } DEBTRACE("aIntCount " << aIntCount);