mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0024961: MeshVS: revision of DRAW commands
meshfromstl - display MeshVS_Mesh object in a way consistent with vdisplay command meshdel - deleted, vremove to be used instead meshshowall - set empty maps of hidden IDs instead of null handles meshhidesel - initialize the maps of hidden IDs to avoid exception meshmat - add optional transparency argument and enable transparency in the viewer if not yet done meshvectors - command for testing VectorPrsBuilder added MeshVS: DRAW commands improving Updating test cases due to previous changes Small bug in MeshVS_ElementalColorPrsBuilder fixed vselmode fix Small correction of test cases for issue CR24961
This commit is contained in:
@@ -4001,7 +4001,7 @@ static Standard_Integer VSetSelectionMode (Draw_Interpretor& /*di*/,
|
||||
Handle(AIS_InteractiveContext) anAISContext = ViewerTest::GetAISContext();
|
||||
if (anAISContext.IsNull())
|
||||
{
|
||||
std::cerr << "Call vinit before!\n";
|
||||
std::cerr << "Call vinit before!" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -4009,7 +4009,7 @@ static Standard_Integer VSetSelectionMode (Draw_Interpretor& /*di*/,
|
||||
if (theArgc != 3 && theArgc != 4)
|
||||
{
|
||||
std::cerr << "vselmode error : expects at least 2 arguments.\n"
|
||||
<< "Type help "<< theArgv[0] <<" for more information.";
|
||||
<< "Type help "<< theArgv[0] <<" for more information." << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -4028,7 +4028,7 @@ static Standard_Integer VSetSelectionMode (Draw_Interpretor& /*di*/,
|
||||
Handle(AIS_InteractiveObject) anIO = Handle(AIS_InteractiveObject)::DownCast (GetMapOfAIS().Find2 (aNameIO));
|
||||
if (anIO.IsNull())
|
||||
{
|
||||
std::cerr << "vselmode error : object name is used for non AIS viewer\n";
|
||||
std::cerr << "vselmode error : object name is used for non AIS viewer" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
aTargetIOs.Append (anIO);
|
||||
@@ -4042,6 +4042,32 @@ static Standard_Integer VSetSelectionMode (Draw_Interpretor& /*di*/,
|
||||
anAISContext->CloseLocalContext();
|
||||
}
|
||||
|
||||
if (aSelectionMode == 0)
|
||||
{
|
||||
if (toTurnOn)
|
||||
{
|
||||
for (AIS_ListIteratorOfListOfInteractive aTargetIt (aTargetIOs); aTargetIt.More(); aTargetIt.Next())
|
||||
{
|
||||
const Handle(AIS_InteractiveObject)& anIO = aTargetIt.Value();
|
||||
if (!InList (anAISContext, anIO, aSelectionMode))
|
||||
{
|
||||
anAISContext->Activate (anIO);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (AIS_ListIteratorOfListOfInteractive aTargetIt (aTargetIOs); aTargetIt.More(); aTargetIt.Next())
|
||||
{
|
||||
const Handle(AIS_InteractiveObject)& anIO = aTargetIt.Value();
|
||||
if (InList (anAISContext, anIO, aSelectionMode))
|
||||
{
|
||||
anAISContext->Deactivate (anIO);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (aSelectionMode != 0 && toTurnOn) // Turn on specified mode
|
||||
{
|
||||
if (!anAISContext->HasOpenedContext())
|
||||
|
Reference in New Issue
Block a user