From 79981d14cc625b32b5718450bcf37cf7dfe1312e Mon Sep 17 00:00:00 2001 From: nbv Date: Tue, 12 Apr 2016 16:45:37 +0300 Subject: [PATCH] 0027124: Invalid curve on surface in the result of General Fuse operation Creation of test cases for issues #27124 and #27129. --- tests/bugs/modalg_6/bug27124 | 61 ++++++++++++++++++++++++++++++++++++ tests/bugs/modalg_6/bug27129 | 35 +++++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 tests/bugs/modalg_6/bug27124 create mode 100644 tests/bugs/modalg_6/bug27129 diff --git a/tests/bugs/modalg_6/bug27124 b/tests/bugs/modalg_6/bug27124 new file mode 100644 index 0000000000..dd1ac1ac1d --- /dev/null +++ b/tests/bugs/modalg_6/bug27124 @@ -0,0 +1,61 @@ +puts "============" +puts "OCC27124" +puts "============" +puts "" +############################### +## Invalid curve on surface in the result of General Fuse operation +############################### + +restore [locate_data_file bug27129_e.brep] e +restore [locate_data_file bug27129_p.brep] p +restore [locate_data_file bug27129_q.brep] q + +bclearobjects +bcleartools +baddobjects e +baddtools p q +bfillds +bbuild result +set log [bopargcheck result #f] + +set MessageList { +"Faulties for FIRST shape found : 1" +"Shapes are not suppotrted by BOP: NO" +"Self-Intersections : NO" +"Check for SI has been aborted : NO" +"Too small edges : NO" +"Bad faces : NO" +"Too close vertices : DISABLED" +"Too close edges : DISABLED" +"Shapes with Continuity C0 : NO" +"Invalid Curve on Surface : YES Cases\\(1\\) Total shapes\\(2\\)" +"Faulties for SECOND shape found : 0" +} + +for {set i 1} {$i <= 11} {incr i} { + set str [ lindex ${MessageList} [expr $i - 1] ] + if { [regexp ${str} ${log}] == 1 } { + puts "OK : There is #$i message" + } else { + puts "Error : There is not #$i message" + puts $str + } +} + +checkprops result -s 81576.6 + +set nbshapes_expected " +Number of shapes in shape + VERTEX : 18 + EDGE : 31 + WIRE : 16 + FACE : 16 + SHELL : 4 + SOLID : 4 + COMPSOLID : 0 + COMPOUND : 1 + SHAPE : 90 +" +checknbshapes result -ref ${nbshapes_expected} -t -m "solid construction" + +checkview -display result -2d -path ${imagedir}/${test_image}.png \ No newline at end of file diff --git a/tests/bugs/modalg_6/bug27129 b/tests/bugs/modalg_6/bug27129 new file mode 100644 index 0000000000..d571fcf84c --- /dev/null +++ b/tests/bugs/modalg_6/bug27129 @@ -0,0 +1,35 @@ +puts "============" +puts "OCC27129" +puts "============" +puts "" +############################### +## BRepLib_CheckCurveOnSurface does not find the maximal distance +############################### + +restore [locate_data_file bug27129_e.brep] e + +set log1 [checkcurveonsurf e] + +vertex v1 33.1645637744 33.5513655177474 0 +vertex v2 43.1644823619474 23.5514469302 0 +bclearobjects +bcleartools +baddobjects e +baddtools v1 v2 +bfillds + +bbuild result + +set log2 [checkcurveonsurf result] + +if { [regexp {Invalid curves on surface:\n} ${log1} full ]} { + puts "OK. Source shape has invalid curve on surface" +} else { + puts "Error. checkcurveonsurf command works wrong with source shape" +} + +if { [regexp {Invalid curves on surface:\n} ${log1} full ]} { + puts "OK. Result has invalid curve on surface" +} else { + puts "Error. checkcurveonsurf command works wrong with result" +} -- 2.20.1