mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
40 lines
1.2 KiB
Plaintext
40 lines
1.2 KiB
Plaintext
# Set flag dump_file to 1 in order to regenerate script files with actual data
|
|
# used as reference. In this mode all tests intentionally report failure.
|
|
set dump_file 0
|
|
|
|
# Read original file
|
|
if { [string length $filename] > 1} {
|
|
set path_file [locate_data_file $filename]
|
|
if { [catch { ReadFile D $path_file } catch_result] } {
|
|
set err_msg "Error: file was not read - exception "
|
|
puts $err_msg
|
|
}
|
|
}
|
|
|
|
# mesh the shape before Gltf writing
|
|
XGetOneShape a D
|
|
incmesh a 0.1
|
|
|
|
# write file
|
|
WriteGltf D $imagedir/${casename}_D_First.gltf
|
|
set aSize [file size $imagedir/${casename}_D_First.gltf]
|
|
|
|
if { $dump_file == 1 } {
|
|
set fd_stream [open $dirname/$groupname/$gridname/$casename w]
|
|
puts $fd_stream "# !!!! This file is generated automatically, do not edit manually! See end script"
|
|
puts $fd_stream "set filename $filename"
|
|
puts $fd_stream "set ref_size $aSize"
|
|
close $fd_stream
|
|
puts "Error : Running in regeneration mode, comparison was not performed!"
|
|
} else {
|
|
if {$aSize != $ref_size} {
|
|
puts "Error: Wrong file size $aSize instead of $ref_size"
|
|
}
|
|
}
|
|
|
|
# finalize scenario
|
|
Close D
|
|
file delete $imagedir/${casename}_D_First.gltf
|
|
file delete $imagedir/${casename}_D_First.bin
|
|
puts "TEST COMPLETED"
|