1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-05 18:16:23 +03:00

Update of tests database

Test for 0023171: Got wrong result after stitching
Test for 0023612: BRepPrimAPI_MakeTorus
Test for 0023610: checkshape command does not detect mismatch of the tolerance values among the sub-shapes of the shape
Test for 0023660: 'bsection' produces result with gap
Test for 0024397: BRepBuilderAPI_Copy works not correct
Test for 0023927: BRepProj_Projection produces Edge with one Vertex outside from curve
Test for 0023902: Cannot build fillet
Test for 0023669: Error in Boolean operations algorithm: section between cylindrical face and prism is incomplete
Test for 0023660: 'bsection' produces result with gap
Test for 0024100: Bad pcurve is built on a face while converting the shape from STEP format.
Test for 0024319: Sewing makes a solid transparent
Test for 0024302: Section operation modifies input argument
Test for 0024397: BRepBuilderAPI_Copy works not correct
Test for 0024418: Wrong section curves when intersecting analytical surfaces
This commit is contained in:
mkv 2017-10-26 11:59:25 +03:00 committed by bugmaster
parent a7378539f1
commit c2e47bdd8d
16 changed files with 347 additions and 0 deletions

View File

@ -0,0 +1,21 @@
puts "========"
puts "OCC24302"
puts "========"
puts ""
###########################################
# Section operation modifies input argument
###########################################
restore [locate_data_file bug24302_MyPlane.brep] p
restore [locate_data_file bug24302_SolidBefore.brep] b
regexp {Tolerance +MAX=([-0-9.+eE]+)} [tolerance b] full MaxTol_b_1
bnondestructive 1
bop p b
regexp {Tolerance +MAX=([-0-9.+eE]+)} [tolerance b] full MaxTol_b_2
set tol_abs_MaxTol 0.0001
set tol_rel_MaxTol 0.0001
checkreal "Section operation modifies input argument, Maxtolerance " ${MaxTol_b_2} ${MaxTol_b_1} ${tol_abs_MaxTol} ${tol_rel_MaxTol}

View File

@ -0,0 +1,13 @@
puts "============"
puts "OCC24397"
puts "============"
puts ""
#######################################
# BRepBuilderAPI_Copy works not correct
#######################################
restore [locate_data_file case_1_wire3.brep] result
tcopy result result1
checkprops result1 -equal result

View File

@ -0,0 +1,15 @@
puts "TODO OCC24397 ALL: Error : is WRONG because number of"
puts "============"
puts "OCC24397"
puts "============"
puts ""
#######################################
# BRepBuilderAPI_Copy works not correct
#######################################
restore [locate_data_file OCC485b.brep] b
tcopy b b1
checknbshapes b1 -ref [nbshapes b]

View File

@ -0,0 +1,15 @@
puts "TODO OCC24397 ALL: Error : is WRONG because number of"
puts "============"
puts "OCC24397"
puts "============"
puts ""
#######################################
# BRepBuilderAPI_Copy works not correct
#######################################
restore [locate_data_file bug22678_objCut.brep] b
tcopy b b1
checknbshapes b1 -ref [nbshapes b]

View File

@ -0,0 +1,16 @@
puts "========"
puts "OCC23171"
puts "========"
puts ""
##################################
# Got wrong result after stitching
##################################
restore [locate_data_file bug23171_stitch.brep] a
sewing r 0.000001 a
checkshape r
checknbshapes r -vertex 6 -edge 8
checkmaxtol r -min_tol 0.003

View File

@ -0,0 +1,18 @@
puts "========"
puts "OCC23171"
puts "========"
puts ""
##################################
# Got wrong result after stitching
##################################
catch {pload XDE}
igesread [locate_data_file bug23171_tube_surf.igs] s *
sewing r 0.1 s
checkshape r
checknbshapes r -vertex 4 -edge 6
checkmaxtol r -min_tol 0.2

View File

