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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user