mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-17 23:53:20 +08:00
Added possibility to define patterns that must be present in the test log, so that test is considered OK only if all these patterns are found. New REQUIRED statement is introduced for that, documented in dox/dev_guides/tests/tests.md. Removed all uses of decho and dlog commands, added REQUIRED where necessary. Command xdistcs is modified to output to Tcl instead of cout, and extended to report errors and warnings if distances are greater than tolerance (directly, instead of complex post-processing on Tcl level). DEBUG mode for TODOs was removed (we should have no deviations in Debug mode). Corrected indentation in DrawResources/TestCommands.tcl HTML log will now highlight TODO statement causing IMPROVEMENT status, or REQUIRED statement causing FAIL, by corresponding color.
44 lines
913 B
Plaintext
44 lines
913 B
Plaintext
puts "=========="
|
|
puts "OCC25357"
|
|
puts "=========="
|
|
puts ""
|
|
#######################################################################################
|
|
# STL writer does not check the given shape for existing triangulation and remeshes
|
|
# shape using BRepMesh in force mode
|
|
#######################################################################################
|
|
|
|
set aFile ${imagedir}/${test_image}.stl
|
|
file delete -force ${aFile}
|
|
|
|
set anASCIImode 0
|
|
|
|
ptorus res 10 8
|
|
incmesh res 0.5
|
|
|
|
set LogBefore [trinfo res]
|
|
|
|
writestl res ${aFile} ${anASCIImode}
|
|
|
|
set LogAfter [trinfo res]
|
|
|
|
set status 1
|
|
if { ![file exists ${aFile}] } {
|
|
set status 0
|
|
}
|
|
|
|
# Check file size
|
|
set filesize [ file size ${aFile} ]
|
|
if { ${filesize} == 0 } {
|
|
set status 0
|
|
}
|
|
|
|
if { $LogBefore != $LogAfter } {
|
|
set status 0
|
|
}
|
|
|
|
if {$status == 1} {
|
|
puts "OK: STL writer check given shape"
|
|
} else {
|
|
puts "Error: STL writer does not check given shape"
|
|
}
|