mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
Added testing cases from grid CHL
Removing test duplicate
This commit is contained in:
parent
2758330973
commit
7faaccfd34
21
tests/bugs/modalg_4/bug23076
Executable file
21
tests/bugs/modalg_4/bug23076
Executable file
@ -0,0 +1,21 @@
|
||||
puts "========================"
|
||||
puts "OCC23076"
|
||||
puts "========================"
|
||||
puts ""
|
||||
########################################################################
|
||||
## Empty result done by intersection algorithm for a curve and a surface
|
||||
########################################################################
|
||||
|
||||
set BugNumber OCC23076
|
||||
|
||||
restore [locate_data_file bug23076_c1.draw] c
|
||||
restore [locate_data_file bug23076_s2.draw] s
|
||||
intersect i c s
|
||||
set info [directory]
|
||||
set nb [regexp -all {i_[-0-9.+eE]+} $info]
|
||||
if { $nb != 26 } {
|
||||
puts "Faulty ${BugNumber}"
|
||||
} else {
|
||||
puts "OK ${BugNumber}"
|
||||
}
|
||||
|
28
tests/bugs/moddata_2/bug22165
Executable file
28
tests/bugs/moddata_2/bug22165
Executable file
@ -0,0 +1,28 @@
|
||||
puts "================"
|
||||
puts "OCC22165"
|
||||
puts "================"
|
||||
puts ""
|
||||
#######################################################################################
|
||||
# IGES transaltor does not produce any shape
|
||||
######################################################################################
|
||||
|
||||
set BugNumber OCC22165
|
||||
|
||||
catch { pload XDE }
|
||||
|
||||
igesbrep [locate_data_file OCC22165-cub_spain.igs] result *
|
||||
|
||||
set Log [data c]
|
||||
|
||||
set LogLength [llength ${Log}]
|
||||
|
||||
if { ${LogLength} < 21 } {
|
||||
puts "Bad format of data-command"
|
||||
puts "Faulty ${BugNumber}"
|
||||
} else {
|
||||
regexp -all {1[ \t]*F: Syntax error in IGES file at line ([-0-9.+eE]+) in section ([A-Z]).} $Log full word1 word2
|
||||
if { ${word1} != "206" || ${word2} != "P" } {
|
||||
puts "Faulty ${BugNumber}"
|
||||
}
|
||||
}
|
||||
|
42
tests/bugs/moddata_2/bug22572
Executable file
42
tests/bugs/moddata_2/bug22572
Executable file
@ -0,0 +1,42 @@
|
||||
puts "============"
|
||||
puts "OCC22572"
|
||||
puts "============"
|
||||
puts ""
|
||||
###########################################################################
|
||||
# Support of progress indicator in RWStl and optimization of reading Ascii.
|
||||
###########################################################################
|
||||
|
||||
set BugNumber OCC22572
|
||||
|
||||
catch { pload XSDRAW }
|
||||
vinit
|
||||
XProgress -t
|
||||
set List1 [meshfromstl result [locate_data_file bearing.stl]]
|
||||
puts "----------------------"
|
||||
XProgress +t
|
||||
set List2 [meshfromstl result [locate_data_file bearing.stl]]
|
||||
|
||||
set status 0
|
||||
|
||||
if { ${List1} != ${List2}} {
|
||||
set status 0
|
||||
} else {
|
||||
set status 1
|
||||
}
|
||||
|
||||
if { [ regexp {Progress:} $List2 ] } {
|
||||
puts "${BugNumber} OK"
|
||||
set status 0
|
||||
} else {
|
||||
puts "${BugNumber} Faulty"
|
||||
set status 1
|
||||
}
|
||||
if { $status != 0 } {
|
||||
puts "Faulty $BugNumber"
|
||||
} else {
|
||||
puts "OK $BugNumber"
|
||||
}
|
||||
|
||||
set 3dviewer 0
|
||||
|
||||
|
44
tests/bugs/moddata_2/bug22746_1
Executable file
44
tests/bugs/moddata_2/bug22746_1
Executable file
@ -0,0 +1,44 @@
|
||||
puts "============"
|
||||
puts "OCC22746"
|
||||
puts "============"
|
||||
puts ""
|
||||
###########################################################################
|
||||
# Progress indicator in ShapeHealing
|
||||
###########################################################################
|
||||
|
||||
set BugNumber OCC22746
|
||||
|
||||
catch { pload XSDRAW }
|
||||
restore [locate_data_file OCC22746-om.brep] a
|
||||
vinit
|
||||
XProgress -t
|
||||
set List1 [fixshape result a]
|
||||
puts "----------------------"
|
||||
XProgress +t
|
||||
set List2 [fixshape result a]
|
||||
|
||||
set status 0
|
||||
|
||||
if { ${List1} != ${List2}} {
|
||||
set status 0
|
||||
} else {
|
||||
set status 1
|
||||
}
|
||||
|
||||
if { [ regexp {Progress:} $List2 ] } {
|
||||
puts "${BugNumber} OK"
|
||||
set status 0
|
||||
} else {
|
||||
puts "${BugNumber} Faulty"
|
||||
set status 1
|
||||
}
|
||||
|
||||
if { $status != 0 } {
|
||||
puts "Faulty $BugNumber"
|
||||
} else {
|
||||
puts "OK $BugNumber"
|
||||
}
|
||||
|
||||
set 3dviewer 0
|
||||
set square 16473.3
|
||||
|
44
tests/bugs/moddata_2/bug22746_2
Executable file
44
tests/bugs/moddata_2/bug22746_2
Executable file
@ -0,0 +1,44 @@
|
||||
puts "============"
|
||||
puts "OCC22746"
|
||||
puts "============"
|
||||
puts ""
|
||||
###########################################################################
|
||||
# Progress indicator in ShapeHealing
|
||||
###########################################################################
|
||||
|
||||
set BugNumber OCC22746
|
||||
|
||||
catch { pload XSDRAW }
|
||||
restore [locate_data_file OCC22746-trampafus-notfixed.brep] a
|
||||
vinit
|
||||
XProgress -t
|
||||
set List1 [fixshape result a]
|
||||
puts "----------------------"
|
||||
XProgress +t
|
||||
set List2 [fixshape result a]
|
||||
|
||||
set status 0
|
||||
|
||||
if { ${List1} != ${List2}} {
|
||||
set status 0
|
||||
} else {
|
||||
set status 1
|
||||
}
|
||||
|
||||
if { [ regexp {Progress:} $List2 ] } {
|
||||
puts "${BugNumber} OK"
|
||||
set status 0
|
||||
} else {
|
||||
puts "${BugNumber} Faulty"
|
||||
set status 1
|
||||
}
|
||||
|
||||
if { $status != 0 } {
|
||||
puts "Faulty $BugNumber"
|
||||
} else {
|
||||
puts "OK $BugNumber"
|
||||
}
|
||||
|
||||
set 3dviewer 0
|
||||
set square 1.13819e+07
|
||||
|
46
tests/bugs/moddata_2/bug22746_3
Executable file
46
tests/bugs/moddata_2/bug22746_3
Executable file
@ -0,0 +1,46 @@
|
||||
puts "============"
|
||||
puts "OCC22746"
|
||||
puts "============"
|
||||
puts ""
|
||||
###########################################################################
|
||||
# Progress indicator in ShapeHealing
|
||||
###########################################################################
|
||||
|
||||
set BugNumber OCC22746
|
||||
|
||||
set Min_ListLength 11
|
||||
|
||||
catch { pload XSDRAW }
|
||||
|
||||
restore [locate_data_file OCC22761-TransmissionTestModel5-notfixed.brep] a
|
||||
vinit
|
||||
XProgress -t
|
||||
set List1 [fixshape result a]
|
||||
puts "----------------------"
|
||||
XProgress +t
|
||||
set List2 [fixshape result a]
|
||||
|
||||
set status 0
|
||||
|
||||
if { ${List1} != ${List2}} {
|
||||
set status 0
|
||||
} else {
|
||||
set status 1
|
||||
}
|
||||
|
||||
if { [ regexp {Progress:} $List2 ] } {
|
||||
puts "${BugNumber} OK"
|
||||
set status 0
|
||||
} else {
|
||||
puts "${BugNumber} Faulty"
|
||||
set status 1
|
||||
}
|
||||
|
||||
if { $status != 0 } {
|
||||
puts "Faulty $BugNumber"
|
||||
} else {
|
||||
puts "OK $BugNumber"
|
||||
}
|
||||
set 3dviewer 0
|
||||
set square 7.46496e+06
|
||||
|
58
tests/bugs/moddata_2/bug22758
Executable file
58
tests/bugs/moddata_2/bug22758
Executable file
@ -0,0 +1,58 @@
|
||||
puts "========================"
|
||||
puts "OCC22758"
|
||||
puts "========================"
|
||||
puts ""
|
||||
#######################################################################
|
||||
# Problem in BRepExtrema_DistShapeShape
|
||||
#
|
||||
# This script tries to reproduce the bug in BRepExtrema_DistanceSS class reported
|
||||
# by Rob Bacnrach on OCCT Forum: http://www.opencascade.org/org/forum/thread_23040
|
||||
# (when first shape is edge and second is vertex, the points are returned
|
||||
# for the solutions are swapped)
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
set BugNumber OCC22758
|
||||
|
||||
bsplinecurve c1 2 2 0 3 1 3 0 2 0 1 1 1 0 1 2 2 0 1
|
||||
mkedge e c1
|
||||
vertex v 0 0 1
|
||||
|
||||
set res [distmini r e v]
|
||||
|
||||
set status 0
|
||||
# result should contain one edge, starting on e and ending on v
|
||||
if { [llength $res] != 2 } {
|
||||
puts "Error: result has structure different from expected: $res"
|
||||
set status 1
|
||||
}
|
||||
|
||||
# get start and end vertices -- these should be solutions on e1 and e2
|
||||
set sol [explode [lindex $res 1] v]
|
||||
|
||||
# check distances in correct order
|
||||
set d1 [dval [lindex [distmini d1 [lindex $sol 0] e] 0]]
|
||||
set d2 [dval [lindex [distmini d2 [lindex $sol 1] v] 0]]
|
||||
puts "Distances from solutions to relevant objecte: $d1, $d2"
|
||||
if { $d1 > 1e-7 || $d2 > 1e-7 } {
|
||||
puts "Error: distances are non-zero!"
|
||||
set status 1
|
||||
}
|
||||
|
||||
# check distances in swapped order
|
||||
set d1 [dval [lindex [distmini d1 [lindex $sol 0] v] 0]]
|
||||
set d2 [dval [lindex [distmini d2 [lindex $sol 1] e] 0]]
|
||||
puts "Distances from solutions to swapped objecte: $d1, $d2"
|
||||
if { $d1 < 0.1 || $d2 < 0.1 } {
|
||||
puts "Error: swapped distances are zero, i.e. solutions are swapped!"
|
||||
set status 1
|
||||
}
|
||||
|
||||
# Resume
|
||||
puts ""
|
||||
if { ${status} == 1 } {
|
||||
puts "Faulty ${BugNumber}"
|
||||
} else {
|
||||
puts "OK ${BugNumber}"
|
||||
}
|
||||
|
55
tests/bugs/moddata_2/bug23051
Executable file
55
tests/bugs/moddata_2/bug23051
Executable file
@ -0,0 +1,55 @@
|
||||
puts "================"
|
||||
puts "OCC23051"
|
||||
puts "================"
|
||||
puts ""
|
||||
######################################################################################
|
||||
# Bug in BRepExtrema_DistShapeShape (through BRepExtrema_DistanceSS0
|
||||
######################################################################################
|
||||
|
||||
set BugNumber OCC23051
|
||||
|
||||
# create edges and find minimal distance
|
||||
plane p 0 0 0 0 0 1
|
||||
mkface f p -10 10 -10 10
|
||||
vertex v 0 0 1
|
||||
set res [distmini r f v]
|
||||
|
||||
# result should contain one edge, starting on f and ending on v
|
||||
if { [llength $res] != 2 } {
|
||||
puts "Error: result has structure different from expected: $res"
|
||||
}
|
||||
|
||||
# get start and end vertices -- these should be solutions on f and v
|
||||
set sol [explode [lindex $res 1] v]
|
||||
|
||||
set status1 0
|
||||
# check distances in correct order
|
||||
set d1 [dval [lindex [distmini d1 [lindex $sol 0] f] 0]]
|
||||
set d2 [dval [lindex [distmini d2 [lindex $sol 1] v] 0]]
|
||||
|
||||
puts "Distances from solutions to relevant objecte: $d1, $d2"
|
||||
if { $d1 > 1e-7 || $d2 > 1e-7 } {
|
||||
puts "Error: distances are non-zero!"
|
||||
set status1 1
|
||||
}
|
||||
|
||||
set status2 0
|
||||
# check distances in swapped order
|
||||
set d1 [dval [lindex [distmini d1 [lindex $sol 0] v] 0]]
|
||||
set d2 [dval [lindex [distmini d2 [lindex $sol 1] f] 0]]
|
||||
|
||||
puts "Distances from solutions to swapped objecte: $d1, $d2"
|
||||
if { $d1 < 0.1 || $d2 < 0.1 } {
|
||||
puts "Error: swapped distances are zero, i.e. solutions are swapped!"
|
||||
set status2 1
|
||||
}
|
||||
|
||||
# Resume
|
||||
puts ""
|
||||
if { ${status1} != 0 && ${status2} != 0 } {
|
||||
puts "Faulty ${BugNumber}"
|
||||
} else {
|
||||
puts "OK ${BugNumber}"
|
||||
}
|
||||
|
||||
|
@ -1,23 +0,0 @@
|
||||
puts "========================"
|
||||
puts "BUC61058"
|
||||
puts " OCC378 "
|
||||
puts "========================"
|
||||
puts ""
|
||||
########################################################################
|
||||
##Regression on KAS:dev:ros. Draw hangs after try to load 6381.brep shape to 3D Viewer. Case : cgg/004/S2
|
||||
########################################################################
|
||||
|
||||
restore [locate_data_file OCC378.brep] result
|
||||
|
||||
tclean result
|
||||
vinit
|
||||
|
||||
if [catch {vdisplay result } catch_result] {
|
||||
puts "Faulty OCC378: function VDISPLAY works wrongly"
|
||||
} else {
|
||||
puts " OCC378 OK : function VDISPLAY works properly"
|
||||
}
|
||||
|
||||
set 3dviewer 1
|
||||
|
||||
|
101
tests/bugs/vis/bug1629
Executable file
101
tests/bugs/vis/bug1629
Executable file
@ -0,0 +1,101 @@
|
||||
puts "TODO OCC11111 ALL: Error : Colors are not equal in default coordinate and in the near coordinates too"
|
||||
|
||||
puts "================"
|
||||
puts "OCC1629"
|
||||
puts "OCC2707"
|
||||
puts "================"
|
||||
puts ""
|
||||
#######################################################################################
|
||||
# Viewer is always updated on closing local contexts
|
||||
#######################################################################################
|
||||
# Various improvements of RINA LH3D-3H project
|
||||
#######################################################################################
|
||||
|
||||
box b1 10 10 10
|
||||
box b2 50 50 50 10 10 10
|
||||
vinit
|
||||
vdisplay b1 b2
|
||||
vfit
|
||||
|
||||
# box b2
|
||||
set x1 321
|
||||
set y1 120
|
||||
|
||||
set x2 336
|
||||
set y2 145
|
||||
|
||||
set x3 367
|
||||
set y3 144
|
||||
|
||||
# box b1
|
||||
set x4 44
|
||||
set y4 314
|
||||
|
||||
set x5 72
|
||||
set y5 314
|
||||
|
||||
set Selection_R 0.8
|
||||
set Selection_G 0.8
|
||||
set Selection_B 0.8
|
||||
|
||||
#QASetChoiceMode EDGE ON
|
||||
vselmode 2 1
|
||||
|
||||
set BeforeNbSelected [vnbselected]
|
||||
|
||||
vselect 0 0 1
|
||||
|
||||
vselect ${x1} ${y1} 1
|
||||
vselect ${x2} ${y2} 1
|
||||
vselect ${x3} ${y3} 1
|
||||
vselect ${x4} ${y4} 1
|
||||
vselect ${x5} ${y5} 1
|
||||
|
||||
set AfterNbSelected [vnbselected]
|
||||
|
||||
checkcolor ${x1} ${y1} ${Selection_R} ${Selection_G} ${Selection_B}
|
||||
checkcolor ${x2} ${y2} ${Selection_R} ${Selection_G} ${Selection_B}
|
||||
checkcolor ${x3} ${y3} ${Selection_R} ${Selection_G} ${Selection_B}
|
||||
checkcolor ${x4} ${y4} ${Selection_R} ${Selection_G} ${Selection_B}
|
||||
checkcolor ${x5} ${y5} ${Selection_R} ${Selection_G} ${Selection_B}
|
||||
|
||||
if {${BeforeNbSelected} == 0} {
|
||||
puts "OCC1629: OK (case 6: before selection)"
|
||||
} else {
|
||||
puts "OCC1629: Error (case 6: before selection)"
|
||||
}
|
||||
|
||||
if {${AfterNbSelected} == 5} {
|
||||
puts "OCC1629: OK (case 7: after selection)"
|
||||
} else {
|
||||
puts "OCC1629: Error (case 7: after selection)"
|
||||
}
|
||||
|
||||
vselmode 0 1
|
||||
|
||||
#
|
||||
puts "NOTES:"
|
||||
puts ""
|
||||
puts "Viewer is not updated on closing local context,"
|
||||
puts "but we can not check it by automatic test!"
|
||||
puts ""
|
||||
puts "5 edges must be selected on the viewer,"
|
||||
puts "but must be CloseNbSelected = 0 !"
|
||||
puts ""
|
||||
#
|
||||
|
||||
set CloseNbSelected [vnbselected]
|
||||
|
||||
checkcolor ${x1} ${y1} ${Selection_R} ${Selection_G} ${Selection_B}
|
||||
checkcolor ${x2} ${y2} ${Selection_R} ${Selection_G} ${Selection_B}
|
||||
checkcolor ${x3} ${y3} ${Selection_R} ${Selection_G} ${Selection_B}
|
||||
checkcolor ${x4} ${y4} ${Selection_R} ${Selection_G} ${Selection_B}
|
||||
checkcolor ${x5} ${y5} ${Selection_R} ${Selection_G} ${Selection_B}
|
||||
|
||||
if {${CloseNbSelected} == 0} {
|
||||
puts "OCC1629: OK (case 13: after close local context)"
|
||||
} else {
|
||||
puts "OCC1629: Error (case 13: after close local context)"
|
||||
}
|
||||
|
||||
set only_screen 1
|
72
tests/bugs/vis/bug1786
Executable file
72
tests/bugs/vis/bug1786
Executable file
@ -0,0 +1,72 @@
|
||||
puts "================"
|
||||
puts "OCC1786"
|
||||
puts "OCC2707"
|
||||
puts "================"
|
||||
#######################################################################################
|
||||
# AIS_LC::AddOrRemoveSelected(Handle(SelectMgr_EntityOwner), ..) works too slow
|
||||
# Various improvements of RINA LH3D-3H project
|
||||
#######################################################################################
|
||||
|
||||
box b1 10 10 10
|
||||
box b2 20 20 20 10 10 10
|
||||
vinit
|
||||
vdisplay b1 b2
|
||||
vfit
|
||||
|
||||
# box b1
|
||||
set x11 57 ; set y11 322
|
||||
set x12 118 ; set y12 322
|
||||
|
||||
# box b2
|
||||
set x21 290 ; set y21 186
|
||||
set x22 352 ; set y22 186
|
||||
|
||||
set Selection_R 0.8
|
||||
set Selection_G 0.8
|
||||
set Selection_B 0.8
|
||||
|
||||
set Idle_R 1
|
||||
set Idle_G 1
|
||||
set Idle_B 0
|
||||
|
||||
#QASetChoiceMode EDGE ON
|
||||
vselmode 2 1
|
||||
set AutoHilight 0
|
||||
OCC1786 ${AutoHilight}
|
||||
set BeforeNbSelected [vnbselected]
|
||||
|
||||
checkcolor ${x12} ${y12} ${Idle_R} ${Idle_G} ${Idle_B}
|
||||
checkcolor ${x21} ${y21} ${Idle_R} ${Idle_G} ${Idle_B}
|
||||
checkcolor ${x22} ${y22} ${Idle_R} ${Idle_G} ${Idle_B}
|
||||
|
||||
if {${BeforeNbSelected} == 0} {
|
||||
puts "OCC1786: OK (case 4: before selection)"
|
||||
} else {
|
||||
puts "OCC1786: Error (case 4: before selection)"
|
||||
}
|
||||
|
||||
# Select edges
|
||||
|
||||
vselect 0 0 1
|
||||
|
||||
vselect ${x11} ${y11} 1
|
||||
vselect ${x12} ${y12} 1
|
||||
|
||||
vselect ${x21} ${y21} 1
|
||||
vselect ${x22} ${y22} 1
|
||||
|
||||
vselect 0 0 1
|
||||
set AfterNbSelected [vnbselected]
|
||||
|
||||
checkcolor ${x11} ${y11} ${Selection_R} ${Selection_G} ${Selection_B}
|
||||
checkcolor ${x12} ${y12} ${Selection_R} ${Selection_G} ${Selection_B}
|
||||
checkcolor ${x21} ${y21} ${Selection_R} ${Selection_G} ${Selection_B}
|
||||
checkcolor ${x22} ${y22} ${Selection_R} ${Selection_G} ${Selection_B}
|
||||
|
||||
if {${AfterNbSelected} == 4} {
|
||||
puts "OCC1786: OK (case 9: after selection)"
|
||||
} else {
|
||||
puts "OCC1786: Error (case 9: after selection)"
|
||||
}
|
||||
|
||||
set only_screen 1
|
19
tests/bugs/vis/bug21798
Executable file
19
tests/bugs/vis/bug21798
Executable file
@ -0,0 +1,19 @@
|
||||
puts "============"
|
||||
puts "OCC21798"
|
||||
puts "============"
|
||||
puts ""
|
||||
#######################################################################
|
||||
# Attached face hangs during vizualization in OCC Viewer 3D .
|
||||
#######################################################################
|
||||
|
||||
set BugNumber OCC21798
|
||||
|
||||
restore [locate_data_file OCC21798.brep] result
|
||||
vinit
|
||||
vdisplay result
|
||||
vfit
|
||||
|
||||
vsetdispmode 1
|
||||
vfit
|
||||
|
||||
set only_screen 1
|
48
tests/bugs/vis/bug22304
Executable file
48
tests/bugs/vis/bug22304
Executable file
@ -0,0 +1,48 @@
|
||||
puts "==========="
|
||||
puts "OCC22304"
|
||||
puts "==========="
|
||||
puts ""
|
||||
#######################################################################
|
||||
# Incorrect triangulation on face of the attached file
|
||||
#######################################################################
|
||||
|
||||
set BugNumber OCC22304
|
||||
|
||||
restore [locate_data_file OCC22304-face_976_badvisu.brep] result
|
||||
|
||||
tclean result
|
||||
vinit
|
||||
vdisplay result
|
||||
vfit
|
||||
|
||||
vsetdispmode 1
|
||||
|
||||
set tri_info [trinfo result]
|
||||
regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
|
||||
regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
|
||||
|
||||
set status 0
|
||||
|
||||
if { ${tri} > 0 } {
|
||||
puts "triangles: OK ${BugNumber}"
|
||||
} else {
|
||||
puts "triangles: Faulty ${BugNumber}"
|
||||
set status 1
|
||||
}
|
||||
|
||||
if { ${nod} > 0 } {
|
||||
puts "nodes: OK ${BugNumber}"
|
||||
} else {
|
||||
puts "nodes: Faulty ${BugNumber}"
|
||||
set status 1
|
||||
}
|
||||
|
||||
# Resume
|
||||
puts ""
|
||||
if { ${status} != 0 } {
|
||||
puts "Faulty ${BugNumber}"
|
||||
} else {
|
||||
puts "OK ${BugNumber}"
|
||||
}
|
||||
|
||||
set only_screen 1
|
52
tests/bugs/vis/bug22313
Executable file
52
tests/bugs/vis/bug22313
Executable file
@ -0,0 +1,52 @@
|
||||
puts "============"
|
||||
puts "OCC22313"
|
||||
puts "============"
|
||||
puts ""
|
||||
#######################################################################
|
||||
# Bug in shading mode with attached shape
|
||||
#######################################################################
|
||||
|
||||
set BugNumber OCC22313
|
||||
|
||||
# Data
|
||||
|
||||
set scale 2.9701073117025172
|
||||
set center_X -1339.0679502864409
|
||||
set center_Y -2077.3454643258542
|
||||
set proj_X 0.4096425473690033
|
||||
set proj_Y 0.77340573072433472
|
||||
set proj_Z 0.48377299308776855
|
||||
set up_X -0.83569550514221191
|
||||
set up_Y 0.1055084615945816
|
||||
set up_Z 0.538962721824646
|
||||
set at_X -2857.961669921875
|
||||
set at_Y -1655.37939453125
|
||||
set at_Z -1782.80908203125
|
||||
|
||||
|
||||
set x1 300
|
||||
set y1 230
|
||||
|
||||
set Artifact_R 0
|
||||
set Artifact_G 0
|
||||
set Artifact_B 0
|
||||
|
||||
# Start
|
||||
|
||||
restore [locate_data_file OCC22313-face_shading_problem.brep] result
|
||||
vinit
|
||||
vdisplay result
|
||||
vfit
|
||||
|
||||
vsetdispmode 1
|
||||
vfit
|
||||
|
||||
|
||||
vviewparams ${scale} ${center_X} ${center_Y} \
|
||||
${proj_X} ${proj_Y} ${proj_Z} \
|
||||
${up_X} ${up_Y} ${up_Z} \
|
||||
${at_X} ${at_Y} ${at_Z}
|
||||
|
||||
checkcolor ${x1} ${y1} ${Artifact_R} ${Artifact_G} ${Artifact_B}
|
||||
|
||||
set only_screen 1
|
34
tests/bugs/vis/bug22368
Executable file
34
tests/bugs/vis/bug22368
Executable file
@ -0,0 +1,34 @@
|
||||
puts "========================"
|
||||
puts "OCC22368"
|
||||
puts "========================"
|
||||
puts ""
|
||||
#######################################################################
|
||||
# AIS_Trihedron's highlight presentation isn't updated on trihedron relocation
|
||||
#######################################################################
|
||||
|
||||
set BugNumber OCC22368
|
||||
|
||||
vinit
|
||||
vtrihedron trihedron
|
||||
OCC74_set trihedron 3
|
||||
|
||||
set x1 200
|
||||
set x2 220
|
||||
set x3 210
|
||||
|
||||
set y 190
|
||||
|
||||
vselect ${x3} ${y}
|
||||
|
||||
set new_x 100
|
||||
set new_y 100
|
||||
set new_z 100
|
||||
|
||||
vsetlocation trihedron ${new_x} ${new_y} ${new_z}
|
||||
|
||||
set status 0
|
||||
for {set i ${x1} } {$i <= ${x2} } {incr i} {
|
||||
checkcolor ${i} ${y} 0 0 0
|
||||
}
|
||||
|
||||
set only_screen 1
|
88
tests/bugs/vis/bug22502
Executable file
88
tests/bugs/vis/bug22502
Executable file
@ -0,0 +1,88 @@
|
||||
puts "TODO OCC11111 ALL: Faulty OCC22502"
|
||||
|
||||
puts "============"
|
||||
puts "OCC22502"
|
||||
puts "============"
|
||||
puts ""
|
||||
#######################################################################
|
||||
# Triangulation cannot be built on valid face
|
||||
#######################################################################
|
||||
|
||||
set BugNumber OCC22502
|
||||
|
||||
pload ALL
|
||||
|
||||
restore [locate_data_file OCC22502-bug601_noshading.brep] result
|
||||
checkshape result
|
||||
tolerance result
|
||||
tclean result
|
||||
|
||||
set Deflection 0.001
|
||||
incmesh result ${Deflection}
|
||||
|
||||
set tri_info [trinfo result]
|
||||
regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
|
||||
regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
|
||||
regexp {Maximal deflection +([-0-9.+eE]+)} $tri_info full defl
|
||||
|
||||
set good_tri 170
|
||||
set good_nod 172
|
||||
set good_defl 0.00061201255663038154
|
||||
|
||||
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}
|
||||
}
|
||||
|
||||
set percent_max 0.1
|
||||
set status 0
|
||||
|
||||
set triangle_percent [GetPercent ${tri} ${good_tri}]
|
||||
puts "triangle_percent = ${triangle_percent}"
|
||||
if { ${triangle_percent} > ${percent_max} } {
|
||||
puts "triangle: Faulty ${BugNumber}"
|
||||
set status 1
|
||||
} else {
|
||||
puts "triangle: OK ${BugNumber}"
|
||||
}
|
||||
|
||||
set node_percent [GetPercent ${nod} ${good_nod}]
|
||||
puts "node_percent = ${node_percent}"
|
||||
if { ${node_percent} > ${percent_max} } {
|
||||
puts "node: Faulty ${BugNumber}"
|
||||
set status 1
|
||||
} else {
|
||||
puts "node: OK ${BugNumber}"
|
||||
}
|
||||
|
||||
set deflection_percent [GetPercent ${defl} ${good_defl}]
|
||||
puts "deflection_percent = ${deflection_percent}"
|
||||
if { ${deflection_percent} > ${percent_max} } {
|
||||
puts "deflection: Faulty ${BugNumber}"
|
||||
set status 1
|
||||
} else {
|
||||
puts "deflection: OK ${BugNumber}"
|
||||
}
|
||||
|
||||
# Resume
|
||||
puts ""
|
||||
if { ${status} != 0 } {
|
||||
puts "Faulty ${BugNumber}"
|
||||
} else {
|
||||
puts "OK ${BugNumber}"
|
||||
}
|
||||
|
||||
vinit
|
||||
vdisplay result
|
||||
vfit
|
||||
|
||||
vsetdispmode 1
|
||||
|
||||
set only_screen 1
|
29
tests/bugs/vis/bug22507
Executable file
29
tests/bugs/vis/bug22507
Executable file
@ -0,0 +1,29 @@
|
||||
puts "============"
|
||||
puts "OCC22507"
|
||||
puts "============"
|
||||
puts ""
|
||||
#######################################################################
|
||||
# Regression: shading of face is bad (wrong normals)
|
||||
#######################################################################
|
||||
|
||||
set BugNumber OCC22507
|
||||
|
||||
restore [locate_data_file OCC22507-bug589_f77_badshading.brep] result
|
||||
vinit
|
||||
vdisplay result
|
||||
vfit
|
||||
|
||||
vsetdispmode 1
|
||||
|
||||
set x 200
|
||||
set y 220
|
||||
|
||||
set RED_R1 0.96470499038696289
|
||||
set GREEN_R1 0.68627399206161499
|
||||
set BLUE_R1 0.12156800180673599
|
||||
|
||||
vmoveto $x $y
|
||||
|
||||
checkcolor $x $y ${RED_R1} ${GREEN_R1} ${BLUE_R1}
|
||||
|
||||
set only_screen 1
|
49
tests/bugs/vis/bug22652
Executable file
49
tests/bugs/vis/bug22652
Executable file
@ -0,0 +1,49 @@
|
||||
puts "============"
|
||||
puts "OCC22652"
|
||||
puts "============"
|
||||
puts ""
|
||||
#######################################################################
|
||||
# No mesh for face (regression)
|
||||
#######################################################################
|
||||
|
||||
set BugNumber OCC22652
|
||||
|
||||
pload ALL
|
||||
|
||||
restore [locate_data_file OCC22652-faceNoMesh.brep] result
|
||||
vinit
|
||||
vdisplay result
|
||||
vfit
|
||||
|
||||
vsetdispmode 1
|
||||
|
||||
set tri_info [trinfo result]
|
||||
regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
|
||||
regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
|
||||
regexp {Maximal deflection +([-0-9.+eE]+)} $tri_info full defl
|
||||
|
||||
set status 0
|
||||
|
||||
if { ${tri} > 0 } {
|
||||
puts "triangles: OK ${BugNumber}"
|
||||
} else {
|
||||
puts "triangles: Faulty ${BugNumber}"
|
||||
set status 1
|
||||
}
|
||||
|
||||
if { ${nod} > 0 } {
|
||||
puts "nodes: OK ${BugNumber}"
|
||||
} else {
|
||||
puts "nodes: Faulty ${BugNumber}"
|
||||
set status 1
|
||||
}
|
||||
|
||||
# Resume
|
||||
puts ""
|
||||
if { ${status} != 0 } {
|
||||
puts "Faulty ${BugNumber}"
|
||||
} else {
|
||||
puts "OK ${BugNumber}"
|
||||
}
|
||||
|
||||
set only_screen 1
|
58
tests/bugs/vis/bug22701
Executable file
58
tests/bugs/vis/bug22701
Executable file
@ -0,0 +1,58 @@
|
||||
puts "============"
|
||||
puts "OCC22701"
|
||||
puts "============"
|
||||
puts ""
|
||||
#######################################################################
|
||||
# Regression in 6.5.1 - Wrong visualization
|
||||
#######################################################################
|
||||
|
||||
set BugNumber OCC22701
|
||||
|
||||
# Data
|
||||
|
||||
set scale 276.45658048904141
|
||||
set center_X 0.41566799352988693
|
||||
set center_Y -1.4232027731292387
|
||||
set proj_X -0.8895147442817688
|
||||
set proj_Y -0.37965071201324463
|
||||
set proj_Z 0.25422060489654541
|
||||
set up_X -0.055201318114995956
|
||||
set up_Y 0.64161688089370728
|
||||
set up_Z 0.76503568887710571
|
||||
set at_X -0.018965641036629677
|
||||
set at_Y 1.2994236946105957
|
||||
set at_Z -0.41784921288490295
|
||||
|
||||
set x1 105
|
||||
set y1 275
|
||||
|
||||
set x2 112
|
||||
set y2 248
|
||||
|
||||
set Hole1_R 1
|
||||
set Hole1_G 0.76470500230789185
|
||||
set Hole1_B 0.16078400611877441
|
||||
set Hole2_R 0.68235200643539429
|
||||
set Hole2_G 0.48235198855400085
|
||||
set Hole2_B 0.078431002795696259
|
||||
|
||||
# Start
|
||||
|
||||
restore [locate_data_file PFS04041r1.brep] result
|
||||
vinit
|
||||
vdisplay result
|
||||
vfit
|
||||
|
||||
vsetdispmode 1
|
||||
vfit
|
||||
|
||||
|
||||
vviewparams ${scale} ${center_X} ${center_Y} \
|
||||
${proj_X} ${proj_Y} ${proj_Z} \
|
||||
${up_X} ${up_Y} ${up_Z} \
|
||||
${at_X} ${at_Y} ${at_Z}
|
||||
|
||||
checkcolor ${x1} ${y1} ${Hole1_R} ${Hole1_G} ${Hole1_B}
|
||||
checkcolor ${x2} ${y2} ${Hole2_R} ${Hole2_G} ${Hole2_B}
|
||||
|
||||
set only_screen 1
|
78
tests/bugs/vis/bug22735
Executable file
78
tests/bugs/vis/bug22735
Executable file
@ -0,0 +1,78 @@
|
||||
puts "========"
|
||||
puts "OCC22735"
|
||||
puts "========"
|
||||
puts ""
|
||||
###########################################################
|
||||
# Data races in BRepMesh working in parallel mode
|
||||
###########################################################
|
||||
|
||||
set BugNumber OCC22735
|
||||
|
||||
vinit
|
||||
vsetdispmode 1
|
||||
mpparallel 1
|
||||
|
||||
restore [locate_data_file OCC22735-march_cube.brep] result
|
||||
|
||||
vdisplay result
|
||||
|
||||
set tri_info [trinfo result]
|
||||
regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
|
||||
regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
|
||||
regexp {Maximal deflection +([-0-9.+eE]+)} $tri_info full defl
|
||||
|
||||
set good_tri 48
|
||||
set good_nod 96
|
||||
set good_defl 0
|
||||
|
||||
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}
|
||||
}
|
||||
set percent_max 0.1
|
||||
set status 0
|
||||
|
||||
set triangle_percent [GetPercent ${tri} ${good_tri}]
|
||||
puts "triangle_percent = ${triangle_percent}"
|
||||
if { ${triangle_percent} > ${percent_max} } {
|
||||
puts "triangle: Faulty ${BugNumber}"
|
||||
set status 1
|
||||
} else {
|
||||
puts "triangle: OK ${BugNumber}"
|
||||
}
|
||||
|
||||
set node_percent [GetPercent ${nod} ${good_nod}]
|
||||
puts "node_percent = ${node_percent}"
|
||||
if { ${node_percent} > ${percent_max} } {
|
||||
puts "node: Faulty ${BugNumber}"
|
||||
set status 1
|
||||
} else {
|
||||
puts "node: OK ${BugNumber}"
|
||||
}
|
||||
|
||||
set deflection_percent [GetPercent ${defl} ${good_defl}]
|
||||
puts "deflection_percent = ${deflection_percent}"
|
||||
if { ${deflection_percent} > ${percent_max} } {
|
||||
puts "deflection: Faulty ${BugNumber}"
|
||||
set status 1
|
||||
} else {
|
||||
puts "deflection: OK ${BugNumber}"
|
||||
}
|
||||
|
||||
# Resume
|
||||
puts ""
|
||||
if { ${status} != 0 } {
|
||||
puts "Faulty ${BugNumber}"
|
||||
} else {
|
||||
puts "OK ${BugNumber}"
|
||||
}
|
||||
|
||||
vfit
|
||||
set only_screen 1
|
20
tests/bugs/vis/bug23186
Executable file
20
tests/bugs/vis/bug23186
Executable file
@ -0,0 +1,20 @@
|
||||
puts "============"
|
||||
puts "OCC23186"
|
||||
puts "============"
|
||||
puts ""
|
||||
############################################################################
|
||||
# Unable to display Graphic3d_ArrayOfPoints after migrating from OCCT 6.5.2
|
||||
############################################################################
|
||||
|
||||
set BugNumber OCC23186
|
||||
|
||||
vinit
|
||||
vdrawparray a points 0 v 0 0 0 v 0 0 10 v 0 10 10 v 0 10 0
|
||||
vfit
|
||||
|
||||
checkcolor 321 2 1 1 0
|
||||
checkcolor 321 271 1 1 0
|
||||
checkcolor 87 137 1 1 0
|
||||
checkcolor 87 406 1 1 0
|
||||
|
||||
set only_screen 1
|
110
tests/bugs/vis/bug349_1
Executable file
110
tests/bugs/vis/bug349_1
Executable file
@ -0,0 +1,110 @@
|
||||
puts "========"
|
||||
puts "OCC349"
|
||||
puts "========"
|
||||
puts ""
|
||||
puts "2. Fitall with hidden line removal algorithm works incorrect in the perspective view"
|
||||
|
||||
vinit
|
||||
box b 100 900 300
|
||||
vdisplay b
|
||||
|
||||
OCC280 1 1
|
||||
|
||||
vfit
|
||||
|
||||
set x1 165
|
||||
set y1 109
|
||||
|
||||
set x2 380
|
||||
set y2 26
|
||||
|
||||
set x3 215
|
||||
set y3 130
|
||||
|
||||
set x4 31
|
||||
set y4 199
|
||||
|
||||
set x5 188
|
||||
set y5 254
|
||||
|
||||
set x6 351
|
||||
set y6 177
|
||||
|
||||
set x7 216
|
||||
set y7 287
|
||||
|
||||
set x8 22
|
||||
set y8 373
|
||||
|
||||
set x9 2
|
||||
set y9 249
|
||||
|
||||
set x10 345
|
||||
set y10 92
|
||||
|
||||
set x11 393
|
||||
set y11 109
|
||||
|
||||
set x12 52
|
||||
set y12 284
|
||||
|
||||
set Black_R 0
|
||||
set Black_G 0
|
||||
set Black_B 0
|
||||
|
||||
set Yellow_R 1
|
||||
set Yellow_G 1
|
||||
set Yellow_B 0
|
||||
|
||||
#
|
||||
# ___________2________________
|
||||
# /| /|
|
||||
# / | / |
|
||||
# / | / |
|
||||
# / | / |
|
||||
# / | / |
|
||||
# 1 | 3 |
|
||||
# / | / |
|
||||
# / | / |
|
||||
# / | / |
|
||||
# / | / |
|
||||
# ----------------4------------ |
|
||||
# | | | |
|
||||
# | | | |
|
||||
# | | | |
|
||||
# | 10 | 11
|
||||
# | | | |
|
||||
# | | | |
|
||||
# | | | |
|
||||
# | | | |
|
||||
# | | | |
|
||||
# 9 | 12 |
|
||||
# | |___________6____|__________|
|
||||
# | / | /
|
||||
# | / | /
|
||||
# | / | /
|
||||
# | / | /
|
||||
# | 5 | /
|
||||
# | / | 7
|
||||
# | / | /
|
||||
# | / | /
|
||||
# | / | /
|
||||
# |/ |/
|
||||
# |--------------8------------|
|
||||
#
|
||||
#
|
||||
|
||||
checkcolor ${x1} ${y1} ${Yellow_R} ${Yellow_G} ${Yellow_B}
|
||||
checkcolor ${x2} ${y2} ${Yellow_R} ${Yellow_G} ${Yellow_B}
|
||||
checkcolor ${x3} ${y3} ${Yellow_R} ${Yellow_G} ${Yellow_B}
|
||||
checkcolor ${x4} ${y4} ${Yellow_R} ${Yellow_G} ${Yellow_B}
|
||||
checkcolor ${x7} ${y7} ${Yellow_R} ${Yellow_G} ${Yellow_B}
|
||||
checkcolor ${x8} ${y8} ${Yellow_R} ${Yellow_G} ${Yellow_B}
|
||||
checkcolor ${x9} ${y9} ${Yellow_R} ${Yellow_G} ${Yellow_B}
|
||||
checkcolor ${x11} ${y11} ${Yellow_R} ${Yellow_G} ${Yellow_B}
|
||||
checkcolor ${x12} ${y12} ${Yellow_R} ${Yellow_G} ${Yellow_B}
|
||||
checkcolor ${x5} ${y5} ${Black_R} ${Black_G} ${Black_B}
|
||||
checkcolor ${x6} ${y6} ${Black_R} ${Black_G} ${Black_B}
|
||||
checkcolor ${x10} ${y10} ${Black_R} ${Black_G} ${Black_B}
|
||||
|
||||
set only_screen 0
|
Loading…
x
Reference in New Issue
Block a user