@ -0,0 +1,34 @@
puts "TODO OCC23610 ALL: should be less then or equal to the minimal tolerance value of its sub-shapes"
puts "========"
puts "OCC23610"
puts "========"
puts ""
########################################################################################################
## checkshape command does not detect mismatch of the tolerance values among the sub-shapes of the shape
########################################################################################################
restore [locate_data_file buc60462b.brep] b
foreach Face [explode b f] {
if {[checkshape $Face] == "This shape seems to be valid"} {
set ToleranceList [tolerance $Face]
regexp {FACE +: +MAX=([-0-9.+eE]+) +AVG=([-0-9.+eE]+) +MIN=([-0-9.+eE]+)} $ToleranceList full MaxTol_face AvgTol_face MinTol_face
regexp {EDGE +: +MAX=([-0-9.+eE]+) +AVG=([-0-9.+eE]+) +MIN=([-0-9.+eE]+)} $ToleranceList full MaxTol_edge AvgTol_edge MinTol_edge
regexp {VERTEX +: +MAX=([-0-9.+eE]+) +AVG=([-0-9.+eE]+) +MIN=([-0-9.+eE]+)} $ToleranceList full MaxTol_vertex AvgTol_vertex MinTol_vertex
if {${MaxTol_face} > ${MinTol_edge} || ${MaxTol_face} > ${MinTol_vertex}} {
puts "Error: the tolerance value of the FACE $Face should be less then or equal to the minimal tolerance value of its sub-shapes(EDGES and VERTICES)"
}
}
}
foreach Edge [explode b e] {
if {[checkshape $Edge] == "This shape seems to be valid"} {
set ToleranceList [tolerance $Edge]
regexp {EDGE +: +MAX=([-0-9.+eE]+) +AVG=([-0-9.+eE]+) +MIN=([-0-9.+eE]+)} $ToleranceList full MaxTol_edge AvgTol_edge MinTol_edge
regexp {VERTEX +: +MAX=([-0-9.+eE]+) +AVG=([-0-9.+eE]+) +MIN=([-0-9.+eE]+)} $ToleranceList full MaxTol_vertex AvgTol_vertex MinTol_vertex
if {${MaxTol_edge} > ${MinTol_vertex}} {
puts "Error: the tolerance value of the EDGE $Edge should be less then or equal to the minimal tolerance value of its sub-shapes(VERTICES)"
}
}
}

View File

@ -0,0 +1,15 @@
puts "TODO OCC23612 ALL: Faulty shapes in variables faulty_1"
puts "========"
puts "OCC23612"
puts "========"
puts ""
#######################
# BRepPrimAPI_MakeTorus
#######################
ptorus p 10 2 90 270 45
checkshape p
checkview -display p -2d -path ${imagedir}/${test_image}.png

View File

@ -0,0 +1,22 @@
puts "TODO OCC23660 ALL: Error: tolerance"
puts "========"
puts "OCC23660"
puts "========"
puts ""
#####################################
# 'bsection' produces result with gap
#####################################
restore [locate_data_file bug23660_shell_537.brep] s
restore [locate_data_file bug23660_face_537.brep] f
bsection r s f -a
explode r
smallview
donly r_9 r_10
fit
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
checkmaxtol r -min_tol 0.001

View File

@ -0,0 +1,21 @@
puts "TODO OCC23669 ALL: Error : bopsection is WRONG"
puts "========"
puts "OCC23669"
puts "========"
puts ""
#################################################################################################
# Error in Boolean operations algorithm: section between cylindrical face and prism is incomplete
#################################################################################################
restore [locate_data_file bug23669_theFace.brep] ff
restore [locate_data_file bug23669_Prism.brep] pr
bop ff pr
bopsection res
checknbshapes res -edge 2 -m "bopsection"
bopcheck res
checkview -display res -with {ff} -2d -path ${imagedir}/${test_image}.png

View File

@ -0,0 +1,33 @@
puts "TODO OCC23902 ALL: Error: Cannot build fillet"
puts "========"
puts "OCC23902"
puts "========"
puts ""
#####################
# Cannot build fillet
#####################
bsplinecurve r 4 3 1 5 2 2 3 5 0 8 0 1 2 8 2 1 4 8 3 1 4 8 3 1 4 8 3 1 6 8 4 1 10 8 10 1
mkedge e1 r
vertex v1 10 8 10
vertex v2 5 8 8
edge e2 v1 v2
vertex v3 0 8 0
edge e3 v2 v3
wire w e1 e2 e3
mkplane f w
prism p f 0 5 0
explode p e
if {![catch {fillet result p 0.5 p_3}]} {
if {[regexp "This shape seems to be valid" [checkshape result] ] != 1} {
puts "Error: Cannot build fillet (1)"
}
if {[regexp "This shape seems to be OK" [bopcheck result] ] != 1} {
puts "Error: Cannot build fillet (2)"
}
} else {
puts "Error: Cannot build fillet (3)"
}

