mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +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:
parent
9d109e39c2
commit
404d419daa
@ -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)
|
||||
|
31
tests/bugs/modalg_5/bug24035
Normal file
31
tests/bugs/modalg_5/bug24035
Normal file
@ -0,0 +1,31 @@
|
||||
puts "============"
|
||||
puts "OCC24035"
|
||||
puts "============"
|
||||
puts ""
|
||||
######################################################
|
||||
# Intersector is not symmetrical
|
||||
######################################################
|
||||
|
||||
restore [locate_data_file bug24035_face1] face1
|
||||
restore [locate_data_file bug24035_face2] face2
|
||||
|
||||
decho off
|
||||
set info1 [checkshape face1]
|
||||
set info2 [checkshape face2]
|
||||
decho on
|
||||
|
||||
set status 0
|
||||
if { [regexp "Faulty shapes in variables faulty_1 to faulty_2" $info1] != 1 } {
|
||||
puts "Error : There is no 2 mistakes by checkshape on face1
|
||||
set status 1
|
||||
}
|
||||
if { [regexp "Faulty shapes in variables faulty_1 to faulty_2" $info2] != 1 } {
|
||||
puts "Error : There is no 2 mistakes by checkshape on face2
|
||||
set stauts 1
|
||||
}
|
||||
|
||||
if { $status != 0 } {
|
||||
puts "Error : Intersector is not symmetrical"
|
||||
} else {
|
||||
puts "OK : Intersector is symmetrical"
|
||||
}
|
@ -1,7 +1,5 @@
|
||||
# !!!! This file is generated automatically, do not edit manually! See end script
|
||||
puts "TODO CR23096 ALL: TPSTAT : Faulty"
|
||||
puts "TODO CR23096 ALL: CHECKSHAPE : Faulty"
|
||||
|
||||
puts "TODO CR23096 ALL: TPSTAT : Faulty"
|
||||
|
||||
set filename CTS21655.igs
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
# !!!! This file is generated automatically, do not edit manually! See end script
|
||||
puts "TODO CR23096 ALL: LABELS : Faulty"
|
||||
puts "TODO CR23096 ALL: LABELS : Faulty"
|
||||
puts "TODO OCC24035 ALL: Error : 1 differences with reference data"
|
||||
|
||||
|
||||
set filename FRA62468-1.igs
|
||||
|
@ -1,6 +1,8 @@
|
||||
# !!!! This file is generated automatically, do not edit manually! See end script
|
||||
puts "TODO CR23096 ALL: LABELS : Faulty"
|
||||
puts "TODO CR23096 Mandriva2010: Error : 3 differences with reference data found :"
|
||||
puts "TODO CR23096 ALL: LABELS : Faulty"
|
||||
puts "TODO OCC24035 ALL: CHECKSHAPE : Faulty"
|
||||
puts "TODO OCC24035 ALL: NBSHAPES : Faulty"
|
||||
puts "TODO OCC24035 ALL: Error : 4 differences with reference data"
|
||||
|
||||
set LinuxDiff 3
|
||||
set filename PRO14319.igs
|
||||
|
@ -1,6 +1,6 @@
|
||||
# !!!! This file is generated automatically, do not edit manually! See end script
|
||||
puts "TODO CR23096 ALL: LABELS : Faulty"
|
||||
puts "TODO CR23096 Mandriva2010: Error : 2 differences with reference data found :"
|
||||
puts "TODO OCC24035 ALL: Error : 2 differences with reference data"
|
||||
|
||||
set LinuxDiff 2
|
||||
set filename brazo1.igs
|
||||
|
@ -1,6 +1,6 @@
|
||||
# !!!! This file is generated automatically, do not edit manually! See end script
|
||||
puts "TODO CR23096 ALL: LABELS : Faulty"
|
||||
puts "TODO CR23096 Mandriva2010: Error : 5 differences with reference data found :"
|
||||
puts "TODO OCC24035 ALL: Error : 5 differences with reference data"
|
||||
|
||||
set LinuxDiff 5
|
||||
set filename BUC60743.igs
|
||||
|
@ -1,6 +1,6 @@
|
||||
# !!!! This file is generated automatically, do not edit manually! See end script
|
||||
puts "TODO CR23096 ALL: STATSHAPE : Faulty"
|
||||
|
||||
puts "TODO OCC24035 ALL: Error : 3 differences with reference data"
|
||||
|
||||
set filename CCI60011.igs
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# !!!! This file is generated automatically, do not edit manually! See end script
|
||||
puts "TODO CR23096 ALL: CHECKSHAPE : Faulty"
|
||||
puts "TODO CR23096 ALL: LABELS : Faulty"
|
||||
puts "TODO CR23096 Mandriva2010: Error : 1 differences with reference data found :"
|
||||
puts "TODO OCC24035 ALL: Error : 1 differences with reference data"
|
||||
|
||||
set LinuxDiff 1
|
||||
set filename FRA62468-2.igs
|
||||
|
@ -1,7 +1,7 @@
|
||||
# !!!! This file is generated automatically, do not edit manually! See end script
|
||||
puts "TODO CR23096 ALL: NBSHAPES : Faulty"
|
||||
puts "TODO CR23096 ALL: TOLERANCE : Faulty"
|
||||
|
||||
puts "TODO OCC24035 ALL: Error : 3 differences with reference data"
|
||||
|
||||
set filename sim6049.igs
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
puts "TODO CR23096 ALL: CHECKSHAPE : Faulty"
|
||||
puts "TODO CR23096 ALL: LABELS : Faulty"
|
||||
puts "TODO CR23096 ALL: COLORS : Faulty"
|
||||
puts "TODO CR23096 Mandriva2010: Error : 4 differences with reference data found :"
|
||||
puts "TODO OCC24035 ALL: Error : 3 differences with reference data"
|
||||
|
||||
set LinuxDiff 4
|
||||
set filename PRO11641.igs
|
||||
|
@ -2,7 +2,7 @@
|
||||
puts "TODO CR23096 ALL: LABELS : Faulty"
|
||||
puts "TODO CR23096 ALL: COLORS : Faulty"
|
||||
puts "TODO CR23096 ALL: LAYERS : Faulty"
|
||||
puts "TODO CR23096 Mandriva2010: Error : 5 differences with reference data found :"
|
||||
puts "TODO OCC24035 ALL: Error : 3 differences with reference data"
|
||||
|
||||
set LinuxDiff 5
|
||||
set filename UKI60094.igs
|
||||
|
@ -1,7 +1,5 @@
|
||||
# !!!! This file is generated automatically, do not edit manually! See end script
|
||||
puts "TODO CR23096 ALL: TPSTAT : Faulty"
|
||||
puts "TODO CR23096 ALL: TOLERANCE : Faulty"
|
||||
|
||||
|
||||
set filename obtu.stp
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
# !!!! This file is generated automatically, do not edit manually! See end script
|
||||
puts "TODO CR23096 ALL: CHECKSHAPE : Faulty"
|
||||
puts "TODO CR23096 ALL: NBSHAPES : Faulty"
|
||||
|
||||
|
||||
set filename t3d_opt.stp
|
||||
|
||||
set ref_data {
|
||||
|
@ -1,7 +1,6 @@
|
||||
# !!!! This file is generated automatically, do not edit manually! See end script
|
||||
puts "TODO CR23096 ALL: CHECKSHAPE : Faulty"
|
||||
puts "TODO CR23096 ALL: TOLERANCE : Faulty"
|
||||
|
||||
puts "TODO OCC24035 ALL: Error : 3 differences with reference data"
|
||||
|
||||
set filename trj3_pm1-ug-203.stp
|
||||
|
||||
|
@ -3,7 +3,7 @@ puts "TODO CR23096 ALL: TPSTAT : Faulty"
|
||||
puts "TODO CR23096 ALL: NBSHAPES : Faulty"
|
||||
puts "TODO CR23096 ALL: STATSHAPE : Faulty"
|
||||
puts "TODO CR23096 ALL: TOLERANCE : Faulty"
|
||||
puts "TODO CR23096 Mandriva2010: Error : 3 differences with reference data found :"
|
||||
puts "TODO OCC24035 ALL: Error : 2 differences with reference data"
|
||||
|
||||
set LinuxDiff 3
|
||||
set filename 53921163S0.stp
|
||||
|
@ -2,7 +2,7 @@
|
||||
puts "TODO CR23096 ALL: TPSTAT : Faulty"
|
||||
puts "TODO CR23096 ALL: STATSHAPE : Faulty"
|
||||
puts "TODO ?CR23096 ALL: TOLERANCE : Faulty"
|
||||
puts "TODO CR23096 Mandriva2010: Error : 3 differences with reference data found :"
|
||||
puts "TODO OCC24035 ALL: Error : 2 differences with reference data"
|
||||
|
||||
set LinuxDiff 3
|
||||
set filename Z8M6SAT.stp
|
||||
|
@ -1 +1,2 @@
|
||||
puts "TODO OCC24035 ALL: Faulty shapes in variables faulty_1 to faulty_"
|
||||
restore [locate_data_file wrong_checkshape_2.brep] a
|
||||
|
Loading…
x
Reference in New Issue
Block a user