2 # General check of the result of geometrical intersection
3 help CheckIntersectionResult { surf1 surf2 ListOfCurves NbPoints TolerS1 TolerS2 }
4 proc CheckIntersectionResult {theSurf1 theSurf2 theListOfCurves theNbPoints theTolerS1 theTolerS2} {
8 foreach a $theListOfCurves {
9 puts "** Check of $a **"
13 if {[dval U2-U1] < 1.0e-9} {
14 puts "Error: Wrong range of $a"
17 xdistcs aCurve s1 U1 U2 $theNbPoints $theTolerS1
18 xdistcs aCurve s2 U1 U2 $theNbPoints $theTolerS2
22 # Check whether given list contain overlapped curves
23 help CheckOverlapIntCurves { theListOfCurves }
24 proc CheckOverlapIntCurves { theListOfCurves {theTolerance 1.0e-7} } {
25 set NbEdges [expr [llength $theListOfCurves] - 1 ]
26 for { set i1 0 } { $i1 < $NbEdges } { incr i1 } {
27 for { set i2 [expr $i1 + 1] } { $i2 <= $NbEdges } { incr i2 } {
28 upvar #0 [ lindex $theListOfCurves $i1 ] aCurve1
29 upvar #0 [ lindex $theListOfCurves $i2 ] aCurve2
34 set coe [ checkoverlapedges e1 e2 $theTolerance ]
36 if { [regexp "Edges are not overlapped" $coe] != 1 } {
37 set cIdx1 [ expr $i1 + 1 ]
38 set cIdx2 [ expr $i2 + 1 ]
40 puts "Error: Curves $cIdx1 and $cIdx2 are overlapped"