1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0024035: Intersector is not symmetrical

asymmetrical check in  Standard_Boolean IntCurve_IntPolyPolyGen::findIntersect was changed to symmetrical.
fix wrong calculation of approx parameter on curve for last polygon segment
Added test case bugs/modalg_5/bug24035
Modified TODO in "de" test cases because there are small differences with old behaviour
Modified test case heal/split_closed_faces/G5 because of corrections in intersector's behavior, which lead to changes in checkshape
This commit is contained in:
ika
2013-06-27 10:08:14 +04:00
parent 9d109e39c2
commit 404d419daa
18 changed files with 55 additions and 27 deletions

View File

@@ -967,12 +967,12 @@ Standard_Boolean IntCurve_IntPolyPolyGen::findIntersect(
Standard_Real _PolyUInf,_PolyVInf;
SPnt1.InfoFirst(Type,SegIndex1onP1,ParamOnLine);
if(SegIndex1onP1 >= thePoly1.NbSegments()) { SegIndex1onP1--; ParamOnLine = 1.0; }
if(SegIndex1onP1 > thePoly1.NbSegments()) { SegIndex1onP1--; ParamOnLine = 1.0; }
if(SegIndex1onP1 <= 0) { SegIndex1onP1=1; ParamOnLine = 0.0; }
_PolyUInf = thePoly1.ApproxParamOnCurve(SegIndex1onP1,ParamOnLine);
SPnt1.InfoSecond(Type,SegIndex1onP2,ParamOnLine);
if(SegIndex1onP2 >= thePoly2.NbSegments()) { SegIndex1onP2--; ParamOnLine = 1.0; }
if(SegIndex1onP2 > thePoly2.NbSegments()) { SegIndex1onP2--; ParamOnLine = 1.0; }
if(SegIndex1onP2 <= 0) { SegIndex1onP2=1; ParamOnLine = 0.0; }
_PolyVInf = thePoly2.ApproxParamOnCurve(SegIndex1onP2,ParamOnLine);
@@ -1094,16 +1094,16 @@ Standard_Boolean IntCurve_IntPolyPolyGen::findIntersect(
if(Pos1==IntRes2d_Middle && Pos2!=IntRes2d_Middle) {
PolyUInf=TheProjPCur::FindParameter( C1,P2,D1.FirstParameter(),D1.LastParameter(),TheCurveTool::EpsX(C1));
PolyUSup=TheProjPCur::FindParameter( C1,P2,D1.FirstParameter(),D1.LastParameter(),TheCurveTool::EpsX(C1));
}
else if(Pos1!=IntRes2d_Middle && Pos2==IntRes2d_Middle) {
PolyVInf=TheProjPCur::FindParameter( C2,P1,D2.FirstParameter(),D2.LastParameter(),TheCurveTool::EpsX(C2));
PolyVSup=TheProjPCur::FindParameter( C2,P1,D2.FirstParameter(),D2.LastParameter(),TheCurveTool::EpsX(C2));
}
else if(Abs(ParamInfOnCurve1-ParamSupOnCurve1) > Abs(ParamInfOnCurve2-ParamSupOnCurve2)) {
PolyVInf=TheProjPCur::FindParameter( C2,P1,D2.FirstParameter(),D2.LastParameter(),TheCurveTool::EpsX(C2));
PolyVSup=TheProjPCur::FindParameter( C2,P1,D2.FirstParameter(),D2.LastParameter(),TheCurveTool::EpsX(C2));
}
else {
PolyUInf=TheProjPCur::FindParameter( C1,P2,D1.FirstParameter(),D1.LastParameter(),TheCurveTool::EpsX(C1));
PolyUSup=TheProjPCur::FindParameter( C1,P2,D1.FirstParameter(),D1.LastParameter(),TheCurveTool::EpsX(C1));
}
if(IntImpParGen::DetermineTransition( Pos1,Tan1,Trans1,Pos2,Tan2,Trans2,TolConf)