1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00

0027905: Visualization - randomly directed arrows on test v3d mesh B7

Behaviour of command meshvectors is stable now.
It shows default vector (0,0,1) for volume entity.
Test cases for issue CR27905
This commit is contained in:
ski 2016-10-06 12:30:39 +03:00 committed by apn
parent 95ae6ebb1b
commit 90b858262b
2 changed files with 29 additions and 3 deletions

View File

@ -965,9 +965,11 @@ static Standard_Integer meshvectors( Draw_Interpretor& di,
for ( ; anIter.More(); anIter.Next() )
{
Standard_Boolean IsValidData = Standard_False;
if (anIsElement)
IsValidData = aMesh->GetDataSource()->GetNormal(anIter.Key(), 3, aCoords.ChangeValue(1), aCoords.ChangeValue(2), aCoords.ChangeValue(3));
else
if (anIsElement) {
aMesh->GetDataSource()->GetGeomType(anIter.Key(), anIsElement, aEntType);
if (aEntType == MeshVS_ET_Face)
IsValidData = aMesh->GetDataSource()->GetNormal(anIter.Key(), 3, aCoords.ChangeValue(1), aCoords.ChangeValue(2), aCoords.ChangeValue(3));
} else
IsValidData = aMesh->GetDataSource()->GetGeom(anIter.Key(), Standard_False, aCoords, aNbNodes, aEntType);
gp_Vec aNorm;

24
tests/bugs/demo/bug27905 Executable file
View File

@ -0,0 +1,24 @@
puts "============"
puts "CR27905"
puts "============"
puts ""
##########################################################################################################
# Visualization - randomly directed arrows on test v3d mesh B7
##########################################################################################################
pload XSDRAW
vinit
vclear
mesh3delem m
vsetdispmode m 5
meshvectors m -mode elem -maxlen 10 -color green -arrowpart 0.5 -issipmle 0
vdump ${imagedir}/${test_image}_1.png
meshvectors m -mode elem -maxlen 10 -color green -arrowpart 0.5 -issipmle 0
vdump ${imagedir}/${test_image}_2.png
meshvectors m -mode elem -maxlen 10 -color green -arrowpart 0.5 -issipmle 0
vdump ${imagedir}/${test_image}_3.png