1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-06-30 12:14:08 +03:00
occt/tests/bugs/xde/bug22670_2
akz b9c1e44004 0025357: STL writer does not check the given shape for existing triangulation and remeshes shape using BRepMesh in force mode.
StlTransfer.cxx, function StlTransfer::BuildIncrementalMesh(...) fills the StlMesh_Mesh. Before this fix the StlTransfer always force meshing of the passed shape.

Now meshing is completely removed from the StlTransfer. StlWriter can return error status now, for example, if a mesh of the passed shape is empty. In this case file will be not created.

Added test case bugs/xde/bug25357

Avoid the warning on gcc compiler.
Test scripts were modified according to the fix.
     1) bug23192, bug22670, bug23193: removed "isParallel" flag from the command
         arguments. Manually meshing of the shape (as far as meshing was removed
         from STL writer).
     2) bug22898: before the fix writestl always remeshes the shape with a
         deflection, related to the boundery box of the shape. For "hammer" shape
         there is a 38.9076 deflection for mesh. Differences between before writing
         and after reading are dedicated to fact that stl writes triangulation as
         an elements of the spahe (like faces, edges etc.)
2015-02-05 14:40:24 +03:00

49 lines
1.3 KiB
Plaintext
Executable File

puts "================"
puts "OCC22670"
puts "================"
puts ""
#######################################################################################
# Regression in the method RWStl::WriteAscii
#######################################################################################
#
puts "================"
puts "OCC22866"
puts "================"
puts ""
#######################################################################################
# Now it is not possible to mesh a shape in parallel mode during the export in STL
#######################################################################################
#
set BugNumber OCC22670
set filepath [locate_data_file OMF6391_box.stl]
if { [catch { readstl res_mesh $filepath } catch_result] } {
puts "Faulty ${BugNumber}: here is reading problem"
} else {
set nbshapes_res_mesh [nbshapes res_mesh]
set aFile $imagedir/${test_image}.stl
catch {exec rm -f ${aFile}}
incmesh res_mesh 0.1
set anASCIImode 0
writestl res_mesh ${aFile} ${anASCIImode}
catch {exec chmod 777 ${aFile}}
readstl result ${aFile}
set nb_v_good 8
set nb_e_good 18
set nb_w_good 12
set nb_f_good 12
set nb_sh_good 1
set nb_sol_good 0
set nb_compsol_good 0
set nb_compound_good 0
set nb_shape_good 51
}
set square 600
set 3dviewer 0