1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

Prepared branch for raising to master

This commit is contained in:
apn 2012-12-24 17:16:41 +04:00
parent 4fe5661921
commit e54706ed46
51 changed files with 1778 additions and 185 deletions

View File

@ -14,6 +14,7 @@ Label $docName 0:2
SetComment $docName 0:2 $str1
file delete ${imagedir}/${docName}.xml
file delete ${imagedir}/${newDocName}.xml
if [ catch {SaveAs $docName ${imagedir}/${docName}.xml} ] {
puts "Error : (SaveAs)"
@ -21,7 +22,7 @@ if [ catch {SaveAs $docName ${imagedir}/${docName}.xml} ] {
puts "OK : (SaveAs)"
}
exec cp ${imagedir}/${docName}.xml ${imagedir}/${newDocName}.xml
file copy ${imagedir}/${docName}.xml ${imagedir}/${newDocName}.xml
Open ${imagedir}/${newDocName}.xml $newDocName

View File

@ -11,7 +11,8 @@ NewDocument D MDTV-Standard
catch { SaveAs D ${imagedir}/OCC381.std }
if { [catch { OCC381_Save D } ] } {
puts "OCC381: Error"
puts "OCC381: Error"
} else {
catch { exec chmod 777 ${imagedir}/OCC381.std }
file delete ${imagedir}/OCC381.std
}

View File

@ -11,6 +11,7 @@ NewDocument D MDTV-Standard
if { [catch { OCC381_SaveAs D ${imagedir}/OCC381.std}] } {
puts "OCC381: Error"
} else {
catch {exec chmod 777 ${imagedir}/OCC381.std}
file delete ${imagedir}/OCC381.std
}

View File

@ -1,11 +1,13 @@
if { [array get env os_type] != "" } {
set os $env(os_type)
}
if { [string compare $os "windows"] != 0 } {
puts "TODO OCC12345 ALL: An exception was caught"
puts "TODO OCC12345 ALL: \\*\\* Exception \\*\\*.*"
puts "TODO OCC12345 ALL: TEST INCOMPLETE"
}
### by apn on IR-2012-12-21
##if { [array get env os_type] != "" } {
## set os $env(os_type)
##}
##if { [string compare $os "windows"] != 0 } {
## puts "TODO OCC12345 ALL: An exception was caught"
## puts "TODO OCC12345 ALL: \\*\\* Exception \\*\\*.*"
## puts "TODO OCC12345 ALL: TEST INCOMPLETE"
##}
puts "========================"
puts "BUC60823"
puts "========================"

View File

@ -42,7 +42,8 @@ if { $tri_after <= 0 || $nod_after <= 0 } {
puts "Error : Face is not shaded (number of nodes or triangles is wrong)"
}
set CR22888_draw 1
set only_screen 1

30
tests/bugs/iges/bug448 Executable file
View File

@ -0,0 +1,30 @@
puts "TODO OCC12345 ALL: Faulty OCC448: shape number is wrong"
puts "========"
puts " OCC448 "
puts "========"
puts ""
############################################
## wrong translation IGES file in "Only visible" mode
############################################
if [catch { set list [igesbrep [locate_data_file Amino_172448-65210.igs] a * ] } res] {
puts "Faulty OCC448: here is reading problem"
} else {
tpcompound result
set length [llength $list]
set NbShapes [lindex $list [expr $length - 1]]
#
# ATANTION!!!!!!! FOR TESTING !!!!!!!
#
set GoodNbShapes 1
if { $NbShapes != $GoodNbShapes } {
puts "NbShapes=$NbShapes"
puts "GoodNbShapes=$GoodNbShapes"
puts "Faulty OCC448: shape number is wrong"
}
}
set 2dviewer 0

32
tests/bugs/iges/bug5027_1 Executable file
View File

@ -0,0 +1,32 @@
puts "============"
puts "OCC5027"
puts "============"
puts ""
######################################################
# Incorrect result translating wire with loops from STEP
######################################################
set BugNumber OCC5027
if [catch { igesread [locate_data_file OCC5027.igs] a * } res] {
puts "Warning ${BugNumber} : here is reading problem"
} else {
tpcompound result
set nb_info [nbshapes result]
set check_square 1
set square 159588
set nb_v_good 140
set nb_e_good 144
set nb_w_good 36
set nb_f_good 31
set nb_sh_good 0
set nb_sol_good 0
set nb_compsol_good 0
set nb_compound_good 1
set nb_shape_good 352
set 2dviewer 0
}

View File

@ -1,9 +1,120 @@
if { [info exists CR22888_draw] } {
#vinit
#vclear
#vdisplay result
#vsetdispmode 1
#vfit
vdump $imagedir/${test_image}.png
if { [info exist check_square] } {
if { [info exists square] } {
set prop "square"
set mass $square
regexp {Mass +: +([-0-9.+eE]+)} [sprops result] full m
}
if { [info exists volume] } {
set prop "volume"
set mass $volume
regexp {Mass +: +([-0-9.+eE]+)} [vprops result] full m
}
if { [info exists length] } {
set prop "length"
set mass $length
regexp {Mass +: +([-0-9.+eE]+)} [lprops result] full m
puts "checksection"
puts [checksection result]
}
#if mass (length or square) is empty in test case then result should be an empty shape.
if { [string compare "$mass" "empty"] != 0 } {
if { $m == 0 } {
puts "Error : The command is not valid. The $prop is 0."
}
if { $mass > 0 } {
puts "The expected $prop is $mass"
}
#check of change of square is < 1%
if { ($mass != 0 && [expr 1.*abs($mass - $m)/$mass] > 0.01) || ($mass == 0 && $m != 0) } {
puts "Error : The $prop of result shape is $m"
}
} else {
if { $m != 0 } {
puts "Error : The command is not valid. The $prop is $m"
}
}
}
if { [info exists nb_v_good] } {
regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full nb_v
if { ${nb_v} != ${nb_v_good} } {
puts "Error : Result shape is WRONG because it must contains ${nb_v_good} vertexes instead of ${nb_v}"
} else {
puts "Result shape contains ${nb_v} vertexes"
}
}
if { [info exists nb_e_good] } {
regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full nb_e
if { ${nb_e} != ${nb_e_good} } {
puts "Error : Result shape is WRONG because it must contains ${nb_e_good} edges instead of ${nb_e}"
} else {
puts "Result shape contains ${nb_e} edges"
}
}
if { [info exists nb_w_good] } {
regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full nb_w
if { ${nb_w} != ${nb_w_good} } {
puts "Error : Result shape is WRONG because it must contains ${nb_w_good} wires instead of ${nb_w}"
} else {
puts "Result shape contains ${nb_w} wires"
}
}
if { [info exists nb_f_good] } {
regexp {FACE +: +([-0-9.+eE]+)} $nb_info full nb_f
if { ${nb_f} != ${nb_f_good} } {
puts "Error : Result shape is WRONG because it must contains ${nb_f_good} faces instead of ${nb_f}"
} else {
puts "Result shape contains ${nb_f} faces"
}
}
if { [info exists nb_sh_good] } {
regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full nb_sh
if { ${nb_sh} != ${nb_sh_good} } {
puts "Error : Result shape is WRONG because it must contains ${nb_sh_good} shells instead of ${nb_sh}"
} else {
puts "Result shape contains ${nb_sh} shells"
}
}
if { [info exists nb_sol_good] } {
regexp {SOLID +: +([-0-9.+eE]+)} $nb_info full nb_sol
if { ${nb_sol} != ${nb_sol_good} } {
puts "Error : Result shape is WRONG because it must contains ${nb_sol_good} solids instead of ${nb_sol}"
} else {
puts "Result shape contains ${nb_sol} solids"
}
}
if { [info exists nb_compsol_good] } {
regexp {COMPSOLID +: +([-0-9.+eE]+)} $nb_info full nb_compsol
if { ${nb_compsol} != ${nb_compsol_good} } {
puts "Error : Result shape is WRONG because it must contains ${nb_compsol_good} compsolids instead of ${nb_compsol}"
} else {
puts "Result shape contains ${nb_compsol} compsolids"
}
}
if { [info exists nb_compound_good] } {
regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full nb_compound
if { ${nb_compound} != ${nb_compound_good} } {
puts "Error : Result shape is WRONG because it must contains ${nb_compound_good} compounds instead of ${nb_compound}"
} else {
puts "Result shape contains ${nb_compound} compounds"
}
}
if { [info exists nb_shape_good] } {
regexp {SHAPE +: +([-0-9.+eE]+)} $nb_info full nb_shape
if { ${nb_shape} != ${nb_shape_good} } {
puts "Error : Result shape is WRONG because it must contains ${nb_shape_good} shapes instead of ${nb_shape}"
} else {
puts "Result shape contains ${nb_shape} shapes"
}
}

View File

@ -1,27 +0,0 @@
puts "TODO OCC12345 ALL: Tcl Exception: Error: file BUC60826b.brep could not be found"
puts "TODO OCC12345 ALL: TEST INCOMPLETE"
puts "========================"
puts "BUC60826"
puts "========================"
#restore Model2-a.brep a
restore [locate_data_file BUC60826a.brep] a
checkshape a
# restore Model2-b.brep b
restore [locate_data_file BUC60826b.brep] b
checkshape b
bsection result a b
regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full num
if { $num != 0 } {
puts " Faulty BUC60826 : Result shape is Unclosed !!! "
} else {
puts "BUC60826 OK: Result shape is CORRECT !!! "
}
set length 0
set 2dviewer 0

View File

@ -1,52 +0,0 @@
puts "TODO OCC12345 ALL: Tcl Exception: Error: file BUC60827d.brep could not be found"
puts "TODO OCC12345 ALL: TEST INCOMPLETE"
puts "========================"
puts "BUC60827"
puts "========================"
#restore Model3-a.brep a
restore [locate_data_file BUC60827c.brep] a
#restore Model3-b.brep b
restore [locate_data_file BUC60827d.brep] b
set che [checkshape a]
if { [regexp {Faulty} $che ] == 1 } {
puts "Faulty BUC60827 (shape 1): Source shape is invalid. It was detected by Checkshape command"
puts "Body of the script was NOT executed"
renamevar a result
} else {
puts "BUC60827 OK (shape 1): Source shape is valid"
set che [checkshape b]
if { [regexp {Faulty} $che ] == 1 } {
puts "Faulty BUC60827 (shape 2): Source shape is invalid. It was detected by Checkshape command"
puts "Body of the script was NOT executed"
renamevar b result
} else {
puts "BUC60827 OK (shape 2): Source shape is valid"
bsection result a b
set rlen 0
set rlen [llength [explode res v]]
if ([expr $rlen == 0]) {
puts "Faulty :The result of section is an empty compound."
} else {
distmini d1 res_1 a_1
regexp {([-0-9.+eE]+)$} [dump d1_val] full len1
if ([expr $len1 > 1e-7]) {
puts "Faulty :The section is incomplite."
} else {
distmini d2 res_2 a_2
regexp {([-0-9.+eE]+)$} [dump d2_val] full len2
if ([expr $len2 > 1e-7]) {
puts "Faulty :The section is incomplite."
}
}
}
}
}
set length 0
set 2dviewer 0

View File

@ -1,49 +0,0 @@
puts "TODO OCC12345 ALL: Tcl Exception: Error: file BUC60853_plane.brep could not be found"
puts "TODO OCC12345 ALL: TEST INCOMPLETE"
puts "========"
puts "BUC60853"
puts "========"
puts ""
###############################################################################
##The exception Standard_NumericError is generated in the function TopOpeBRepTool_CurveTool::MakeCurves().
## The error occurs only when approximate mode is switched on. The command in draw is :
## > section res err_face.brep err_plane.brep -a
###############################################################################
restore [locate_data_file BUC60853_face.brep] face
restore [locate_data_file BUC60853_plane.brep] plane
checkshape face
checkshape plane
bsection result face plane -a
# set text [nbshapes res]
# set ver [lindex $text 7]
# set edg [lindex $text 10]
# set com [lindex $text 28]
set nb_info [nbshapes result]
regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ver
regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full edg
# if { $com != 0} {
# puts " Faulty BUC60853: Result shape is COMPOUND, but it must be edge "
# set make_photo 0
# } else {
if { $edg != 1} {
puts " Faulty BUC60853: Result shape contains more than one edge "
explode res v
} else {
if { $ver < 2} {
puts " Faulty BUC60853: Result edge contains less than two vertexes."
explode res v
} else {
puts " BUC60853 OK: Result of section operation is correct "
explode res v
}
}
#}
set length 0
set 2dviewer 0

View File

@ -1,32 +0,0 @@
puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
puts "TODO OCC12345 ALL: Tcl Exception: Error: file OCC104-2.brep could not be found"
puts "TODO OCC12345 ALL: TEST INCOMPLETE"
puts "================"
puts "BUC61007"
puts "OCC104"
puts "================"
puts ""
################################################################
## These shapes are valid and seems that they have one size, but they volumes of the shapes are
## quite different. This looks like a regression in comparing to C31.
################################################################
cpulimit 3000
restore [locate_data_file OCC104-1.brep] sh1
checkshape sh1
regexp {Mass +: +([-0-9.+eE]+)} [vprops result] full l1
restore [locate_data_file OCC104-2.brep] sh2
checkshape sh2
regexp {Mass +: +([-0-9.+eE]+)} [vprops result] full l2
set diff [expr abs([expr $l2 - $l1])]
if { $diff > 0.001} {
puts "Error : volume of OCC104-1.brep and OCC104-2.brep differ on the value $diff while the shape almost coinsident"
} else {
puts "Volumes of OCC104-1.brep and OCC104-2.brep are right calculated (almost coinsident)"
}

33
tests/bugs/step/bug3397 Executable file
View File

@ -0,0 +1,33 @@
puts "============"
puts "OCC3397"
puts "============"
puts ""
######################################################
# Incorrect work of ShapeFix_ComposeShell
######################################################
set BugNumber OCC3397
#mkv-04.09.06
param read.step.shape.relationship OFF
if [catch { stepread [locate_data_file trj12_b3-tu-203.stp] a * } res] {
puts "Faulty ${BugNumber} : here is reading problem"
} else {
tpcompound result
set nb_info [nbshapes result]
set check_square 1
set square 1.48021e+06
set nb_v_good 1228
set nb_e_good 1938
set nb_w_good 762
set nb_f_good 696
set nb_sh_good 1
set nb_sol_good 1
set nb_compsol_good 0
set nb_compound_good 1
set nb_shape_good 4627
}
set 2dviewer 0

30
tests/bugs/step/bug5027_2 Executable file
View File

@ -0,0 +1,30 @@
puts "============"
puts "OCC5027"
puts "============"
puts ""
######################################################
# Incorrect result translating wire with loops from STEP
######################################################
set BugNumber OCC5027
if [catch { stepread [locate_data_file OCC5027.stp] a * } res] {
puts "Warning ${BugNumber} : here is reading problem"
} else {
tpcompound result
set nb_info [nbshapes result]
set check_square 1
set square 159588
set nb_v_good 44
set nb_e_good 72
set nb_w_good 36
set nb_f_good 31
set nb_sh_good 1
set nb_sol_good 1
set nb_compsol_good 0
set nb_compound_good 1
set nb_shape_good 186
}
set 2dviewer 0

16
tests/bugs/step/bug8229 Executable file
View File

@ -0,0 +1,16 @@
puts "============"
puts "OCC8229"
puts "============"
puts ""
#######################################################################
# Exeption is raised during the ReadStep in DRAW on the attached shape
#######################################################################
set BugNumber OCC8229
if [catch { stepread [locate_data_file OCC8229.stp] a * } res] {
puts "Faulty ${BugNumber}"
} else {
puts "OK ${BugNumber}"
}

120
tests/bugs/step/end Executable file
View File

@ -0,0 +1,120 @@
if { [info exist check_square] } {
if { [info exists square] } {
set prop "square"
set mass $square
regexp {Mass +: +([-0-9.+eE]+)} [sprops result] full m
}
if { [info exists volume] } {
set prop "volume"
set mass $volume
regexp {Mass +: +([-0-9.+eE]+)} [vprops result] full m
}
if { [info exists length] } {
set prop "length"
set mass $length
regexp {Mass +: +([-0-9.+eE]+)} [lprops result] full m
puts "checksection"
puts [checksection result]
}
#if mass (length or square) is empty in test case then result should be an empty shape.
if { [string compare "$mass" "empty"] != 0 } {
if { $m == 0 } {
puts "Error : The command is not valid. The $prop is 0."
}
if { $mass > 0 } {
puts "The expected $prop is $mass"
}
#check of change of square is < 1%
if { ($mass != 0 && [expr 1.*abs($mass - $m)/$mass] > 0.01) || ($mass == 0 && $m != 0) } {
puts "Error : The $prop of result shape is $m"
}
} else {
if { $m != 0 } {
puts "Error : The command is not valid. The $prop is $m"
}
}
}
if { [info exists nb_v_good] } {
regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full nb_v
if { ${nb_v} != ${nb_v_good} } {
puts "Error : Result shape is WRONG because it must contains ${nb_v_good} vertexes instead of ${nb_v}"
} else {
puts "Result shape contains ${nb_v} vertexes"
}
}
if { [info exists nb_e_good] } {
regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full nb_e
if { ${nb_e} != ${nb_e_good} } {
puts "Error : Result shape is WRONG because it must contains ${nb_e_good} edges instead of ${nb_e}"
} else {
puts "Result shape contains ${nb_e} edges"
}
}
if { [info exists nb_w_good] } {
regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full nb_w
if { ${nb_w} != ${nb_w_good} } {
puts "Error : Result shape is WRONG because it must contains ${nb_w_good} wires instead of ${nb_w}"
} else {
puts "Result shape contains ${nb_w} wires"
}
}
if { [info exists nb_f_good] } {
regexp {FACE +: +([-0-9.+eE]+)} $nb_info full nb_f
if { ${nb_f} != ${nb_f_good} } {
puts "Error : Result shape is WRONG because it must contains ${nb_f_good} faces instead of ${nb_f}"
} else {
puts "Result shape contains ${nb_f} faces"
}
}
if { [info exists nb_sh_good] } {
regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full nb_sh
if { ${nb_sh} != ${nb_sh_good} } {
puts "Error : Result shape is WRONG because it must contains ${nb_sh_good} shells instead of ${nb_sh}"
} else {
puts "Result shape contains ${nb_sh} shells"
}
}
if { [info exists nb_sol_good] } {
regexp {SOLID +: +([-0-9.+eE]+)} $nb_info full nb_sol
if { ${nb_sol} != ${nb_sol_good} } {
puts "Error : Result shape is WRONG because it must contains ${nb_sol_good} solids instead of ${nb_sol}"
} else {
puts "Result shape contains ${nb_sol} solids"
}
}
if { [info exists nb_compsol_good] } {
regexp {COMPSOLID +: +([-0-9.+eE]+)} $nb_info full nb_compsol
if { ${nb_compsol} != ${nb_compsol_good} } {
puts "Error : Result shape is WRONG because it must contains ${nb_compsol_good} compsolids instead of ${nb_compsol}"
} else {
puts "Result shape contains ${nb_compsol} compsolids"
}
}
if { [info exists nb_compound_good] } {
regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full nb_compound
if { ${nb_compound} != ${nb_compound_good} } {
puts "Error : Result shape is WRONG because it must contains ${nb_compound_good} compounds instead of ${nb_compound}"
} else {
puts "Result shape contains ${nb_compound} compounds"
}
}
if { [info exists nb_shape_good] } {
regexp {SHAPE +: +([-0-9.+eE]+)} $nb_info full nb_shape
if { ${nb_shape} != ${nb_shape_good} } {
puts "Error : Result shape is WRONG because it must contains ${nb_shape_good} shapes instead of ${nb_shape}"
} else {
puts "Result shape contains ${nb_shape} shapes"
}
}

47
tests/bugs/vis/bug10702 Executable file
View File

@ -0,0 +1,47 @@
puts "TODO OCC12345 ALL: An exception was caught"
puts "TODO OCC12345 ALL: \\*\\* Exception \\*\\*.*"
puts "TODO OCC12345 ALL: TEST INCOMPLETE"
puts "============"
puts "OCC10702"
puts "============"
puts ""
#######################################################################
# MeshVS_NodalColorPrsBuilder does not take into account visibility of mesh elements
#######################################################################
set BugNumber OCC10702
pload XDE
meshfromstl m [locate_data_file OMF6391_box.stl]
set x_coord 180
set y_coord 260
meshdispmode m 2
puts "\nMesh displayed in shading mode"
QAUpdateLights
checkcolor $x_coord $y_coord 0 0 0.36
meshselmode m 8
puts "\nSelection of elements is activated"
QAShiftSelect $x_coord $y_coord
###QAShiftSelect $x_coord $y_coord
meshhidesel m
puts "\nSelected elemement is hidden"
QAUpdateLights
checkcolor $x_coord $y_coord 0 0 0.36
nodalcolor_id m
puts "\nDisplay nodal color presentation"
QAUpdateLights
checkcolor $x_coord $y_coord 0.46 0.12 0.37
set only_screen 1

30
tests/bugs/vis/bug10781 Executable file
View File

@ -0,0 +1,30 @@
puts "============"
puts "OCC10781"
puts "============"
puts ""
#######################################################################
# MeshVS is not sensitive to width of edges
#######################################################################
set BugNumber OCC10781
pload XDE
meshfromstl m [locate_data_file OMF6391_box.stl]
set x_coord 210
set y_coord 280
QAMoveTo $x_coord $y_coord
QAMoveTo $x_coord $y_coord
QAUpdateLights
checkcolor $x_coord $y_coord 0 0 0
mesh_edge_width m 20
puts "\nSet big mesh edge width"
QAUpdateLights
checkcolor $x_coord $y_coord 1 1 1
set only_screen 1

37
tests/bugs/vis/bug11095 Executable file
View File

@ -0,0 +1,37 @@
puts "============"
puts "OCC11095"
puts "============"
puts ""
#######################################################################
# MeshVS: Borders of faces are not visible in shrink mode
#######################################################################
set BugNumber OCC11095
pload XDE
meshfromstl m [locate_data_file OMF6391_box.stl]
set x_coord 157
set y_coord 280
set RED_R1 0
set GREEN_R1 0
set BLUE_R1 0
QAMoveTo $x_coord $y_coord
QAMoveTo $x_coord $y_coord
meshdispmode m 3
puts "\nSet shrinked display mode\n"
set x_coord 137
set y_coord 277
checkcolor $x_coord $y_coord 0 0 0
if { ${stat} != 1 } {
puts "Error : Borders of faces are not visible in shrink mode"
}
set only_screen 1

46
tests/bugs/vis/bug11615 Executable file
View File

@ -0,0 +1,46 @@
puts "============"
puts "OCC11615"
puts "============"
puts ""
######################################################
# Anisotropic scaling in 3D view
######################################################
set BugNumber OCC11615
box b 10 10 10
vinit
vdisplay b
vfit
vscale 1 1 1
QAUpdateLights
set x1 [list 165 340 70]
set y1 [list 384 283 79]
QAUpdateLights
puts ""
for {set i 0} {$i < 3} {incr i} {
set x_coord [lindex ${x1} $i]
set y_coord [lindex ${y1} $i]
checkcolor $x_coord $y_coord 1 1 0
}
vscale 0.5 1.5 0.7
vfit
QAUpdateLights
set x2 [list 80 390 25]
set y2 [list 390 218 167]
QAUpdateLights
puts ""
for {set i 0} {$i < 3} {incr i} {
set x_coord [lindex ${x2} $i]
set y_coord [lindex ${y2} $i]
checkcolor $x_coord $y_coord 1 1 0
}
set only_screen 1

44
tests/bugs/vis/bug137_1 Executable file
View File

@ -0,0 +1,44 @@
puts "========================"
puts "OCC137"
puts "========================"
###############################################################
#Patch description:
#
#MIT010717 : 3D selection management
#>>> MIT010717 : Selection management
#
# * Package OpenGl (OpenGl_execstruct.c)
#
# @ Avoid drawing quality problem on selected face,
# enable/disable Z offset on highlighted faces.
#
#>>> MIT010717 : drawing management
#
# * Package OpenGl (OpenGl_indexpolygon.c, ...)
#
# @ Avoid to undraw faces with confused points
###############################################################
puts "========================"
vinit
box b 10 10 10
vdisplay b
vfit
vsetdispmode 1
puts "Whole shape should be highlighted."
OCC137 1
set x_coord 105
set y_coord 100
QAMoveTo $x_coord $y_coord
QAMoveTo $x_coord $y_coord
QAUpdateLights
checkcolor $x_coord $y_coord 0 1 1
set only_screen 1

50
tests/bugs/vis/bug137_2 Executable file
View File

@ -0,0 +1,50 @@
puts "========================"
puts "OCC137"
puts "========================"
###############################################################
#Patch description:
#
#MIT010717 : 3D selection management
#>>> MIT010717 : Selection management
#
# * Package OpenGl (OpenGl_execstruct.c)
#
# @ Avoid drawing quality problem on selected face,
# enable/disable Z offset on highlighted faces.
#
#>>> MIT010717 : drawing management
#
# * Package OpenGl (OpenGl_indexpolygon.c, ...)
#
# @ Avoid to undraw faces with confused points
###############################################################
puts "========================"
vinit
box b 10 10 10
vdisplay b
vfit
vsetdispmode 1
puts "Only top face should be highlighted."
vselmode 4 1
OCC137 1
set x_coord 105
set y_coord 100
QAMoveTo $x_coord $y_coord
QAMoveTo $x_coord $y_coord
QAUpdateLights
checkcolor $x_coord $y_coord 0 1 1
set x_coord 105
set y_coord 340
checkcolor $x_coord $y_coord 0.78 0.54 0.09
set only_screen 1

49
tests/bugs/vis/bug137_3 Executable file
View File

@ -0,0 +1,49 @@
puts "========================"
puts "OCC137"
puts "========================"
###############################################################
#Patch description:
#
#MIT010717 : 3D selection management
#>>> MIT010717 : Selection management
#
# * Package OpenGl (OpenGl_execstruct.c)
#
# @ Avoid drawing quality problem on selected face,
# enable/disable Z offset on highlighted faces.
#
#>>> MIT010717 : drawing management
#
# * Package OpenGl (OpenGl_indexpolygon.c, ...)
#
# @ Avoid to undraw faces with confused points
###############################################################
puts "========================"
vinit
box b 10 10 10
vdisplay b
vfit
vsetdispmode 1
puts "Only top face should be highlighted."
OCC137 1
vselmode 4 1
set x_coord 105
set y_coord 100
QAMoveTo $x_coord $y_coord
QAMoveTo $x_coord $y_coord
QAUpdateLights
checkcolor $x_coord $y_coord 0 1 1
set x_coord 105
set y_coord 340
checkcolor $x_coord $y_coord 0.78 0.54 0.09
set only_screen 1

54
tests/bugs/vis/bug137_4 Executable file
View File

@ -0,0 +1,54 @@
puts "========================"
puts "OCC137"
puts "========================"
###############################################################
#Patch description:
#
#MIT010717 : 3D selection management
#>>> MIT010717 : Selection management
#
# * Package OpenGl (OpenGl_execstruct.c)
#
# @ Avoid drawing quality problem on selected face,
# enable/disable Z offset on highlighted faces.
#
#>>> MIT010717 : drawing management
#
# * Package OpenGl (OpenGl_indexpolygon.c, ...)
#
# @ Avoid to undraw faces with confused points
###############################################################
puts "========================"
vinit
box b 10 10 10
vdisplay b
vfit
vsetdispmode 1
puts "Only bottom face should be highlighted."
vselmode 4 1
OCC137 1
OCC137_z
set x_coord 105
set y_coord 350
QAMoveTo $x_coord $y_coord
QAMoveTo $x_coord $y_coord
QAUpdateLights
set x_coord 105
set y_coord 340
checkcolor $x_coord $y_coord 0 1 1
set x_coord 105
set y_coord 340
QASetViewCharac 60.6309 7.07107 4.08248 0.592163 -0.60038 -0.537482 0.369921 -0.390032 0.843228 -3.28175 3.38875 3.0464
checkcolor $x_coord $y_coord 0.78 0.54 0.09
set only_screen 1

54
tests/bugs/vis/bug137_5 Executable file
View File

@ -0,0 +1,54 @@
puts "========================"
puts "OCC137"
puts "========================"
###############################################################
#Patch description:
#
#MIT010717 : 3D selection management
#>>> MIT010717 : Selection management
#
# * Package OpenGl (OpenGl_execstruct.c)
#
# @ Avoid drawing quality problem on selected face,
# enable/disable Z offset on highlighted faces.
#
#>>> MIT010717 : drawing management
#
# * Package OpenGl (OpenGl_indexpolygon.c, ...)
#
# @ Avoid to undraw faces with confused points
###############################################################
puts "========================"
vinit
box b 10 10 10
vdisplay b
vfit
vsetdispmode 1
puts "Only bottom face should be highlighted."
OCC137 1
OCC137_z
vselmode 4 1
set x_coord 105
set y_coord 350
QAMoveTo $x_coord $y_coord
QAMoveTo $x_coord $y_coord
QAUpdateLights
set x_coord 105
set y_coord 340
checkcolor $x_coord $y_coord 0 1 1
QASetViewCharac 60.6309 7.07107 4.08248 0.592163 -0.60038 -0.537482 0.369921 -0.390032 0.843228 -3.28175 3.38875 3.0464
set x_coord 105
set y_coord 340
checkcolor $x_coord $y_coord 0.78 0.54 0.09
set only_screen 1

26
tests/bugs/vis/bug172 Executable file
View File

@ -0,0 +1,26 @@
puts "========"
puts "OCC172"
puts "========"
pload XDE
vinit
restore [locate_data_file OCC162.brep] s
vdisplay s
set listmem {}
set i_max 10
for {set i 1} {${i} <= ${i_max}} {incr i} {
# select shape
OCC172
# deselect shape
OCC172
lappend listmem [expr [meminfo w] / 1024]
if { [checktrend $listmem 0 1 "Memory leak detected"] } {
puts "No memory leak, $i iterations"
break
}
}

25
tests/bugs/vis/bug5682 Executable file
View File

@ -0,0 +1,25 @@
puts "============"
puts "OCC5682"
puts "============"
puts ""
######################################################
# AIS_InteractiveContext::Remove does not remove the object from memory
######################################################
set BugNumber OCC5682
set listmem {}
box b 100 100 100
vinit
vdisplay b
vfit
catch {vselmode 4 1}
vclear
lappend listmem [expr [meminfo w] / 1024]
if { [checktrend $listmem 0 1 "Memory leak detected"] } {
puts "No memory leak"
break
}

49
tests/bugs/vis/bug6145 Executable file
View File

@ -0,0 +1,49 @@
puts "============"
puts "OCC6145"
puts "============"
puts ""
##################################################################
# Incorrect rendering of a transparent object
##################################################################
set BugNumber OCC6145
box b 200 100 100
plane p 20 20 50
pcylinder c1 p 10 80
tcopy c1 c2
ttranslate c2 40 0 0
tcopy c2 c3
ttranslate c3 40 0 0
tcopy c3 c4
ttranslate c4 40 0 0
tcopy c4 c5
ttranslate c5 40 0 0
compound c1 c2 c3 c4 c5 co
cut r b co
vinit
vsetdispmode 1
vdisplay r
vfit
QAUpdateLights
set x_coord 270
set y_coord 230
checkcolor $x_coord $y_coord 0.78 0.55 0.09
vsettransparency r 0.5
QAUpdateLights
checkcolor $x_coord $y_coord 0.8 0.56 0.1
set RED_3 0.86274498701095581
set GREEN_3 0.61176401376724243
set BLUE_3 0.10196000337600708
set only_screen 1

26
tests/bugs/vis/bug6652 Executable file
View File

@ -0,0 +1,26 @@
puts "============"
puts "OCC6652"
puts "============"
puts ""
######################################################
# Problem of mesh selection
######################################################
pload XDE
set BugNumber OCC6652
meshfromstl result [locate_data_file OCC6652.stl]
meshdispmode result 3
meshselmode result 8
QASelectRectangle 5 5 400 400
if {[QANbSelected] != 26966} {
puts "Faulty ${BugNumber}"
}
set only_screen 1

40
tests/bugs/vis/bug672_1 Executable file
View File

@ -0,0 +1,40 @@
puts "==========="
puts "OCC672 "
puts "==========="
########################################################################################
# Wrong visualization of 2d dimentions
# The following list of problems:
# 1) The length dimension value should always be aligned to the middle of
# the dimension line
# 2) The angular dimension value should always be aligned to the middle of
# the dimension line
# 3) All dimension values (text) must be aligned horizontally or vertically only.
# 4) All dimension lines must be bound with properly sized arrows.
########################################################################################
puts "Test Length"
puts "==========="
set x1 0
set y1 -50
set x2 400
set y2 0
set x3 400
set y3 200
set x4 0
set y4 200
set str "(center)"
set scale_text 4.0
set length_dist -21.0
set angle 30.0
set length 5.0
set txtAngle 0.
set txtPosH 0.
set txtPosV 3.
v2dinit
OCC672_Length $x1 $y1 $x2 $y2 $str $scale_text $length_dist $angle $length $x3 $y3 $x4 $y4 $txtAngle $txtPosH $txtPosV
v2dfit
set only_screen2d 1

40
tests/bugs/vis/bug672_2 Executable file
View File

@ -0,0 +1,40 @@
puts "==========="
puts "OCC672 "
puts "==========="
########################################################################################
# Wrong visualization of 2d dimentions
# The following list of problems:
# 1) The length dimension value should always be aligned to the middle of
# the dimension line
# 2) The angular dimension value should always be aligned to the middle of
# the dimension line
# 3) All dimension values (text) must be aligned horizontally or vertically only.
# 4) All dimension lines must be bound with properly sized arrows.
########################################################################################
puts "Test Angle "
puts "==========="
set x1 0
set y1 0
set x2 -200
set y2 100
set x3 -200
set y3 0
set TH -7.
set TV 35.
set txtAngle 0.
set aText "ANGLE"
set aTxtScale 4.0
set aRadius 150
set anArrAngle 30
set anArrLength 10.0
v2dinit
OCC672_Angle $x1 $y1 $x2 $y2 $x3 $y3 $aRadius $aText $aTxtScale $anArrAngle $anArrLength $txtAngle $TH $TV
v2dfit
set only_screen2d 1

37
tests/bugs/vis/bug672_3 Executable file
View File

@ -0,0 +1,37 @@
puts "==========="
puts "OCC672 "
puts "==========="
########################################################################################
# Wrong visualization of 2d dimentions
# The following list of problems:
# 1) The length dimension value should always be aligned to the middle of
# the dimension line
# 2) The angular dimension value should always be aligned to the middle of
# the dimension line
# 3) All dimension values (text) must be aligned horizontally or vertically only.
# 4) All dimension lines must be bound with properly sized arrows.
########################################################################################
puts "Test Diameter "
puts "==========="
set x1 -100
set y1 -100
set cx 0
set cy 0
set radius 50
set aText "10-E6"
set aTxtScale 4.0
set anArrAngle 30
set anArrLength 20.0
set txtAngle 0.
set txtPosH 5.
set txtPosV 3.
v2dinit
OCC672_Diameter $x1 $y1 $cx $cy $radius $aText $aTxtScale $anArrAngle $anArrLength $txtAngle $txtPosH $txtPosV
v2dfit
set only_screen2d 1

40
tests/bugs/vis/bug672_4 Executable file
View File

@ -0,0 +1,40 @@
puts "==========="
puts "OCC672 "
puts "==========="
########################################################################################
# Wrong visualization of 2d dimentions
# The following list of problems:
# 1) The length dimension value should always be aligned to the middle of
# the dimension line
# 2) The angular dimension value should always be aligned to the middle of
# the dimension line
# 3) All dimension values (text) must be aligned horizontally or vertically only.
# 4) All dimension lines must be bound with properly sized arrows.
########################################################################################
puts "Test Short_Length"
puts "==========="
set x1 330
set y1 -30
set x2 100
set y2 100
set x3 200
set y3 -100
set x4 330
set y4 -30
set str "(center)"
set scale_text 4.
set length_dist -10.0
set angle 30.0
set length 5.0
set txtAngle 0.
set txtPosH 0.
set txtPosV 3.
v2dinit
OCC672_ShortLength $x1 $y1 $x2 $y2 $str $scale_text $length_dist $angle $length $x3 $y3 $x4 $y4 $txtAngle $txtPosH $txtPosV
v2dfit
set only_screen2d 1

60
tests/bugs/vis/bug7186 Executable file
View File

@ -0,0 +1,60 @@
puts "============"
puts "OCC7186"
puts "============"
puts ""
######################################################
# Selecting an empty space with rectangle doesn't clear
# the current selection, when there is an opened local context
######################################################
set BugNumber OCC7186
set mistake 0
box b 10 10 10
vinit
vdisplay b
vfit
QAUpdateLights
vselmode 2 1
QASelectRectangle 1 1 407 407
set NbSelected1 [QANbSelected]
if { ${NbSelected1} != 12 } {
puts "Bad number of selected edges after rectangle selection all edges"
set mistake 1
}
QASelectRectangle 10 10 20 20
set NbSelected2 [QANbSelected]
if { ${NbSelected2} != 0 } {
puts "Error : Bad number of selected edges after rectangle selection an empty space"
set mistake 1
}
set x [list 125 204 283 29 111 298 379 125 204 283 125 283]
set y [list 47 100 47 200 150 150 200 250 300 250 361 361]
QAUpdateLights
puts ""
for {set i 0} {$i < 12} {incr i} {
set x_coord [lindex ${x} $i]
set y_coord [lindex ${y} $i]
checkcolor $x_coord $y_coord 1 1 0
if { ${stat} != 1 } {
set mistake 1
}
}
puts ""
if { ${mistake} == 1 } {
puts "${BugNumber}: Faulty"
} else {
puts "${BugNumber}: OK"
}
set only_screen 1

20
tests/bugs/vis/bug9517 Executable file
View File

@ -0,0 +1,20 @@
puts "============"
puts "OCC9517"
puts "============"
puts ""
#######################################################################
# Wrong use of the method glTexCoordPointer() in OpenGl_PrimitiveArray.c
#######################################################################
set BugNumber OCC9517
box b 10 10 10
vinit
vdisplay b
vtop
vfit
vtexture b [locate_data_file OCC9517.bmp]
set only_screen 1

View File

@ -1,9 +1,13 @@
pload XDE
proc GetPercent {Value GoodValue} {
set Percent 0.
if {${GoodValue} != 0.} {
set Percent [expr abs(${Value} - ${GoodValue}) / abs(double(${GoodValue})) * 100.]
} elseif {${Value} != 0.} {
set Percent [expr abs(${GoodValue} - ${Value}) / abs(double(${Value})) * 100.]
} else {
set Percent 0.
}
return ${Percent}
}

65
tests/bugs/xde/bug4648 Executable file
View File

@ -0,0 +1,65 @@
puts "TODO OCC12345 ALL: Faulty OCC4648"
puts "================"
puts "OCC4648"
puts "================"
puts ""
#################################
# Problems with writing to STEP
#################################
set BugNumber OCC4648
igesbrep [locate_data_file annie_surf.igs] a *
set info [nbshapes a]
regexp {Mass +: +([-0-9.+eE]+)} [sprops a] full good_square
regexp {VERTEX +: +([-0-9.+eE]+)} $info full good_vertex
regexp {EDGE +: +([-0-9.+eE]+)} $info full good_edge
regexp {WIRE +: +([-0-9.+eE]+)} $info full good_wire
regexp {FACE +: +([-0-9.+eE]+)} $info full good_face
regexp {SHELL +: +([-0-9.+eE]+)} $info full good_shell
regexp {SOLID +: +([-0-9.+eE]+)} $info full good_solid
regexp {COMPSOLID +: +([-0-9.+eE]+)} $info full good_compsolid
regexp {COMPOUND +: +([-0-9.+eE]+)} $info full good_compound
regexp {SHAPE +: +([-0-9.+eE]+)} $info full good_shape
file delete ${imagedir}/annie
stepwrite 0 a ${imagedir}/annie
if { ![file exists ${imagedir}/annie] } {
puts "Faulty ${BugNumber} : There is not file"
}
catch {exec chmod 777 ${imagedir}/annie}
if [catch { stepread ${imagedir}/annie b *} res] {
puts "Faulty ${BugNumber} : stepread is wrong"
} else {
renamevar b_1 res
set info1 [nbshapes res]
regexp {Mass +: +([-0-9.+eE]+)} [sprops res] full square
regexp {VERTEX +: +([-0-9.+eE]+)} $info1 full vertex
regexp {EDGE +: +([-0-9.+eE]+)} $info1 full edge
regexp {WIRE +: +([-0-9.+eE]+)} $info1 full wire
regexp {FACE +: +([-0-9.+eE]+)} $info1 full face
regexp {SHELL +: +([-0-9.+eE]+)} $info1 full shell
regexp {SOLID +: +([-0-9.+eE]+)} $info1 full solid
regexp {COMPSOLID +: +([-0-9.+eE]+)} $info1 full compsolid
regexp {COMPOUND +: +([-0-9.+eE]+)} $info1 full compound
regexp {SHAPE +: +([-0-9.+eE]+)} $info1 full shape
if { $square != $good_square
|| $vertex != $good_vertex
|| $edge != $good_edge
|| $wire != $good_wire
|| $face != $good_face
|| $shell != $good_shell
|| $solid != $good_solid
|| $compsolid != $good_compsolid
|| $compound != $good_compound
|| $shape != $good_shape } {
puts "Faulty ${BugNumber}"
}
}
file delete ${imagedir}/annie

27
tests/bugs/xde/bug4968 Executable file
View File

@ -0,0 +1,27 @@
puts "========="
puts " OCC4968 "
puts "========="
puts ""
##################################################
# Improve FixShape to correct case of touching wires
##################################################
set BugNumber OCC4968
restore [locate_data_file OCC4968.brep] r
regexp {WIRE +: +([-0-9.+eE]+)} [nbshapes r] full wire_number1
fixshape result r
regexp {WIRE +: +([-0-9.+eE]+)} [nbshapes result] full wire_number2
checkshape result r
puts "wire_number1 = ${wire_number1}"
puts "wire_number2 = ${wire_number2}"
if { ${wire_number2} > ${wire_number1}} {
puts "OK ${BugNumber}: wire number - OK"
} else {
puts "Faulty ${BugNumber}: wrong wire number"
}
set 2dviewer 1

19
tests/bugs/xde/bug533 Executable file
View File

@ -0,0 +1,19 @@
puts "========="
puts "OCC533"
puts "========="
puts ""
#######################################################
## XmlOcaf-Document is not stored in XDEDRAWEXE although stored in TCAF
#######################################################
file delete ${imagedir}/A.xml
set res 0
catch { NewDocument A XmlOcaf }
if [catch {SaveAs A ${imagedir}/A.xml}] {
puts "OCC533 FAULTY"
} else {
puts "OCC533 OK"
}

43
tests/bugs/xde/bug6366 Executable file
View File

@ -0,0 +1,43 @@
puts "============"
puts "OCC6366"
puts "============"
puts ""
######################################################
# FixShape does not fix an edge with invalid SameRange flag
######################################################
set BugNumber OCC6366
restore [locate_data_file BUC60393.rle] a
decho off
if {[checkshape a] != "This shape seems to be valid"} {
puts "Info: we see that the initial shape is bad"
}
decho on
puts "launching fixshape..."
fixshape result a
set err 0
decho off
if {[checkshape result] != "This shape seems to be valid"} {
puts "Info: we see that the fixed shape is bad too"
puts "launching fsameparameter..."
set err 1
fsameparameter result
if {[checkshape result] == "This shape seems to be valid"} {
puts "Info: we see that fsameparameter fixed the shape completely"
} else {
puts "Info: we see that the fixed shape after fsameparameter is bad too"
}
}
decho on
if { ${err} == 0 } {
puts "OK ${BugNumber}"
} else {
puts "Faulty ${BugNumber}"
}
set 2dviewer 0

15
tests/bugs/xde/bug6384 Executable file
View File

@ -0,0 +1,15 @@
puts "================"
puts "OCC6384"
puts "================"
puts ""
#######################################################################################
# StlAPI_Reader still use old Sewing algorithm
#######################################################################################
## readstl command from XSDRAWSTLVRML.cxx file !!!!!
set BugNumber OCC6384
readstl res_mesh [locate_data_file OMF6391_box.stl]

25
tests/bugs/xde/bug6491 Executable file
View File

@ -0,0 +1,25 @@
puts "========"
puts "OCC6491"
puts "========"
puts ""
####################################################
## Sewing in DRAW on attached the shape with tolerance 1000 adds duplicated faces
####################################################
set BugNumber OCC6491
restore [locate_data_file OCC6491.brep] a
set tolerance 1000
sewing result ${tolerance} a
regexp {FACE +: +([-0-9.+eE]+)} [nbshapes result] full res_faces
set good_faces 263
if { ${res_faces} != ${good_faces} } {
puts "Faulty ${BugNumber}"
}
set 2dviewer 0

44
tests/bugs/xde/bug6555 Executable file
View File

@ -0,0 +1,44 @@
puts "========"
puts "OCC6555"
puts "========"
puts ""
####################################################
## ShapeFix_Shape modifies valid shape and return wrong status DONE.
####################################################
set BugNumber OCC6555
box s1 10 10 10
set result [checkshape s1]
set index [lsearch ${result} Faulty]
if {$index > -1} {
puts "Faulty ${BugNumber} : checkshape is wrong for s1"
} else {
puts "checkshape is good for s1"
}
set DumpList1 [dump s1]
set SOLID_Adress_1 [lindex ${DumpList1} 29]
fixshape result s1
set res [checkshape result]
set index [lsearch ${res} Faulty]
if {$index > -1} {
puts "Faulty ${BugNumber} : checkshape is wrong for res"
} else {
puts "checkshape is good for res"
}
set DumpList2 [dump result]
set SOLID_Adress_2 [lindex ${DumpList2} 29]
if { ${SOLID_Adress_1} != ${SOLID_Adress_2} } {
puts "Faulty ${BugNumber}"
} else {
puts "OK ${BugNumber}"
}
set 2dviewer 0

19
tests/bugs/xde/bug6675 Executable file
View File

@ -0,0 +1,19 @@
puts "========"
puts "OCC6675"
puts "========"
puts ""
####################################################
## Sewing can not sewed attached shape for any tolerance.Followed bug for 6542.
####################################################
set BugNumber OCC6675
restore [locate_data_file OCC6675.brep] a
set tolerance 1.00000e-07
sewing result ${tolerance} a
checkshape result
set 2dviewer 0

17
tests/bugs/xde/bug6805 Executable file
View File

@ -0,0 +1,17 @@
puts "============"
puts "OCC6805"
puts "============"
puts ""
######################################################
# Operation BSplineRestriction produced shape with null pcurves
######################################################
set BugNumber OCC6805
restore [locate_data_file OCC6805.brep] s1
checkshape s1
DT_ApplySeq result s1 ${imagedir}/OCC6805.res
checkshape result
set 2dviewer 0

19
tests/bugs/xde/bug7141 Executable file
View File

@ -0,0 +1,19 @@
puts "============"
puts "OCC7141"
puts "============"
puts ""
######################################################
# STEP interface crashes exporting large assembly
######################################################
pload QAcommands
set BugNumber OCC7141
set nCount 20
if [catch { set List [OCC7141 ${nCount}] } result] {
puts "${BugNumber}: Faulty"
} else {
puts "${BugNumber}: OK"
}

33
tests/bugs/xde/bug945 Executable file
View File

@ -0,0 +1,33 @@
puts "========="
puts " OCC945 "
puts "========="
puts ""
#######################################
## it is necessary to adapt ShapeFix_Face for correct work
#######################################
restore [locate_data_file OCC945.brep] a
decho off
set che [checkshape a]
decho on
if { [regexp "Faulty" $che] == 1 } {
puts "OCC945: Source shape is invalid."
} else {
puts "OCC945: Source shape is valid."
}
if [catch {fixshape result a 29.9 } result] {
puts "Faulty OCC945: here is problem with FIXSHAPE function"
} else {
decho off
set che1 [checkshape result]
decho on
if { [regexp "Faulty" $che1] == 1 } {
puts "Faulty OCC945: function FIXSHAPE works WRONGLY."
} else {
puts "OCC945 OK: function FIXSHAPE works PROPERLY."
}
}
set 2dviewer 1

108
tests/bugs/xde/bug9490 Executable file
View File

@ -0,0 +1,108 @@
puts "============"
puts "OCC9490"
puts "============"
puts ""
#######################################################################
# Increasing of tolerance in loop test for IGES
#######################################################################
set BugNumber OCC9490
set IsOk 1
if {[catch {igesread [locate_data_file support_bobine.igs] OCC9490a *}]} {
puts "Faulty ${BugNumber} : here is reading problem"
set IsOk 0
}
file delete ${imagedir}/OCC9490tmp.igs
if {[catch {brepiges OCC9490a ${imagedir}/OCC9490tmp.igs}]} {
puts "Faulty ${BugNumber} : here is conversation to brep problem"
set IsOk 0
}
catch {exec chmod 777 ${imagedir}/OCC9490tmp.igs}
if {[catch {igesread ${imagedir}/OCC9490tmp.igs OCC9490b *}]} {
puts "Faulty ${BugNumber} : here is 2nd reading problem"
set IsOk 0
}
if { ${IsOk} == 1} {
set aTokList {= }
set Tol1 [lindex [split [tolerance OCC9490a] ${aTokList}] 2]
set Tol2 [lindex [split [tolerance OCC9490b] ${aTokList}] 2]
set percent_max 0.1
set Tolerance_percent [GetPercent ${Tol1} ${Tol2}]
puts "Tolerance_percent = ${Tolerance_percent} %"
if { ${Tolerance_percent} > ${percent_max} } {
set IsOk 0
}
set good_square 36259
set good_vertex 1770
set good_edge 1237
set good_wire 140
set good_face 123
set good_shell 0
set good_solid 0
set good_compsolid 0
set good_compound 1
set good_shape 3271
set nb_info [nbshapes OCC9490a]
regexp {Mass +: +([-0-9.+eE]+)} [sprops OCC9490a] full sq1
regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full nb_v1
regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full nb_e1
regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full nb_w1
regexp {FACE +: +([-0-9.+eE]+)} $nb_info full nb_f1
regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full nb_sh1
regexp {SOLID +: +([-0-9.+eE]+)} $nb_info full nb_sol1
regexp {COMPSOLID +: +([-0-9.+eE]+)} $nb_info full nb_compsol1
regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full nb_compound1
regexp {SHAPE +: +([-0-9.+eE]+)} $nb_info full nb_shape1
if {$sq1 != $good_square
|| $nb_v1 != $good_vertex
|| $nb_e1 != $good_edge
|| $nb_w1 != $good_wire
|| $nb_f1 != $good_face
|| $nb_sh1 != $good_shell
|| $nb_sol1 != $good_solid
|| $nb_compsol1 != $good_compsolid
|| $nb_compound1 != $good_compound
|| $nb_shape1 != $good_shape } {
set IsOk 0
}
set nb_info [nbshapes OCC9490b]
regexp {Mass +: +([-0-9.+eE]+)} [sprops OCC9490b] full sq2
regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full nb_v2
regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full nb_e2
regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full nb_w2
regexp {FACE +: +([-0-9.+eE]+)} $nb_info full nb_f2
regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full nb_sh2
regexp {SOLID +: +([-0-9.+eE]+)} $nb_info full nb_sol2
regexp {COMPSOLID +: +([-0-9.+eE]+)} $nb_info full nb_compsol2
regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full nb_compound2
regexp {SHAPE +: +([-0-9.+eE]+)} $nb_info full nb_shape2
if {$sq2 != $good_square
|| $nb_v2 != $good_vertex
|| $nb_e2 != $good_edge
|| $nb_w2 != $good_wire
|| $nb_f2 != $good_face
|| $nb_sh2 != $good_shell
|| $nb_sol2 != $good_solid
|| $nb_compsol2 != $good_compsolid
|| $nb_compound2 != $good_compound
|| $nb_shape2 != $good_shape } {
set IsOk 0
}
if { ${IsOk} == 0 } {
puts "${BugNumber}: Faulty"
} else {
puts "${BugNumber}: OK"
}
}
renamevar OCC9490b result
set 2dviewer 0

27
tests/bugs/xde/bug952 Executable file
View File

@ -0,0 +1,27 @@
puts "========="
puts " OCC952 "
puts "========="
puts ""
##################################################
## Reading STEP file produces invalid shape
##################################################
stepread [locate_data_file OCC951.stp] a *
tpcompound rrr
######################################################################
file delete ${imagedir}/OCC952.brep
save rrr ${imagedir}/OCC952.brep
catch {exec chmod 777 ${imagedir}/OCC952.brep}
######################################################################
restore ${imagedir}/OCC952.brep result
checkshape result
######################################################################
file delete ${imagedir}/OCC952.brep
######################################################################
set 2dviewer 0

110
tests/bugs/xde/bug9531 Executable file
View File

@ -0,0 +1,110 @@
puts "TODO OCC12345 ALL: OCC9531: Faulty"
puts "============"
puts "OCC9531"
puts "============"
puts ""
#######################################################################
# Regression after writing-reading operation
#######################################################################
set BugNumber OCC9531
set IsOk 1
if {[catch {igesread [locate_data_file 919-001-T02-04-CP-VL.igs] OCC9531a *}]} {
puts "Faulty ${BugNumber} : here is reading problem"
set IsOk 0
}
file delete ${imagedir}/OCC9531tmp.igs
if {[catch {brepiges OCC9531a ${imagedir}/OCC9531tmp.igs}]} {
puts "Faulty ${BugNumber} : here is conversation to brep problem"
set IsOk 0
}
catch {exec chmod 777 ${imagedir}/OCC9531tmp.igs}
if {[catch {igesread ${imagedir}/OCC9531tmp.igs OCC9531b *}]} {
puts "Faulty ${BugNumber} : here is 2nd reading problem"
set IsOk 0
}
if { ${IsOk} == 1} {
set aTokList {= }
set Tol1 [lindex [split [tolerance OCC9531a] ${aTokList}] 2]
set Tol2 [lindex [split [tolerance OCC9531b] ${aTokList}] 2]
set percent_max 0.1
set Tolerance_percent [GetPercent ${Tol1} ${Tol2}]
puts "Tolerance_percent = ${Tolerance_percent} %"
if { ${Tolerance_percent} > ${percent_max} } {
set IsOk 0
}
set good_square 5236.89
set good_vertex 5748
set good_edge 5680
set good_wire 915
set good_face 899
set good_shell 0
set good_solid 0
set good_compsolid 0
set good_compound 1
set good_shape 13243
set nb_info [nbshapes OCC9531a]
regexp {Mass +: +([-0-9.+eE]+)} [sprops OCC9531a] full sq1
regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full nb_v1
regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full nb_e1
regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full nb_w1
regexp {FACE +: +([-0-9.+eE]+)} $nb_info full nb_f1
regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full nb_sh1
regexp {SOLID +: +([-0-9.+eE]+)} $nb_info full nb_sol1
regexp {COMPSOLID +: +([-0-9.+eE]+)} $nb_info full nb_compsol1
regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full nb_compound1
regexp {SHAPE +: +([-0-9.+eE]+)} $nb_info full nb_shape1
if {$sq1 != $good_square
|| $nb_v1 != $good_vertex
|| $nb_e1 != $good_edge
|| $nb_w1 != $good_wire
|| $nb_f1 != $good_face
|| $nb_sh1 != $good_shell
|| $nb_sol1 != $good_solid
|| $nb_compsol1 != $good_compsolid
|| $compound1 != $good_compound
|| $nb_shape1 != $good_shape } {
set IsOk 0
}
set nb_info [nbshapes OCC9531b]
regexp {Mass +: +([-0-9.+eE]+)} [sprops OCC9531b] full sq2
regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full nb_v2
regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full nb_e2
regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full nb_w2
regexp {FACE +: +([-0-9.+eE]+)} $nb_info full nb_f2
regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full nb_sh2
regexp {SOLID +: +([-0-9.+eE]+)} $nb_info full nb_sol2
regexp {COMPSOLID +: +([-0-9.+eE]+)} $nb_info full nb_compsol2
regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full nb_compound2
regexp {SHAPE +: +([-0-9.+eE]+)} $nb_info full nb_shape2
if {$sq2 != $good_square
|| $nb_v2 != $good_vertex
|| $nb_e2 != $good_edge
|| $nb_w2 != $good_wire
|| $nb_f2 != $good_face
|| $nb_sh2 != $good_shell
|| $nb_sol2 != $good_solid
|| $nb_compsol2 != $good_compsolid
|| $compound2 != $good_compound
|| $nb_shape2 != $good_shape } {
set IsOk 0
}
if { ${IsOk} == 0 } {
puts "${BugNumber}: Faulty"
} else {
puts "${BugNumber}: OK"
}
}
renamevar OCC9531b result
set 2dviewer 0

26
tests/bugs/xde/bug966 Executable file
View File

@ -0,0 +1,26 @@
puts "TODO OCC12345 ALL: Faulty OCC966 : Tolerance of shape is more than 0.000176"
puts "========="
puts " OCC966 "
puts "========="
puts ""
###############################################
##file cylinders.brep. It is increasing tolerance from 0.000176 to 51.1
###############################################
restore [locate_data_file OCC966.brep] a
DT_ShapeConvertRev result a 0 1
set tolerance [maxtolerance result]
regexp { +Face +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxFaceTolerance
regexp { +Edge +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxEdgeTolerance
regexp { +Vertex +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxVertexTolerance
if { $MaxFaceTolerance > 0.000176 || $MaxEdgeTolerance > 0.000176 || $MaxVertexTolerance > 0.000176 } {
puts "Faulty OCC966 : Tolerance of shape is more than 0.000176"
}
set 2dviewer 0