Test bugs vis bug26357 is revised to check colors in more robust way.
In tests bugs vis bug29091_*, size of produced file is checked to be within range of known valid sizes, rather than hard-coded (per-platform) exact sizes.
FPE signals are disabled for test bugs vis bug29127 to prevent exceptions cause by software OpenGl driver.
File data/occ/Box.brep is removed to avoid confusion with file box.brep in public data files used in tests.
Two additional non-alphabetic-order combinations of complex types are handled in RWStepAP214_ReadWriteModule.cxx
+++ /dev/null
-DBRep_DrawableShape
-
-CASCADE Topology V1, (c) Matra-Datavision
-Locations 0
-Curve2ds 24
-1 0 0 1 0
-1 0 0 1 0
-1 50 0 0 -1
-1 0 0 0 1
-1 0 -80 1 0
-1 0 0 1 0
-1 0 0 0 -1
-1 0 0 0 1
-1 0 0 1 0
-1 0 77 1 0
-1 50 0 0 -1
-1 77 0 0 1
-1 0 -80 1 0
-1 0 77 1 0
-1 0 0 0 -1
-1 77 0 0 1
-1 0 0 0 1
-1 0 0 1 0
-1 50 0 0 1
-1 0 0 1 0
-1 0 0 0 1
-1 0 80 1 0
-1 50 0 0 1
-1 0 80 1 0
-Curves 12
-1 821 803 0 0 0 1
-1 821 803 50 0 1 0
-1 821 883 0 0 0 1
-1 821 803 0 0 1 0
-1 898 803 0 0 0 1
-1 898 803 50 0 1 0
-1 898 883 0 0 0 1
-1 898 803 0 0 1 0
-1 821 803 0 1 0 0
-1 821 803 50 1 0 0
-1 821 883 0 1 0 0
-1 821 883 50 1 0 0
-Polygon3D 0
-PolygonOnTriangulations 0
-Surfaces 6
-1 821 803 0 1 0 0 0 0 1 0 -1 0
-1 821 803 0 0 1 0 0 0 1 1 0 0
-1 821 803 50 0 0 1 1 0 0 0 1 0
-1 821 883 0 0 1 0 0 0 1 1 0 0
-1 821 803 0 0 0 1 1 0 0 0 1 0
-1 898 803 0 1 0 0 0 0 1 0 -1 0
-Triangulations 0
-
-TShapes 34
-Ve
-1e-007
-821 803 50
-0 0
-
-0101100
-*
-Ve
-1e-007
-821 803 0
-0 0
-
-0101100
-*
-Ed
- 1e-007 1 1 0
-1 1 0 0 50
-2 1 1 0 0 50
-2 2 2 0 0 50
-0
-
-0101000
--34 0 +33 0 *
-Ve
-1e-007
-821 883 50
-0 0
-
-0101100
-*
-Ed
- 1e-007 1 1 0
-1 2 0 0 80
-2 3 1 0 0 80
-2 4 3 0 0 80
-0
-
-0101000
--31 0 +34 0 *
-Ve
-1e-007
-821 883 0
-0 0
-
-0101100
-*
-Ed
- 1e-007 1 1 0
-1 3 0 0 50
-2 5 1 0 0 50
-2 6 4 0 0 50
-0
-
-0101000
--31 0 +29 0 *
-Ed
- 1e-007 1 1 0
-1 4 0 0 80
-2 7 1 0 0 80
-2 8 5 0 0 80
-0
-
-0101000
--29 0 +33 0 *
-Wi
-
-0101000
--32 0 -30 0 +28 0 +27 0 *
-Fa
-0 1e-007 1 0
-
-0111000
-+26 0 *
-Ve
-1e-007
-898 803 50
-0 0
-
-0101100
-*
-Ve
-1e-007
-898 803 0
-0 0
-
-0101100
-*
-Ed
- 1e-007 1 1 0
-1 5 0 0 50
-2 9 6 0 0 50
-2 10 2 0 0 50
-0
-
-0101000
--24 0 +23 0 *
-Ve
-1e-007
-898 883 50
-0 0
-
-0101100
-*
-Ed
- 1e-007 1 1 0
-1 6 0 0 80
-2 11 6 0 0 80
-2 12 3 0 0 80
-0
-
-0101000
--21 0 +24 0 *
-Ve
-1e-007
-898 883 0
-0 0
-
-0101100
-*
-Ed
- 1e-007 1 1 0
-1 7 0 0 50
-2 13 6 0 0 50
-2 14 4 0 0 50
-0
-
-0101000
--21 0 +19 0 *
-Ed
- 1e-007 1 1 0
-1 8 0 0 80
-2 15 6 0 0 80
-2 16 5 0 0 80
-0
-
-0101000
--19 0 +23 0 *
-Wi
-
-0101000
--22 0 -20 0 +18 0 +17 0 *
-Fa
-0 1e-007 6 0
-
-0111000
-+16 0 *
-Ed
- 1e-007 1 1 0
-1 9 0 0 77
-2 17 2 0 0 77
-2 18 5 0 0 77
-0
-
-0101000
--23 0 +33 0 *
-Ed
- 1e-007 1 1 0
-1 10 0 0 77
-2 19 2 0 0 77
-2 20 3 0 0 77
-0
-
-0101000
--24 0 +34 0 *
-Wi
-
-0101000
--14 0 -22 0 +13 0 +32 0 *
-Fa
-0 1e-007 2 0
-
-0111000
-+12 0 *
-Ed
- 1e-007 1 1 0
-1 11 0 0 77
-2 21 4 0 0 77
-2 22 5 0 0 77
-0
-
-0101000
--19 0 +29 0 *
-Ed
- 1e-007 1 1 0
-1 12 0 0 77
-2 23 4 0 0 77
-2 24 3 0 0 77
-0
-
-0101000
--21 0 +31 0 *
-Wi
-
-0101000
--10 0 -18 0 +9 0 +28 0 *
-Fa
-0 1e-007 4 0
-
-0111000
-+8 0 *
-Wi
-
-0101000
--27 0 -10 0 +17 0 +14 0 *
-Fa
-0 1e-007 5 0
-
-0111000
-+6 0 *
-Wi
-
-0101000
--30 0 -9 0 +20 0 +13 0 *
-Fa
-0 1e-007 3 0
-
-0111000
-+4 0 *
-Sh
-
-0101100
--25 0 +15 0 -11 0 +7 0 -5 0 +3 0 *
-So
-
-1100000
-+2 0 *
-
-+1 0
\ No newline at end of file
(types(7).IsEqual(StepType(271)))) {
return 323;
}
+ else if ((types(1).IsEqual(StepType(40))) &&
+ (types(2).IsEqual(StepType(41))) &&
+ (types(3).IsEqual(StepType(240))) &&
+ (types(4).IsEqual(StepType(49))) &&
+ (types(5).IsEqual(StepType(247))) &&
+ (types(6).IsEqual(StepType(144))) &&
+ (types(7).IsEqual(StepType(271)))) {
+ return 323;
+ }
}
// Added by FMA
else if (NbComp == 6) {
(types(3).IsEqual(StepType(336)))) {
return 335;
}
+ else if ((types(1).IsEqual(StepType(169))) &&
+ (types(2).IsEqual(StepType(336))) &&
+ (types(3).IsEqual(StepType(264)))) {
+ return 335;
+ }
else if ((types(1).IsEqual(StepType(143))) &&
(types(2).IsEqual(StepType(188))) &&
(types(3).IsEqual(StepType(246)))) {
vcaps -ffp 1
vexport ${aFile} PDF
-if { [checkplatform -windows] } {
- set refsize 153993
-} else {
- set refsize 144401
-}
+set refsize_min 144000
+set refsize_max 154000
if { [file exists ${aFile}] } {
- puts "Export to PDF file was done"
+ puts "Export to PDF format successful"
set filesize [file size ${aFile}]
- if { $filesize != $refsize } {
- puts "Error: Export to PDF file was done but size of file is incorrect (refsize = $refsize, current = $filesize)."
- puts "Error: Compare content of resulting PDF file with reference."
- puts "Error: Update refsize if it's necessary."
+ if { $filesize < $refsize_min || $filesize > $refsize_max } {
+ puts "Error: Export to PDF file was done but size of file is incorrect"
+ puts " (current = $filesize, expected to be in range \[$refsize_min, $refsize_max\])."
+ puts "Error: Update refsize limits if necessary."
}
} else {
- puts "Faulty : Export to PDF file was not done"
+ puts "Error: Export to PDF format has failed"
}
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
vcaps -ffp 1
vexport ${aFile} PDF
-if { [checkplatform -windows] } {
- set refsize 9087
-} else {
- set refsize 9063
-}
+set refsize_min 9060
+set refsize_max 9090
if { [file exists ${aFile}] } {
- puts "Export to PDF file was done"
+ puts "Export to PDF format successful"
set filesize [file size ${aFile}]
- if { $filesize != $refsize } {
- puts "Error: Export to PDF file was done but size of file is incorrect (refsize = $refsize, current = $filesize)."
- puts "Error: Compare content of resulting PDF file with reference."
- puts "Error: Update refsize if it's necessary."
+ if { $filesize < $refsize_min || $filesize > $refsize_max } {
+ puts "Error: Export to PDF file was done but size of file is incorrect"
+ puts " (current = $filesize, expected to be in range \[$refsize_min, $refsize_max\])."
+ puts "Error: Update refsize limits if necessary."
}
} else {
- puts "Faulty : Export to PDF file was not done"
+ puts "Error: Export to PDF format has failed"
}
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
vcaps -ffp 1
vexport ${aFile} PS
-if { [checkplatform -windows] } {
- set refsize 9568
-} else {
- set refsize 9544
-}
+set refsize_min 9540
+set refsize_max 9570
if { [file exists ${aFile}] } {
- puts "Export to PS format was done"
+ puts "Export to PS format successful"
set filesize [file size ${aFile}]
- if { $filesize != $refsize } {
- puts "Error: Export to PS file was done but size of file is incorrect (refsize = $refsize, current = $filesize)."
- puts "Error: Compare content of resulting PS file with reference."
- puts "Error: Update refsize if it's necessary."
+ if { $filesize < $refsize_min || $filesize > $refsize_max } {
+ puts "Error: Export to PS file was done but size of file is incorrect"
+ puts " (current = $filesize, expected to be in range \[$refsize_min, $refsize_max\])."
+ puts "Error: Update refsize limits if necessary."
}
} else {
- puts "Faulty : Export to PS format was not done"
+ puts "Error: Export to PS format has failed"
}
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
vcaps -ffp 1
vexport ${aFile} EPS
-if { [checkplatform -windows] } {
- set refsize 9512
-} else {
- set refsize 9488
-}
+set refsize_min 9480
+set refsize_max 9520
if { [file exists ${aFile}] } {
- puts "Export to EPS file was done"
+ puts "Export to EPS format successful"
set filesize [file size ${aFile}]
- if { $filesize != $refsize } {
- puts "Error: Export to EPS file was done but size of file is incorrect (refsize = $refsize, current = $filesize)."
- puts "Error: Compare content of resulting EPS file with reference."
- puts "Error: Update refsize if it's necessary."
+ if { $filesize < $refsize_min || $filesize > $refsize_max } {
+ puts "Error: Export to EPS file was done but size of file is incorrect"
+ puts " (current = $filesize, expected to be in range \[$refsize_min, $refsize_max\])."
+ puts "Error: Update refsize limits if necessary."
}
} else {
- puts "Faulty : Export to EPS file was not done"
+ puts "Error: Export to EPS format has failed"
}
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
vexport ${aFile} TEX
if { [file exists ${aFile}] } {
- puts "Export to TEX file was done"
+ puts "Export to TEX file successful"
set filesize [file size ${aFile}]
puts "Size of TEX file = $filesize"
if { $filesize > 1500 } {
- puts "Faulty : Export to TEX file was done but size of file is incorrect"
+ puts "Error : Export to TEX file succeeded but size of file is incorrect"
}
} else {
- puts "Faulty : Export to TEX file was not done"
+ puts "Error : Export to TEX file has failed"
}
vcaps -ffp 1
vexport ${aFile} SVG
-if { [checkplatform -windows] } {
- set refsize 12127
-} else {
- set refsize 12113
-}
+set refsize_min 12110
+set refsize_max 12130
if { [file exists ${aFile}] } {
- puts "Export to SVG file was done"
+ puts "Export to SVG format successful"
set filesize [file size ${aFile}]
- if { $filesize != $refsize } {
- puts "Error: Export to SVG file was done but size of file is incorrect (refsize = $refsize, current = $filesize)."
- puts "Error: Compare content of resulting SVG file with reference."
- puts "Error: Update refsize if it's necessary."
+ if { $filesize < $refsize_min || $filesize > $refsize_max } {
+ puts "Error: Export to SVG file was done but size of file is incorrect"
+ puts " (current = $filesize, expected to be in range \[$refsize_min, $refsize_max\])."
+ puts "Error: Update refsize limits if necessary."
}
} else {
- puts "Faulty : Export to SVG file was not done"
+ puts "Error: Export to SVG format has failed"
}
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
vcaps -ffp 1
vexport ${aFile} PGF
-if { [checkplatform -windows] } {
- set refsize 17918
-} else {
- set refsize 17794
-}
+set refsize_min 17790
+set refsize_max 17920
if { [file exists ${aFile}] } {
- puts "Export to PGF file was done"
+ puts "Export to PGF format successful"
set filesize [file size ${aFile}]
- if { $filesize != $refsize } {
- puts "Error: Export to PGF file was done but size of file is incorrect (refsize = $refsize, current = $filesize)."
- puts "Error: Compare content of resulting PGF file with reference."
- puts "Error: Update refsize if it's necessary."
+ if { $filesize < $refsize_min || $filesize > $refsize_max } {
+ puts "Error: Export to PGF file was done but size of file is incorrect"
+ puts " (current = $filesize, expected to be in range \[$refsize_min, $refsize_max\])."
+ puts "Error: Update refsize limits if necessary."
}
} else {
- puts "Faulty : Export to PGF file was not done"
+ puts "Error: Export to PGF format has failed"
}
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
vfit
vaspects -setwidth 5
-if { "[vreadpixel 183 190 rgb name]" != "RED"
- || "[vreadpixel 314 344 rgb name]" != "RED"
- || "[vreadpixel 26 267 rgb name]" != "RED"
-} {
+if { "[vreadpixel 314 344 rgb name]" != "RED" ||
+ "[vreadpixel 26 267 rgb name]" != "RED" } {
puts "Error : Boundary of face is not changed"
}
puts "============"
-puts "CR26357"
+puts "0026357: Visualization - Panning zooms view if aspect ratio > 1"
puts "============"
puts ""
-#########################################################################
-puts "Panning regression after fixing 0026082"
-#########################################################################
-
box b 100 100 100
+vclear
vinit View1 w=400 h=400
vinit View2 w=200 h=400
vinit View3 w=400 h=200
-vclear
-vaxo
-vdisplay b
+vdisplay -dispMode 1 -highMode 1 b
# Test panning with aspect ratio 1:1
vactivate View1
+vaxo
vfit
vpan 200 0
vmoveto 399 200
-checkcolor 399 200 0 1 1
+if { [vreadpixel 399 200 rgb name] != "DARKTURQUOISE" } { puts "Error: incorrect color after forward panning in View1" }
vpan -200 0
vmoveto 200 200
-checkcolor 200 200 0 1 1
+if { [vreadpixel 200 200 rgb name] != "DARKTURQUOISE" } { puts "Error: incorrect color after backward panning in View1" }
vdump ${imagedir}/${casename}_1.png
# Test panning with aspect ratio 1:2
vactivate View2
+vaxo
vfit
vpan 100 0
vmoveto 199 100
-checkcolor 199 100 0 1 1
+if { [vreadpixel 199 100 rgb name] != "DARKTURQUOISE" } { puts "Error: incorrect color after forward panning in View2" }
vpan -100 0
vmoveto 100 100
-checkcolor 100 100 0 1 1
+if { [vreadpixel 100 100 rgb name] != "DARKTURQUOISE" } { puts "Error: incorrect color after backward panning in View2" }
vdump ${imagedir}/${casename}_2.png
# Test panning with aspect ratio 2:1
vactivate View3
+vaxo
vfit
vpan 200 0
vmoveto 399 100
-checkcolor 399 100 0 1 1
+if { [vreadpixel 399 100 rgb name] != "DARKTURQUOISE" } { puts "Error: incorrect color after forward panning in View3" }
vpan -200 0
vmoveto 200 100
-checkcolor 200 100 0 1 1
+if { [vreadpixel 200 100 rgb name] != "DARKTURQUOISE" } { puts "Error: incorrect color after backward panning in View3" }
vdump ${imagedir}/${casename}_3.png
pload MODELING VISUALIZATION
box b 1 2 3
+
# request software OpenGL implementation - which is OpenGL 1.1 in case of Windows
# (test case is useless for other systems)
vcaps -softMode 1
+
+# disable FPE signals -- these often occur in software OpenGL drivers
+dsetsignal 0
+
vclear
vinit View1
vsetdispmode 1