1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-05-31 11:15:31 +03:00
occt/tests/bugs/vis/bug23200
osa 4c5133866b 0023200: Visualization - prevent multiple triangulating of a shape that already has been triangulated
Add new flag IsAutoTriangulated to Prs3d_Drawer. It is True by default.
If this flag is True automatic re-triangulation with deflection-check logic will be applied.
Else this feature will be disable and triangulation is expected to be computed by application itself.

Change the syntax of vdefalts command.
Add new parameter -autoTriang for check of AutoTriangulated functionality.

Adjust camera position in test case bugs/xde/bug23969
2015-03-05 14:49:32 +03:00

55 lines
1.5 KiB
Plaintext

puts "============"
puts "CR23200"
puts "Check that the shape is automatic re-triangulated with deflection-check logic"
puts "in case of enabled auto triangulation feature (its own triangulation can be lost)."
puts "And it keeps its already computed triangulation"
puts "in case of disabled auto triangulation feature."
puts "============"
puts ""
set aDefaultShape $imagedir/${casename}_shape.png
set aShapeAutoTr $imagedir/${casename}_shape_auto_triangulation.png
set aShapeNotAutoTr $imagedir/${casename}_shape_not_auto_triangulation.png
vinit View1
vclear
vaxo
vsetdispmode 1
vdefaults -autoTriang on
psphere s 0.5
vdisplay s
vfit
vdump $aDefaultShape
vclear
tclean s
incmesh s 0.1 -a 45
set tri_info [trinfo s]
regexp { +([-0-9.+eE]+) +triangles} $tri_info full triIncmesh1
vdisplay s
set tri_info [trinfo s]
regexp { +([-0-9.+eE]+) +triangles} $tri_info full triAutoTrShape
vfit
vdump $aShapeAutoTr
vclear
vdefaults -autoTriang off
tclean s
incmesh s 0.1 -a 45
set tri_info [trinfo s]
regexp { +([-0-9.+eE]+) +triangles} $tri_info full triIncmesh2
vdisplay s
set tri_info [trinfo s]
regexp { +([-0-9.+eE]+) +triangles} $tri_info full triNotAutoTrShape
vfit
vdump $aShapeNotAutoTr
if {${triIncmesh1} == ${triAutoTrShape}} {
puts "ERROR : Test failed. Incorrect triangulation in case of enabled auto triangulation feature."
}
if {${triIncmesh2} != ${triNotAutoTrShape}} {
puts "ERROR : Test failed. Incorrect triangulation in case of disabled auto triangulation feature."
}