mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0032915: Geom2dAPI_InterCurveCurve, The algorithm lost an intersection point.
Get rid of strange code: preliminary check of self-intersections is made on a polygonal representation of a curve, it is able to find possible intersections, but after that it filter out segments neighbor to the pair of non-intersected segments. Test case de step_4 I1 has been marked BAD, because the self-intersection is treated correctly, but the projection algorithm generates such crooked 2D curve. Reference data in test cases heal split_angle_advanced ZA5 and ZA6 has been updated, because those shapes have self-intersected edges, which are being detected now.
This commit is contained in:
@@ -388,9 +388,6 @@ void IntCurve_IntPolyPolyGen::Perform( const TheCurve& C1
|
||||
}
|
||||
}
|
||||
|
||||
Standard_Integer Nelarg=(Poly1.NbSegments()/20);
|
||||
if(Nelarg<2) Nelarg=2;
|
||||
|
||||
for(Standard_Integer sp=1; sp <= Nbsp; sp++) {
|
||||
if(TriIndex[sp]>0) {
|
||||
const Intf_SectionPoint& SPnt = InterPP.PntValue(TriIndex[sp]);
|
||||
@@ -401,20 +398,7 @@ void IntCurve_IntPolyPolyGen::Perform( const TheCurve& C1
|
||||
if(Abs(SegIndex1-SegIndex2)>1) {
|
||||
|
||||
EIP.Perform(Poly1,Poly1,SegIndex1,SegIndex2,ParamOn1,ParamOn2);
|
||||
if(EIP.NbRoots()==0) {
|
||||
//-- All neighbor segments are removed
|
||||
for(Standard_Integer k=sp+1;k<=Nbsp;k++) {
|
||||
Standard_Integer kk=TriIndex[k];
|
||||
// --- avoid negative indices as well as in outer done
|
||||
if( kk > 0 ) {
|
||||
if( Abs(SegIndex1-PtrSegIndex1[kk])< Nelarg
|
||||
&& Abs(SegIndex2-PtrSegIndex2[kk])< Nelarg) {
|
||||
TriIndex[k]=-k;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(EIP.NbRoots()>=1) {
|
||||
if(EIP.NbRoots()>=1) {
|
||||
//--------------------------------------------------------------------
|
||||
//-- It is checked if the found point is a root
|
||||
//--------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user