mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +03:00
0031190: Modeling Algorithms - progress indication in GeomPlate is inconsistent
Added ability to display progress indicator in plate commands Added tests
This commit is contained in:
33
tests/lowalgos/progress/A1
Normal file
33
tests/lowalgos/progress/A1
Normal file
@@ -0,0 +1,33 @@
|
||||
puts "========"
|
||||
puts "0031190: Modeling Algorithms - progress indication in GeomPlate is inconsistent"
|
||||
puts "========"
|
||||
|
||||
plane p
|
||||
trim p p -1 3 -1 3
|
||||
mkface p p
|
||||
|
||||
beziercurve c1 3 0 0 0 1 0 1 2 0 0
|
||||
mkedge e1 c1
|
||||
tcopy e1 e2
|
||||
tcopy e1 e3
|
||||
|
||||
ttranslate e2 0 2 0
|
||||
trotate e3 0 0 0 0 0 1 90
|
||||
tcopy e3 e4
|
||||
ttranslate e4 2 0 0
|
||||
|
||||
# Configurate XProgress
|
||||
XProgress +t
|
||||
|
||||
# create the surface
|
||||
set output [gplate r1 4 0 p e1 0 e2 0 e3 0 e4 0]
|
||||
|
||||
# Test data
|
||||
set ctr {"0%" "Calculating the surface filled" "Plate_Plate::SolveTI1()" "math_Gauss LU_Decompose" "100%" }
|
||||
|
||||
foreach data ${ctr} {
|
||||
if ![regexp $data $output] {
|
||||
puts "Error: gplate command: Mismatch data on '$data'"
|
||||
break
|
||||
}
|
||||
}
|
30
tests/lowalgos/progress/A2
Normal file
30
tests/lowalgos/progress/A2
Normal file
@@ -0,0 +1,30 @@
|
||||
puts "========"
|
||||
puts "0031190: Modeling Algorithms - progress indication in GeomPlate is inconsistent"
|
||||
puts "========"
|
||||
|
||||
beziercurve c1 3 0 0 0 1 0 1 2 0 0
|
||||
mkedge e1 c1
|
||||
tcopy e1 e2
|
||||
ttranslate e2 0 2 0
|
||||
|
||||
beziercurve c2 3 0 0 0 0 1 2 0 2 0
|
||||
mkedge e3 c2
|
||||
tcopy e3 e4
|
||||
ttranslate e4 2 0 0
|
||||
|
||||
# Configurate XProgress
|
||||
XProgress +t
|
||||
|
||||
# create the surface
|
||||
set output [gplate r1 4 0 e1 0 e2 0 e3 0 e4 0]
|
||||
|
||||
# Test data
|
||||
set ctr {"0%" "Calculating the surface filled" "ComputeSurfInit"
|
||||
"Plate_Plate::SolveTI1()" "math_Gauss LU_Decompose" "100%" }
|
||||
|
||||
foreach data ${ctr} {
|
||||
if ![regexp $data $output] {
|
||||
puts "Error: gplate command: Mismatch data on '$data'"
|
||||
break
|
||||
}
|
||||
}
|
40
tests/lowalgos/progress/A3
Normal file
40
tests/lowalgos/progress/A3
Normal file
@@ -0,0 +1,40 @@
|
||||
puts "========"
|
||||
puts "0031190: Modeling Algorithms - progress indication in GeomPlate is inconsistent"
|
||||
puts "========"
|
||||
|
||||
# Generate control points
|
||||
set points {}
|
||||
set i 0
|
||||
for {set j 0} {$j < 300} {incr j; incr i} {
|
||||
point p$i $j 0 0
|
||||
lappend points p$i
|
||||
}
|
||||
for {set j 1} {$j < 300} {incr j; incr i} {
|
||||
point p$i 0 $j 0
|
||||
lappend points p$i
|
||||
}
|
||||
for {set j 0} {$j < 300} {incr j; incr i} {
|
||||
point p$i 300 $j 0
|
||||
lappend points p$i
|
||||
}
|
||||
|
||||
for {set j 0} {$j < 301} {incr j; incr i} {
|
||||
point p$i $j 300 0
|
||||
lappend points p$i
|
||||
}
|
||||
|
||||
# Configurate XProgress
|
||||
XProgress +t
|
||||
|
||||
# create the surface
|
||||
set output [eval gplate res 0 [llength $points] $points]
|
||||
|
||||
# Test data
|
||||
set ctr {"0%" "Calculating the surface filled" "Plate_Plate::SolveTI1()" "math_Gauss LU_Decompose" "100%" }
|
||||
|
||||
foreach data ${ctr} {
|
||||
if ![regexp $data $output] {
|
||||
puts "Error: gplate command: Mismatch data on '$data'"
|
||||
break
|
||||
}
|
||||
}
|
27
tests/lowalgos/progress/A4
Normal file
27
tests/lowalgos/progress/A4
Normal file
@@ -0,0 +1,27 @@
|
||||
puts "========"
|
||||
puts "0031190: Modeling Algorithms - progress indication in GeomPlate is inconsistent"
|
||||
puts "========"
|
||||
|
||||
# Generate control points
|
||||
set n 100
|
||||
set l {}
|
||||
for {set i 0} {$i < $n} {incr i} {
|
||||
point p$i [dval sin(2.*pi*$i/$n)] [dval cos(2.*pi*$i/$n)] [expr abs(1-2.*$i/$n)]
|
||||
lappend l p$i
|
||||
}
|
||||
|
||||
# Configurate XProgress
|
||||
XProgress +t
|
||||
|
||||
# create the surface
|
||||
set output [eval gplate r 0 [llength $l] $l]
|
||||
|
||||
# Test data
|
||||
set ctr {"0%" "Calculating the surface filled" "Plate_Plate::SolveTI1()" "math_Gauss LU_Decompose" "100%" }
|
||||
|
||||
foreach data ${ctr} {
|
||||
if ![regexp $data $output] {
|
||||
puts "Error: gplate command: Mismatch data on '$data'"
|
||||
break
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user