1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0032391: Draw Harness - missing syntax validation within vseldump

SelectMgr_SelectionImageFiller, SurfaceNormalFiller - pick results from SelectMgr_SortCriterion
instead of calling redundant Matches().
vseldump - added missing syntax error output on incorrect -type parameter.
This commit is contained in:
kgv
2021-05-25 00:08:05 +03:00
committed by bugmaster
parent 604aa3f4b3
commit df23a355c4
2 changed files with 23 additions and 19 deletions

View File

@@ -339,14 +339,19 @@ namespace
}
else
{
const Handle(Select3D_SensitiveEntity)& aPickedEntity = myMainSel->PickedEntity (thePicked);
SelectBasics_PickResult aPickResult;
aPickedEntity->Matches (myMainSel->GetManager(), aPickResult);
Graphic3d_Vec3 aNormal = aPickResult.SurfaceNormal();
const SelectMgr_SortCriterion& aPickedData = myMainSel->PickedData (thePicked);
Graphic3d_Vec3 aNormal = aPickedData.Normal;
aNormal.Normalize();
myImage->SetPixelColor (theCol, theRow, Quantity_ColorRGBA (aNormal.x() * 0.5f + 0.5f,
aNormal.y() * 0.5f + 0.5f,
aNormal.z() * 0.5f + 0.5f, 1.0f));
if (aNormal.Modulus() > 0.0f)
{
myImage->SetPixelColor (theCol, theRow, Quantity_ColorRGBA (aNormal.x() * 0.5f + 0.5f,
aNormal.y() * 0.5f + 0.5f,
aNormal.z() * 0.5f + 0.5f, 1.0f));
}
else
{
myImage->SetPixelColor (theCol, theRow, Quantity_NOC_BLACK);
}
}
}
};