mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-07-30 13:05:50 +03:00
0027124: Invalid curve on surface in the result of General Fuse operation
Creation of test cases for issues #27124 and #27129.
This commit is contained in:
parent
f0bf70e8cc
commit
79981d14cc
61
tests/bugs/modalg_6/bug27124
Normal file
61
tests/bugs/modalg_6/bug27124
Normal file
@ -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
|
35
tests/bugs/modalg_6/bug27129
Normal file
35
tests/bugs/modalg_6/bug27129
Normal file
@ -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"
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user