mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0030493: Draw, ViewerTest - minor improvement of vdisplay command
vdisplay no longer opens BREP file in case if Draw variable is not found. Draw::Get() unused Complain argument has been removed from method definition. Added Draw::GetExisting() and DBRep::GetExisting() commands never performing picking.
This commit is contained in:
@@ -75,7 +75,7 @@ Standard_Boolean DDF::GetDF (Standard_CString& Name,
|
||||
Handle(TDF_Data)& DF,
|
||||
const Standard_Boolean Complain)
|
||||
{
|
||||
Handle(Standard_Transient) t = Draw::Get(Name, Complain);
|
||||
Handle(Standard_Transient) t = Draw::Get (Name);
|
||||
Handle(DDF_Data) DDF = Handle(DDF_Data)::DownCast (t);
|
||||
//Handle(DDF_Data) DDF = Handle(DDF_Data)::DownCast (Draw::Get(Name, Complain));
|
||||
if (!DDF.IsNull()) {
|
||||
|
@@ -103,8 +103,12 @@ static Standard_Integer DFOpenLabel (Draw_Interpretor& di,
|
||||
{
|
||||
if (n < 2) return 1;
|
||||
|
||||
Handle(DDF_Browser) browser =
|
||||
Handle(DDF_Browser)::DownCast (Draw::Get(a[1], Standard_True));
|
||||
Handle(DDF_Browser) browser = Handle(DDF_Browser)::DownCast (Draw::GetExisting (a[1]));
|
||||
if (browser.IsNull())
|
||||
{
|
||||
std::cout << "Syntax error: browser '" << a[1] << "' not found\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
TDF_Label lab;
|
||||
if (n == 3) TDF_Tool::Label(browser->Data(),a[2],lab);
|
||||
@@ -128,8 +132,12 @@ static Standard_Integer DFOpenAttributeList(Draw_Interpretor& di,
|
||||
{
|
||||
if (n < 3) return 1;
|
||||
|
||||
Handle(DDF_Browser) browser =
|
||||
Handle(DDF_Browser)::DownCast (Draw::Get(a[1], Standard_True));
|
||||
Handle(DDF_Browser) browser = Handle(DDF_Browser)::DownCast (Draw::GetExisting (a[1]));
|
||||
if (browser.IsNull())
|
||||
{
|
||||
std::cout << "Syntax error: browser '" << a[1] << "' not found\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
TDF_Label lab;
|
||||
TDF_Tool::Label(browser->Data(),a[2],lab);
|
||||
@@ -157,8 +165,12 @@ static Standard_Integer DFOpenAttribute (Draw_Interpretor& di,
|
||||
{
|
||||
if (n < 3) return 1;
|
||||
|
||||
Handle(DDF_Browser) browser =
|
||||
Handle(DDF_Browser)::DownCast (Draw::Get(a[1], Standard_True));
|
||||
Handle(DDF_Browser) browser = Handle(DDF_Browser)::DownCast (Draw::GetExisting (a[1]));
|
||||
if (browser.IsNull())
|
||||
{
|
||||
std::cout << "Syntax error: browser '" << a[1] << "' not found\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
const Standard_Integer index = Draw::Atoi(a[2]);
|
||||
TCollection_AsciiString list = browser->OpenAttribute(index);
|
||||
|
Reference in New Issue
Block a user