View File

@ -0,0 +1,31 @@
puts "========"
puts "OCC23927"
puts "========"
puts ""
######################################################################
# BRepProj_Projection produces Edge with one Vertex outside from curve
######################################################################
restore [locate_data_file bug23927_line.brep] line
restore [locate_data_file bug23927_surf.brep] surf
breducetolerance surf
prj p line surf 0.57735025882720947 -0.57735025882720947 0.57735025882720947
explode p_1 V
smallview
fit
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
explode line V
set tol_abs 0.001
set tol_rel 0
distmini d p_1_1 line_1
checkreal "Projection, p1" [dval d_val] 0 $tol_abs $tol_rel
distmini d p_1_2 line_2
checkreal "Projection, p2" [dval d_val] 0 $tol_abs $tol_rel

View File

@ -0,0 +1,21 @@
puts "========"
puts "OCC24319"
puts "========"
puts ""
##################################
# Sewing makes a solid transparent
##################################
catch {pload XDE}
igesread [locate_data_file bug24421_Rohteil_Pmod.igs] s *
sewing r s
checkview -display r -3d -path ${imagedir}/${test_image}.png
set x 370
set y 270
if { [checkcolor $x $y 0.78039216995239258 0.55294120311737061 0.094117648899555206] != 1 } {
puts "Error: Sewing makes a solid transparent"
}

25
tests/bugs/modalg_7/bug24418_1 Executable file
View File

@ -0,0 +1,25 @@
puts "TODO OCC24418 ALL: Error : T="
puts "========"
puts "OCC24418"
puts "========"
puts ""
############################################################
# Wrong section curves when intersecting analytical surfaces
############################################################
restore [locate_data_file OCC20964_revsolid.brep] b1
restore [locate_data_file OCC20964_sphere.brep] b2
explode b1 f; copy b1_7 b1
explode b2 f; copy b2_1 b2
mksurface s1 b1
mksurface s2 b2
trimv s1t s1 0 230.14184397163115
intersect ii s1t s2
bounds ii_2 u1 u2
xdistcs ii_2 s1 u1 u2 10 2.0e-7
xdistcs ii_2 s2 u1 u2 10 2.0e-7

26
tests/bugs/modalg_7/bug24418_2 Executable file
View File

@ -0,0 +1,26 @@
puts "TODO OCC24418 ALL: Error : T="
puts "========"
puts "OCC24418"
puts "========"
puts ""
############################################################
# Wrong section curves when intersecting analytical surfaces
############################################################
ptorus b1 25 24 90
plane p 20 20 10 0 0 1
pcone b2 p 10 8 40
explode b1 f; copy b1_1 b1
explode b2 f; copy b2_1 b2
mksurface s1 b1
mksurface s2 b2
trimu s1t s1 0 1.5707963267948966
trimv s2t s2 0 40.049968789001575
intersect ii s1t s2t
bounds ii_1 u1 u2
xdistcs ii_1 s1 u1 u2 10 2.0e-7
xdistcs ii_1 s2 u1 u2 10 2.0e-7

21
tests/bugs/step/bug24100 Normal file
View File

@ -0,0 +1,21 @@
puts "TODO OCC24100 ALL: Error : Bad pcurve is built on a face while converting the shape from STEP format"
puts "========"
puts "OCC24100"
puts "========"
puts ""
############################################################################
# Bad pcurve is built on a face while converting the shape from STEP format.
############################################################################
stepread [locate_data_file bug24100_REFLECT_CURVE_PART_5_SOL_ohne_Metadaten.stp] a *
explode a_1 f
pcurve a_1_686
set inter2 [2dintersect a_1_686_4 a_1_686_3]
set int2 [regexp {Intersection point 2} ${inter2}]
if { ${int2} == 1 } {
puts "Error : Bad pcurve is built on a face while converting the shape from STEP format"
}