diff --git a/src/IntWalk/IntWalk_PWalking.lxx b/src/IntWalk/IntWalk_PWalking.lxx index b9216b56f8..fe5ea6f1d4 100644 --- a/src/IntWalk/IntWalk_PWalking.lxx +++ b/src/IntWalk/IntWalk_PWalking.lxx @@ -65,15 +65,17 @@ inline const gp_Dir& IntWalk_PWalking::TangentAtLine(Standard_Integer& theIndex) inline void IntWalk_PWalking::AddAPoint(const IntSurf_PntOn2S& POn2S) { #if REGLAGE - Standard_Integer n=theLine->NbPoints(); + Standard_Integer n=line->NbPoints()+1; + if (n == 1) + { + std::cout << "Dump of WL" << std::endl; + } + if(n) { - gp_Vec V(POn2S.Value(),theLine->Value(n).Value()); Standard_Real u1,v1,u2,v2; - Standard_Real U1,V1,U2,V2; POn2S.Parameters(u1,v1,u2,v2); - theLine->Value(n).Parameters(U1,V1,U2,V2); - printf("\n%3d: (%10.5g)(%+12.5g %+12.5g %+12.5g) (%+12.5g %+12.5g) (%+12.5g %+12.5g)",n, - V.Magnitude(),V.X(),V.Y(),V.Z(),U1-u1,V1-v1,U2-u2,V2-v2); + printf("point p%d %+10.20f %+10.20f %+10.20f\n", + n, POn2S.Value().X(), POn2S.Value().Y(), POn2S.Value().Z()); fflush(stdout); } #endif diff --git a/src/QABugs/QABugs_11.cxx b/src/QABugs/QABugs_11.cxx index 8aab688563..d25029f35e 100644 --- a/src/QABugs/QABugs_11.cxx +++ b/src/QABugs/QABugs_11.cxx @@ -950,56 +950,6 @@ static Standard_Integer OCC277bug (Draw_Interpretor& di, Standard_Integer nb, co return 0; } -#include - -static Standard_Integer OCC333bug (Draw_Interpretor& di, Standard_Integer n, const char ** a) -{ - if( n < 3) { - di<<"-1\n"; - di << "Usage: " << a[0] << " edge1 edge2 [toler domaindist]\n"; - return 1; - } - TopoDS_Shape Sh1 = DBRep::Get(a[1]); - TopoDS_Shape Sh2 = DBRep::Get(a[2]); - if(Sh1.IsNull() || Sh2.IsNull()) { - di<<"-2\n"; - di<<"Invalid arguments\n"; - return 1; - } - TopoDS_Edge e1 = TopoDS::Edge(Sh1); - TopoDS_Edge e2 = TopoDS::Edge(Sh2); - if(e1.IsNull() || e2.IsNull()) { - di<<"-3\n"; - di<<"Invalid type of arguments\n"; - return 1; - } - Standard_Real aTol = Precision::Confusion(); - Standard_Real aDistDomain = 0.0; - Standard_Integer k = 3; - if(k < n) - aTol = Draw::Atof(a[k++]); - if(k < n) - aDistDomain = Draw::Atof(a[k++]); - - ShapeAnalysis_Edge sae; - if(sae.CheckOverlapping(e1,e2,aTol,aDistDomain)) { - if(aDistDomain ==0.0) { - di<<"1\n"; - di<<"Edges is overlaping comletly\n"; - } else { - di<<"2\n"; - di<<"Edges is overlaped\n"; - di<<"with tolerance = "< #include #include @@ -4830,8 +4780,6 @@ void QABugs::Commands_11(Draw_Interpretor& theCommands) { //theCommands.Add("OCC277","OCC277", __FILE__, OCC277bug, group); theCommands.Add("OCC277","OCC277", __FILE__, OCC277bug, group); - theCommands.Add("OCC333","OCC333 edge1 edge2 [toler domaindist]; Check overlapping edges", __FILE__, OCC333bug, group); - theCommands.Add("OCC363", "OCC363 document filename ", __FILE__, OCC363, group); // Must use OCC299 //theCommands.Add("OCC372", "OCC372", __FILE__, OCC372, group); diff --git a/tests/bugs/modalg_2/bug251_1 b/tests/bugs/modalg_2/bug251_1 index 7b5dfab269..6a96082df2 100755 --- a/tests/bugs/modalg_2/bug251_1 +++ b/tests/bugs/modalg_2/bug251_1 @@ -1,13 +1,7 @@ -pload QAcommands - puts "================" -puts "OCC251" +puts "OCC251: Section of two faces f1 and f2 depends on order of arguments: section r1 f1 f2 and section r2 f2 f1 give different results, one of result is invalid - overlapped edges." puts "================" puts "" -########################################################### -## Section of two faces f1 and f2 depends on order of arguments: section r1 f1 f2 and -## section r2 f2 f1 give different results, one of result is invalid - overlapped edges. -########################################################### restore [locate_data_file OCC251.brep] f explode f @@ -17,19 +11,27 @@ checkshape f_2 bsection result f_1 f_2 explode result -set status [OCC333 result_1 result_2] -if {[llength ${status}] < 1} { - puts "OCC251 ERROR" -} else { - regexp {([-0-9.+eE]+)} $status full code - if { ${code} == 3 || ${code} == 2} { - puts "OCC251 OK (case 1) : Section command works properly" - } else { - puts "Faulty OCC251 (case 1): Section was made WRONGLY" +foreach a [explode result e] { + foreach b [explode result e] { + if { ![regexp {not} [compare b_1 n_1]] } { + continue; } + + set coe [checkoverlapedges e1 e2 5.0e-5] + + puts "$a <-> $b: $coe" + if { [regexp "Edges is not overlaped" $coe] != 1 } { + puts "Error: $a and $b are overlaped" + } + } } checkprops result -l 1. checkshape result -checksection result -checkview -display result -2d -path ${imagedir}/${test_image}.png +checksection result -r 2 + +smallview +don result* +fit + +checkview -screenshot -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_2/bug251_2 b/tests/bugs/modalg_2/bug251_2 index 2a2a194acd..ae3cc79ce5 100755 --- a/tests/bugs/modalg_2/bug251_2 +++ b/tests/bugs/modalg_2/bug251_2 @@ -1,13 +1,7 @@ -pload QAcommands - puts "================" -puts "OCC251" +puts "OCC251: Section of two faces f1 and f2 depends on order of arguments: section r1 f1 f2 and section r2 f2 f1 give different results, one of result is invalid - overlapped edges." puts "================" puts "" -########################################################### -## Section of two faces f1 and f2 depends on order of arguments: section r1 f1 f2 and -## section r2 f2 f1 give different results, one of result is invalid - overlapped edges. -########################################################### restore [locate_data_file OCC251.brep] f explode f @@ -17,19 +11,27 @@ checkshape f_2 bsection result f_2 f_1 explode result -set status [OCC333 result_1 result_2] -if {[llength ${status}] < 1} { - puts "OCC251 ERROR" -} else { - regexp {([-0-9.+eE]+)} $status full code - if { ${code} == 3 || ${code} == 2 } { - puts "OCC251 OK (case 2) : Section command works properly" - } else { - puts "Faulty OCC251 (case 2): Section was made WRONGLY" +foreach a [explode result e] { + foreach b [explode result e] { + if { ![regexp {not} [compare b_1 n_1]] } { + continue; } + + set coe [checkoverlapedges e1 e2 5.0e-5] + + puts "$a <-> $b: $coe" + if { [regexp "Edges is not overlaped" $coe] != 1 } { + puts "Error: $a and $b are overlaped" + } + } } checkprops result -l 1. checkshape result -checksection result -checkview -display result -2d -path ${imagedir}/${test_image}.png +checksection result -r 2 + +smallview +don result* +fit + +checkview -screenshot -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_3/bug600 b/tests/bugs/modalg_3/bug600 index fd7ee260ff..02c44c87fb 100755 --- a/tests/bugs/modalg_3/bug600 +++ b/tests/bugs/modalg_3/bug600 @@ -1,31 +1,32 @@ +puts "========================" +puts " OCC600: Result of BOPCOMMON operation is unclosed shape inspite of source solids are valid" +puts "========================" + +cpulimit 200 -puts "========================" -puts " OCC600" -puts "========================" -## Result of BOPCOMMON operation is unclosed shape inspite of source solids are valid -############################################################ -cpulimit 5000 restore [locate_data_file OCC600_1.brep] a checkshape a restore [locate_data_file OCC600_2.brep] b checkshape b bop b a -bopcommon result +bopsection rs +checksection rs -r 0 +checkprops rs -l 1439.11 -set square 41970.8 +bopcommon result set nbshapes_expected " Number of shapes in shape - VERTEX : 55 - EDGE : 93 - WIRE : 40 - FACE : 40 - SHELL : 1 - SOLID : 1 + VERTEX : 55 + EDGE : 93 + WIRE : 40 + FACE : 40 + SHELL : 1 + SOLID : 1 COMPSOLID : 0 - COMPOUND : 1 - SHAPE : 231 + COMPOUND : 1 + SHAPE : 231 " checknbshapes result -ref ${nbshapes_expected} -t -m "Result of Boolean operations" diff --git a/tests/bugs/modalg_7/bug28119_1 b/tests/bugs/modalg_7/bug28119_1 index b5666f1692..fe8fef9216 100755 --- a/tests/bugs/modalg_7/bug28119_1 +++ b/tests/bugs/modalg_7/bug28119_1 @@ -1,12 +1,15 @@ -puts "TODO OCC28119 ALL: Error: Cannot find the result of BLEND-operation. The result of BOP operation will be returned." - puts "========" -puts "OCC28119" +puts "OCC28119: Blend fails on fused identical but shifted tori" puts "========" puts "" -################################################# -# Blend fails on fused identical but shifted tori -################################################# + +# Different result between Debian 7 and Debian 8. +puts "TODO ?OCC28119 ALL: Error: Cannot find the result of BLEND-operation. The result of BOP operation will be returned." +puts "TODO ?OCC29910 ALL: exception" +puts "TODO ?OCC29910 ALL: Exception" +puts "TODO ?OCC29910 ALL: Error: Exception in bfuseblend operation" + +cpulimit 200 # identical secondary radi @@ -14,7 +17,9 @@ ptorus t1 100 10 ptorus t2 100 10 ttranslate t2 100 0 0 -bfuseblend result t1 t2 5 +if { [ catch { bfuseblend result t1 t2 5 } catch_result ] } { + puts "Error: Exception in bfuseblend operation." +} checkview -display result -2d -path ${imagedir}/${test_image}-2d.png checkview -display result -3d -path ${imagedir}/${test_image}-3d.png diff --git a/tests/bugs/modalg_7/bug28764 b/tests/bugs/modalg_7/bug28764 index 192d1f6be9..25c5de6a8d 100644 --- a/tests/bugs/modalg_7/bug28764 +++ b/tests/bugs/modalg_7/bug28764 @@ -16,11 +16,12 @@ don f fit # Before the fix: Exception in Debug-mode only -set log [bopcurves f_1 f_2 -2d] -checkview -screenshot -2d -path ${imagedir}/${test_image}.png +regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} [bopcurves f_1 f_2 -2d] full Toler NbCurv -regexp {Tolerance Reached=+([-0-9.+eE]+)} ${log} full Toler +checkreal Tolerance $Toler 4.601149532364662e-008 1.0e-7 0.0 -if { ${Toler} > 1.e-7} { - puts "Error: bad tolerance of result" +if {$NbCurv != 1} { + puts "Error: Please check NbCurves for intersector" } + +checkview -screenshot -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_7/bug29910_1 b/tests/bugs/modalg_7/bug29910_1 new file mode 100644 index 0000000000..60aeab9963 --- /dev/null +++ b/tests/bugs/modalg_7/bug29910_1 @@ -0,0 +1,46 @@ +puts "========" +puts "OCC29910: Porting to Debian80-64 : Regressions in Modeling Algorithms" +puts "========" +puts "" + +# Different result between Debian 7 and Debian 8. +puts "TODO ?OCC29910 Linux: Error : is WRONG because number of EDGE entities in shape \"rs\" is 16" +puts "TODO ?OCC29910 Linux: Error : is WRONG because number of SHELL entities in shape \"result\" is 5" +puts "TODO ?OCC29910 Linux: Error : is WRONG because number of SOLID entities in shape \"result\" is 5" +puts "TODO ?OCC29910 Linux: Error : The area of result shape is" +puts "TODO ?OCC29910 Linux: Error : The volume of result shape is" + +ptorus t1 100 10 +ptorus t2 100 10 +ttranslate t2 100 0 0 +axo; fit +bclearobjects +bcleartools +baddobjects t1 +baddtools t2 +bfillds +bbop rs 4 + +checksection rs -r 0 + +checkshape rs + +if {[regexp "Faulties" [bopargcheck rs]]} { + puts "Error: bopargcheck has found some faulties in result" +} + +checkmaxtol rs -ref 7.5e-6 +checknbshapes rs -edge 14 +checkprops rs -l 330.096 + +bbuild result + +checknbshapes result -shell 6 -solid 6 +checkshape result +checkprops result -v 382445 -s 82663 + +smallview +don result +fit + +checkview -screenshot -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_7/bug29910_2 b/tests/bugs/modalg_7/bug29910_2 new file mode 100644 index 0000000000..178efaaada --- /dev/null +++ b/tests/bugs/modalg_7/bug29910_2 @@ -0,0 +1,37 @@ +puts "========" +puts "OCC29910: Porting to Debian80-64 : Regressions in Modeling Algorithms" +puts "========" +puts "" + +# Different result between Debian 7 and Debian 8 and between MSVC 2010 and 2017. +puts "TODO ?OCC29910 Windows: Error: Tolerance = 4.0169383828521568e-006 is not equal to expected" +puts "TODO ?OCC29910 Linux: Error: Tolerance = 6.0392296447644325e-07 is not equal to expected" +puts "TODO ?OCC29910 ALL: Error : is WRONG because number of VERTEX entities in shape \"result\" is 7" +puts "TODO ?OCC29910 ALL: Error : is WRONG because number of EDGE entities in shape \"result\" is 5" + +restore [locate_data_file bug29910_f1.brep] f1 +restore [locate_data_file bug29910_f2.brep] f2 + +regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} [bopcurves f1 f2 -2d] full Toler NbCurv + +checkreal Tolerance $Toler 1.0e-7 1.0e-7 0.0 + +if {$NbCurv != 4} { + puts "Error: Please check NbCurves for intersector" +} + +bsection result f1 f2 +checksection result -r 4 +checkshape result +checknbshapes result -edge 4 -vertex 6 +checkprops result -l 97.2011 + +if {[regexp "Faulties" [bopargcheck result]]} { + puts "Error: bopargcheck has found some faulties in result" +} + +smallview +don result +fit + +checkview -screenshot -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/moddata_2/bug333 b/tests/bugs/moddata_2/bug333 index 2917736ed4..d80400f170 100755 --- a/tests/bugs/moddata_2/bug333 +++ b/tests/bugs/moddata_2/bug333 @@ -1,37 +1,72 @@ puts "================" -puts "OCC333" +puts "OCC333: Superimposed curves during intersection two surfaces " puts "================" puts "" -####################################################### -## Superimposed curves during intersection two surfaces -####################################################### -pload QAcommands +set GoodNbCurv 14 -restore [locate_data_file OCC333a.draw] s12 -############### checkshape su12 # is not a topological shape -restore [locate_data_file OCC333b.draw] s11 -############### checkshape su11 # is not a topological shape -intersect result s12 s11 -explode result e -clknots result_3 -clknots result_13 +restore [locate_data_file OCC333a.draw] s1 +restore [locate_data_file OCC333b.draw] s2 -mkedge e_1 result_3 -mkedge e_2 result_13 +intersect result s1 s2 -set status [OCC333 e_1 e_2] -if {[llength ${status}] < 1} { - puts "OCC333 ERROR" -} else { - regexp {([-0-9.+eE]+)} ${status} full code - if { ${code} == 3 || ${code} == 2} { - puts "OCC333 OK : Intersection command works properly" - } else { - puts "Faulty OCC333 : Intersection was made WRONGLY" - } +set che [whatis result] +set ind [string first "3d curve" $che] +if {${ind} >= 0} { + #Only variable "result" exists + renamevar result result_1 } -donly i_3 i_13 +set ic 1 +set AllowRepeate 1 +while { $AllowRepeate != 0 } { + set che [whatis result_$ic] + set ind [string first "3d curve" $che] + if {${ind} < 0} { + set AllowRepeate 0 + } else { + display result_$ic + + bounds result_$ic U1 U2 + + dump U1 U2 + + if {[dval U2-U1] < 1.0e-9} { + puts "Error: Wrong curve's range!" + } + + xdistcs result_$ic s1 U1 U2 10 2.0e-7 + xdistcs result_$ic s2 U1 U2 10 2.0e-7 + + for { set ip [expr $ic-1] } { $ip > 0 } { incr ip -1 } { + mkedge e1 result_$ic + mkedge e2 result_$ip + + set coe [checkoverlapedges e1 e2 5.0e-5] + + puts "result_$ic <-> result_$ip: $coe" + if { [regexp "Edges is not overlaped" $coe] != 1 } { + puts "Error: result_$ic and result_$ip are overlaped" + } + } + + incr ic + } +} + +incr ic -1 + +if {$ic == $GoodNbCurv} { + puts "OK: Number of curves is good!" +} else { + puts "Error: $GoodNbCurv curves are expected but $ic ones are found!" +} + +smallview +don result* +fit +clear +don s1 s2 result* + +checkview -screenshot -2d -path ${imagedir}/${test_image}.png -checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/moddata_2/bug567 b/tests/bugs/moddata_2/bug567 deleted file mode 100755 index d6f396f2ea..0000000000 --- a/tests/bugs/moddata_2/bug567 +++ /dev/null @@ -1,62 +0,0 @@ -puts "TODO OCC12345 ALL: Faulty OCC565: function intersection works wrongly with trimmed Surfaces" -puts "TODO OCC12345 Linux: Faulty OCC565: function intersection works wrongly with infinite Surfaces" -puts "TODO OCC12345 MacOS: Faulty OCC565: function intersection works wrongly with infinite Surfaces" - -puts "========" -puts "OCC567" -puts "========" -puts "" -####################################### -## Can not intersect two Rectangular Trimmed Surfaces . -####################################### - -restore [locate_data_file OCC567a.draw] s1 -restore [locate_data_file OCC567b.draw] s2 - -if { [checkplatform -windows] } { - puts "OS = Windows NT" - set N_repeat 10 -} else { - puts "OS = Linux" - set N_repeat 11 -} - -if { [catch {intersect i s1 s2 } catch_result] } { - puts "Faulty OCC565: function intersection works wrongly with infinite Surfaces" -} else { - set j 1 - repeat ${N_repeat} { - set err [lindex [whatis i_$j] 5] - if { $err != "curve"} { - puts " Faulty OCC565: function intersection works wrongly with infinite Surfaces" - break - } else { - puts [format "%s ) OCC565 OK: function intersection works with infinite Surfaces" $j] - } - incr j} -} - -trim s1x s1 0 2*pi 0 2*pi/13 -trim s2x s2 0 2*pi 0 2*pi/13 - -if { [catch {intersect result s1x s2x } catch_result] } { - puts "Faulty OCC565 exception: function intersection works wrongly with trimmed Surfaces" -} else { - set nom 0 - set j 1 - repeat 11 { - set err [lindex [whatis result_$j] 5] - if { $err != "curve"} { - break - } else { - set nom [expr $nom + 1] - } - incr j - } - if { $nom == 0} { - puts "Faulty OCC565: function intersection works wrongly with trimmed Surfaces" - } else { - puts " OCC565 OK: function intersection works with trimmed Surfaces" - } -} - diff --git a/tests/bugs/moddata_2/bug567_1 b/tests/bugs/moddata_2/bug567_1 new file mode 100644 index 0000000000..223b72581c --- /dev/null +++ b/tests/bugs/moddata_2/bug567_1 @@ -0,0 +1,94 @@ +puts "========" +puts "OCC567: Can not intersect two Rectangular Trimmed Surfaces ." +puts "========" +puts "" + +# Different result between Debian 7 and Debian 8 and between MSVC 2010 and 2017. +puts "TODO ?OCC30012 Linux: Error: 10 curves are expected but 9 ones are found." +puts "TODO ?OCC30012 Linux: Error: 10 curves are expected but 8 ones are found." +puts "TODO ?OCC29910 Windows: Error: 10 curves are expected but 11 ones are found." +puts "TODO ?OCC29910 Windows: Error : is WRONG because number of EDGE entities in shape \"rs\" is 15" +puts "TODO ?OCC29910 Linux: Error : is WRONG because number of EDGE entities in shape \"rs\" is 8" +puts "TODO ?OCC29910 Windows: Error: 0 vertices are expected but 2 are found" + +set GoodNbCurves 10 + +foreach a [directory res*] {unset $a} + +restore [locate_data_file OCC567a.draw] s1 +restore [locate_data_file OCC567b.draw] s2 + +if { [catch {intersect res s1 s2 } catch_result] } { + puts "Faulty OCC567: function intersection works wrongly with infinite Surfaces" +} else { + set che [whatis res] + set ind [string first "3d curve" $che] + if {${ind} >= 0} { + #Only variable "res" exists + renamevar res res_1 + } + + bclearobjects + bcleartools + + set ic 1 + set AllowRepeat 1 + while { $AllowRepeat != 0 } { + set che [whatis res_$ic] + set ind [string first "3d curve" $che] + if {${ind} < 0} { + set AllowRepeat 0 + } else { + + bounds res_$ic U1 U2 + + if {[dval U2-U1] < 1.0e-9} { + puts "Error: Wrong curve's range!" + } + + xdistcs res_$ic s1 U1 U2 100 2.0e-7 + xdistcs res_$ic s2 U1 U2 100 2.0e-7 + + for { set ip [expr $ic-1] } { $ip > 0 } { incr ip -1 } { + mkedge e1 res_$ic + mkedge e2 res_$ip + + set coe [checkoverlapedges e1 e2 5.0e-5] + + puts "res_$ic <-> res_$ip: $coe" + if { [regexp "Edges is not overlaped" $coe] != 1 } { + puts "Error: res_$ic and res_$ip are overlaped" + } + } + + mkedge ee res_$ic + baddobjects ee + + incr ic + } + } + + incr ic -1 + + if {$ic != $GoodNbCurves} { + puts "Error: $GoodNbCurves curves are expected but $ic ones are found." + } + + if {$ic != 1} { + # Check of gaps between intersection curves + bfillds + bbuild rs + + checknbshapes rs -edge 14 + checksection rs -r 0 + } +} + +smallview +don res_* + +fit +don s1 s2 +disp res_* + +checkview -screenshot -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/moddata_2/bug567_2 b/tests/bugs/moddata_2/bug567_2 new file mode 100644 index 0000000000..21286d553b --- /dev/null +++ b/tests/bugs/moddata_2/bug567_2 @@ -0,0 +1,89 @@ +puts "========" +puts "OCC567: Can not intersect two Rectangular Trimmed Surfaces ." +puts "========" +puts "" + +set GoodNbCurves 1 + +restore [locate_data_file OCC567a.draw] s1 +restore [locate_data_file OCC567b.draw] s2 + +foreach a [directory res*] {unset $a} + +trim s1x s1 0 2*pi 0 2*pi/13 +trim s2x s2 0 2*pi 0 2*pi/13 + +if { [catch {intersect res s1x s2x } catch_result] } { + puts "Faulty OCC565 exception: function intersection works wrongly with trimmed Surfaces" +} else { + set che [whatis res] + set ind [string first "3d curve" $che] + if {${ind} >= 0} { + #Only variable "res" exists + renamevar res res_1 + } + + bclearobjects + bcleartools + + set ic 1 + set AllowRepeat 1 + while { $AllowRepeat != 0 } { + set che [whatis res_$ic] + set ind [string first "3d curve" $che] + if {${ind} < 0} { + set AllowRepeat 0 + } else { + + bounds res_$ic U1 U2 + + if {[dval U2-U1] < 1.0e-9} { + puts "Error: Wrong curve's range!" + } + + xdistcs res_$ic s1 U1 U2 100 2.0e-7 + xdistcs res_$ic s2 U1 U2 100 2.0e-7 + + for { set ip [expr $ic-1] } { $ip > 0 } { incr ip -1 } { + mkedge e1 res_$ic + mkedge e2 res_$ip + + set coe [checkoverlapedges e1 e2 5.0e-5] + + puts "res_$ic <-> res_$ip: $coe" + if { [regexp "Edges is not overlaped" $coe] != 1 } { + puts "Error: res_$ic and res_$ip are overlaped" + } + } + + mkedge ee res_$ic + baddobjects ee + + incr ic + } + } + + incr ic -1 + + if {$ic != $GoodNbCurves} { + puts "Error: $GoodNbCurves curves are expected but $ic ones are found." + } + + if {$ic != 1} { + # Check of gaps between intersection curves + bfillds + bbuild rs + + checknbshapes rs -edge 1 + checksection rs -r 2 + } +} + +smallview +don res_* + +fit +don s1 s2 +disp res_* + +checkview -screenshot -2d -path ${imagedir}/${test_image}.png