0032144: Draw Harness - add -silent option to command Close
authormkrylova <mkrylova@opencascade.com>
Tue, 2 Mar 2021 14:22:07 +0000 (17:22 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 5 Mar 2021 14:31:07 +0000 (17:31 +0300)
- Extended command Close with an option -silent
- Extended command Close to handle */-ALL for closing ALL document
- Replaced catch {Close D} by Close D -silent in tests

34 files changed:
src/DDocStd/DDocStd_ApplicationCommands.cxx
src/Draw/Draw.hxx
src/Draw/Draw_VariableCommands.cxx
tests/bugs/caf/bug2269
tests/bugs/caf/bug29452
tests/bugs/iges/bug26047
tests/bugs/step/bug28454_1
tests/bugs/step/bug28454_2
tests/bugs/step/bug30694
tests/bugs/step/bug31000
tests/bugs/step/bug31670_1
tests/bugs/step/bug31825
tests/bugs/step/bug31923
tests/bugs/step/bug32049
tests/bugs/xde/bug25381
tests/bugs/xde/bug28887_2
tests/caf/bugs/D2
tests/de_mesh/gltf_read/begin
tests/de_mesh/gltf_write/begin
tests/de_mesh/gltf_write/helmet
tests/de_mesh/gltf_write/helmetglb
tests/de_mesh/gltf_write/lantern
tests/de_mesh/gltf_write/lanternglb
tests/de_mesh/obj_read/begin
tests/perf/caf/bug5023
tests/perf/caf/bug5023_std
tests/v3d/glsl/distinguish_off
tests/v3d/glsl/pbr_attenuation
tests/v3d/glsl/pbr_tangent_normal
tests/v3d/materials/ior
tests/v3d/materials/materials
tests/v3d/raytrace/helmet
tests/v3d/raytrace/normal_map
tests/v3d/shadows/buggy

index 25832eb..9edcc85 100644 (file)
@@ -326,46 +326,84 @@ static Standard_Integer DDocStd_Close (Draw_Interpretor& theDI,
                                        Standard_Integer  theArgNb,
                                        const char**      theArgVec)
 {   
-  if (theArgNb != 2)
+  bool toComplain = true;
+  NCollection_List<TCollection_AsciiString> aDocNames;
+  for (Standard_Integer anArgIt = 1; anArgIt < theArgNb; ++anArgIt)
   {
-    theDI << "DDocStd_Close : Error\n";
-    return 1;
+    const TCollection_AsciiString anArg (theArgVec[anArgIt]);
+    TCollection_AsciiString anArgCase (anArg);
+    anArgCase.LowerCase();
+    if (anArgCase == "*"
+     || anArgCase == "-all"
+     || anArgCase == "all")
+    {
+      for (NCollection_Map<Handle(Draw_Drawable3D)>::Iterator anIter (Draw::Drawables());
+           anIter.More(); anIter.Next())
+      {
+        if (Handle(DDocStd_DrawDocument) aDrawDocument = Handle(DDocStd_DrawDocument)::DownCast (anIter.Value()))
+        {
+          aDocNames.Append (aDrawDocument->Name());
+        }
+      }
+      if (aDocNames.IsEmpty())
+      {
+        return 0;
+      }
+    }
+    else if (anArgCase == "-silent")
+    {
+      toComplain = false;
+    }
+    else
+    {
+      aDocNames.Append (anArg);
+    }
   }
 
-  Handle(TDocStd_Document) aDoc;
-  Standard_CString aDocName = theArgVec[1];
-  if (!DDocStd::GetDocument (aDocName, aDoc))
+  if (aDocNames.IsEmpty())
   {
+    theDI << "Syntax error: wrong number of arguments";
     return 1;
   }
 
-  TDF_Label aRoot = aDoc->GetData()->Root();
-  Handle(TPrsStd_AISViewer) aDocViewer;
-  if (TPrsStd_AISViewer::Find (aRoot, aDocViewer)
-   && !aDocViewer->GetInteractiveContext().IsNull())
+  Handle(TDocStd_Application) aDocApp = DDocStd::GetApplication();
+  for (NCollection_List<TCollection_AsciiString>::Iterator aDocNameIter (aDocNames);
+       aDocNameIter.More(); aDocNameIter.Next())
   {
-    Handle(V3d_Viewer) aViewer = aDocViewer->GetInteractiveContext()->CurrentViewer();
-    V3d_ListOfView aViews;
-    for (V3d_ListOfViewIterator aViewIter (aDocViewer->GetInteractiveContext()->CurrentViewer()->DefinedViewIterator()); aViewIter.More(); aViewIter.Next())
+    Standard_CString aDocName = aDocNameIter.Value().ToCString();
+    Handle(TDocStd_Document) aDoc;
+    if (DDocStd::GetDocument (aDocName, aDoc, toComplain))
     {
-      aViews.Append (aViewIter.Value());
+      TDF_Label aRoot = aDoc->GetData()->Root();
+      Handle(TPrsStd_AISViewer) aDocViewer;
+      if (TPrsStd_AISViewer::Find (aRoot, aDocViewer)
+      && !aDocViewer->GetInteractiveContext().IsNull())
+      {
+        Handle(V3d_Viewer) aViewer = aDocViewer->GetInteractiveContext()->CurrentViewer();
+        V3d_ListOfView aViews;
+        for (V3d_ListOfViewIterator aViewIter (aDocViewer->GetInteractiveContext()->CurrentViewer()->DefinedViewIterator()); aViewIter.More(); aViewIter.Next())
+        {
+          aViews.Append (aViewIter.Value());
+        }
+        for (V3d_ListOfViewIterator aViewIter (aViews); aViewIter.More(); aViewIter.Next())
+        {
+          Handle(V3d_View) aView = aViewIter.Value();
+          ViewerTest::RemoveView (aView);
+        }
+      }
+      aDocApp->Close (aDoc);
     }
-    for (V3d_ListOfViewIterator aViewIter (aViews); aViewIter.More(); aViewIter.Next())
+    else if (toComplain)
     {
-      Handle(V3d_View) aView = aViewIter.Value();
-      ViewerTest::RemoveView (aView);
+      return 1;
     }
-  }
 
-  Handle(TDocStd_Application) aDocApp = DDocStd::GetApplication();
-
-  aDocApp->Close (aDoc);
-
-  if (Handle(Draw_Drawable3D) aDrawable = Draw::GetExisting (aDocName))
-  {
-    dout.RemoveDrawable (aDrawable);
+    if (Handle(Draw_Drawable3D) aDrawable = Draw::GetExisting (aDocName))
+    {
+      dout.RemoveDrawable (aDrawable);
+    }
+    Draw::Set (aDocName, Handle(Draw_Drawable3D)());
   }
-  Draw::Set (theArgVec[1], Handle(Draw_Drawable3D)());
   return 0;
 }
 
@@ -553,7 +591,12 @@ void DDocStd::ApplicationCommands(Draw_Interpretor& theCommands)
                  __FILE__, DDocStd_Save, g);  
 
   theCommands.Add("Close",
-                 "Close DOC",
+      "Close the specific document or all documents\n"
+      "Close DOC [-silent]"
+      "\n\t\t: Close the specific document."
+      "\n\t\t: -silent not raise an exception or print error message for an empty document \n"
+      "Close *"
+      "\n\t\t: Close all open documents.",
                  __FILE__, DDocStd_Close, g);   
 
   theCommands.Add("IsInSession",
index 1b37fe0..338682b 100644 (file)
@@ -18,6 +18,7 @@
 #define _Draw_HeaderFile
 
 #include <Draw_Interpretor.hxx>
+#include <NCollection_Map.hxx>
 #include <Quantity_ColorRGBA.hxx>
 #include <Standard_Handle.hxx>
 
@@ -78,6 +79,9 @@ public: //! @name Tcl variables management tools
   //! Sets a TCL string variable
   Standard_EXPORT static void Set (const Standard_CString Name, const Standard_CString val);
 
+  //! Returns a map of Draw_Drawable3D variables.
+  Standard_EXPORT static const NCollection_Map<Handle(Draw_Drawable3D)>& Drawables();
+
 public: //! @name argument parsing tools
   
   //! Converts numeric expression, that can involve DRAW
index be21f0d..e00dcd5 100644 (file)
@@ -42,28 +42,29 @@ extern Draw_Viewer dout;
 #include <OSD_Environment.hxx>
 #include <OSD_OpenFile.hxx>
 
-Standard_Boolean Draw_ParseFailed;
+Standard_Boolean Draw_ParseFailed = Standard_True;
 
 static Standard_Boolean autodisp = Standard_True;
-static Standard_Boolean repaint2d,repaint3d;
+static Standard_Boolean repaint2d = Standard_False, repaint3d = Standard_False;
 
-//===============================================
-// dictionary of variables
-// Variables are stored in a map Integer, Transient
-// The Integer Value is the content of the TCl variable 
-//===============================================
-
-static NCollection_Map<Handle(Draw_Drawable3D)> theVariables;
+//! Returns dictionary of variables
+//! Variables are stored in a map Integer, Transient.
+//! The Integer Value is the content of the Tcl variable.
+static NCollection_Map<Handle(Draw_Drawable3D)>& Draw_changeDrawables()
+{
+  static NCollection_Map<Handle(Draw_Drawable3D)> theVariables;
+  return theVariables;
+}
 
 //=======================================================================
 //function : FindVariable
 //purpose  : 
 //=======================================================================
 
-static Standard_Integer p_id;
-static Standard_Integer p_X;
-static Standard_Integer p_Y;
-static Standard_Integer p_b;
+static Standard_Integer p_id = 0;
+static Standard_Integer p_X = 0;
+static Standard_Integer p_Y = 0;
+static Standard_Integer p_b = 0;
 static const char* p_Name = "";
 
 //=======================================================================
@@ -234,15 +235,18 @@ static Standard_Integer erase(Draw_Interpretor& di, Standard_Integer n, const ch
        }
       }
     }
-    
+
     // sauvegarde des proteges visibles
     Draw_SequenceOfDrawable3D prot;
-    NCollection_Map<Handle(Draw_Drawable3D)>::Iterator aMapIt (theVariables);
-    for (; aMapIt.More(); aMapIt.Next()) {
+    for (NCollection_Map<Handle(Draw_Drawable3D)>::Iterator aMapIt (Draw::Drawables()); aMapIt.More(); aMapIt.Next())
+    {
       const Handle(Draw_Drawable3D)& D = aMapIt.Key();
-      if (!D.IsNull()) {
-       if (D->Protected() && D->Visible())
-         prot.Append(D);
+      if (!D.IsNull())
+      {
+        if (D->Protected() && D->Visible())
+        {
+          prot.Append(D);
+        }
       }
     }
   
@@ -654,7 +658,10 @@ void Draw::Set(const Standard_CString name,
 static char* tracevar(ClientData CD, Tcl_Interp*,const char* name,const char*, int)
 {
   // protect if the map was destroyed before the interpretor
-  if (theVariables.IsEmpty()) return NULL;
+  if (Draw::Drawables().IsEmpty())
+  {
+    return NULL;
+  }
 
   Draw_Interpretor& aCommands = Draw::GetInterpretor();
 
@@ -678,7 +685,7 @@ static char* tracevar(ClientData CD, Tcl_Interp*,const char* name,const char*, i
     }
     Tcl_UntraceVar(aCommands.Interp(),name,TCL_TRACE_UNSETS | TCL_TRACE_WRITES,
                    tracevar,CD);
-    theVariables.Remove(D);
+    Draw_changeDrawables().Remove(D);
     return NULL;
   }
 }
@@ -706,7 +713,7 @@ void Draw::Set(const Standard_CString name,
                        tracevar, NULL);
     Handle(Draw_Drawable3D) anOldD(reinterpret_cast<Draw_Drawable3D*>(aCD));
     if (!anOldD.IsNull()) {
-      if (theVariables.Contains(anOldD) && anOldD->Protected()) {
+      if (Draw::Drawables().Contains(anOldD) && anOldD->Protected()) {
         std::cout << "variable is protected" << std::endl;
         return;
       }
@@ -716,7 +723,7 @@ void Draw::Set(const Standard_CString name,
     Tcl_UnsetVar(aCommands.Interp(),name,0);
 
     if (!D.IsNull()) {
-      theVariables.Add(D);
+      Draw_changeDrawables().Add(D);
       D->Name(Tcl_SetVar(aCommands.Interp(),name,name,0));
     
       // set the trace function
@@ -760,7 +767,7 @@ Handle(Draw_Drawable3D) Draw::getDrawable (Standard_CString& theName,
   {
     ClientData aCD = Tcl_VarTraceInfo (Draw::GetInterpretor().Interp(), theName, TCL_TRACE_UNSETS | TCL_TRACE_WRITES, tracevar, NULL);
     Handle(Draw_Drawable3D) aDrawable = reinterpret_cast<Draw_Drawable3D*>(aCD);
-    return theVariables.Contains (aDrawable)
+    return Draw::Drawables().Contains (aDrawable)
          ? aDrawable
          : Handle(Draw_Drawable3D)();
   }
@@ -1120,6 +1127,16 @@ void Draw::Set(const Standard_CString Name, const Standard_CString val)
   //
   Tcl_SetVar(Draw::GetInterpretor().Interp(), pName, pVal, 0);
 }
+
+//=======================================================================
+//function : Drawables
+//purpose  :
+//=======================================================================
+const NCollection_Map<Handle(Draw_Drawable3D)>& Draw::Drawables()
+{
+  return Draw_changeDrawables();
+}
+
 //=======================================================================
 // Command management
 // refresh the screen
index 435ec56..8382378 100644 (file)
@@ -22,7 +22,7 @@ puts ""
 #set aTestName "OCC2269"
 #set WorkDirectory ${filedir}
 #set aFile $WorkDirectory/${aTestName}.${FileSuffix}
-#catch {Close D}
+#Close D -silent
 
 set IsGood 1
 Open [locate_data_file OCC2269.xml] DD
index df575e5..5e188d6 100644 (file)
@@ -12,7 +12,7 @@ puts "REQUIRED ALL: Cannot retrieve real member for RealArray attribute"
 set BugNumber OCC29452
 set file [locate_data_file bug29452.xml]
 
-catch {Close D}
+Close D -silent
 set res [Open $file D]
 
 set real [GetReal D 0:1]
index 3babbbc..30afb37 100644 (file)
@@ -4,8 +4,7 @@ puts "============"
 
 pload MODELING VISUALIZATION OCAF XDE
 
-catch { Close D }
-catch { Close D_Cope }
+Close D D_Cope -silent
 
 # create original
 box b 0 -20 -10 100 40 20
index 0c85633..45d7842 100644 (file)
@@ -38,9 +38,7 @@ proc fileCreateAndCompare { thePathFrom theUtfPathTo theCpPathTo theNameFrom the
   if { [GetName U   0:1:1:1] != "$theNameTo" } { puts "Error: unable to read UTF-8  STEP" }
   if { [GetName ISO 0:1:1:1] != "$theNameTo" } { puts "Error: unable to read $theCodePage STEP" }
   if { [GetName A   0:1:1:1] == "$theNameTo" } { puts "Error: broken test case" }
-  catch { Close A }
-  catch { Close U }
-  catch { Close ISO }
+  Close A U ISO -silent
 }
 
 pload XDE OCAF MODELING VISUALIZATION
@@ -73,10 +71,7 @@ set iso8859_8 [encoding convertfrom utf-8 "\xc2\xb1\xd7\xa4\xd7\x9e\xd7\x9c\xd7\
 set iso8859_9 [encoding convertfrom utf-8 "\xc4\x9f\xc5\x9f\xc4\x9e\xc5\x9e\xc3\x86"]
 
 box b 1 2 3
-catch { Close A }
-catch { Close T }
-catch { Close U }
-catch { Close CP }
+Close A T U CP -silent
 
 XNewDoc   T
 XAddShape T b 0
index 102f4b0..7467903 100644 (file)
@@ -5,7 +5,7 @@ puts "================"
 puts ""
 
 pload OCAF
-catch {Close D}
+Close D -silent
 
 # Read File
 ReadStep D [locate_data_file bug28454_directives.stp]
index 9dc8c4d..01c5718 100644 (file)
@@ -31,10 +31,7 @@ set aTmpFileGb   "${imagedir}/${casename}-tmp-gb.stp"
 # 国标
 set aName [encoding convertfrom unicode "\xFD\x56\x07\x68"]
 box b 1 2 3
-catch { Close A }
-catch { Close T }
-catch { Close U }
-catch { Close G }
+Close A T U G -silent
 XNewDoc   T
 XAddShape T b 0
 XSetColor T b 1 0 0
index 0e48393..b3c658a 100644 (file)
@@ -4,7 +4,7 @@ puts "# ====================================================================="
 puts ""
 
 pload OCAF
-catch { Close D }
+Close D -silent
 
 # Read file
 ReadStep D [locate_data_file bug31000_InSensitive.stp]
index a98cb37..17e22ca 100644 (file)
@@ -38,9 +38,7 @@ proc fileCreateAndCompare { thePathFrom theUtfPathTo theCpPathTo theNameFrom the
   if { [GetName U  0:1:1:1] != "$theNameTo" } { puts "Error: unable to read UTF-8  STEP" }
   if { [GetName CP 0:1:1:1] != "$theNameTo" } { puts "Error: unable to read $theCodePage STEP" }
   if { [GetName A  0:1:1:1] == "$theNameTo" } { puts "Error: broken test case" }
-  catch { Close A }
-  catch { Close U }
-  catch { Close CP }
+  Close A U CP -silent
 }
 
 pload XDE OCAF MODELING VISUALIZATION
@@ -73,10 +71,7 @@ set aBaltName [encoding convertfrom utf-8 "\x50\xc4\x81\x72\x62\x61\x75\x64\x65"
 set aViettName [encoding convertfrom utf-8 "\u0054\u0068\u00ed \u006e\u0067\u0068\u0069\u1ec7\u006d"]
 
 box b 1 2 3
-catch { Close A }
-catch { Close T }
-catch { Close U }
-catch { Close CP }
+Close A T U CP -silent
 
 XNewDoc   T
 XAddShape T b 0
index b05c962..9cf0b89 100644 (file)
@@ -5,8 +5,7 @@ puts ""
 
 pload OCAF
 param write.step.schema AP242DIS
-catch { Close D_First }
-catch { Close D_Sec }
+Close D_First D_Sec -silent
 
 # Read file
 set Path ${imagedir}/${casename}.stp
index 4ddd385..edc3fa0 100644 (file)
@@ -31,10 +31,7 @@ set aTmpFileCP850   "${imagedir}/${casename}-tmp-cp850.stp"
 # Überprüfung de codificação
 set aName [encoding convertfrom utf-8 "\xc3\x9c\x62\x65\x72\x70\x72\xc3\xbc\x66\x75\x6e\x67 \x64\x65 \x63\x6f\x64\x69\x66\x69\x63\x61\xc3\xa7\xc3\xa3\x6f"]
 
-catch { Close A }
-catch { Close T }
-catch { Close U }
-catch { Close C }
+Close A T U C -silent
 
 box b 1 2 3
 XNewDoc   T
index e1a3eb6..007e846 100644 (file)
@@ -3,7 +3,7 @@ puts "0032049: Data Exchange - STEP file import problems"
 puts "========================"
 
 pload OCAF
-catch { Close D }
+Close D -silent
 
 # Read file
 ReadStep D [locate_data_file bug32049_sp7_04dx_242.stp]
index be30372..234a1ca 100644 (file)
@@ -4,7 +4,7 @@ puts "============"
 puts ""
 
 pload XDE OCAF VISUALIZATION
-catch { Close D }
+Close D -silent
 ReadStep D [locate_data_file bug25381_test_assembly_invisible.step]
 XShow D
 vaxo
index 26a628b..d9a40ed 100644 (file)
@@ -4,7 +4,7 @@ puts "=========="
 puts ""
 
 pload QAcommands VISUALIZATION DCAF
-catch { Close doc }
+Close Doc -silent
 OCC28887 [locate_data_file bug23384-doc_subshapes.xbf] doc
 
 vclear
index 6c347f0..163756b 100644 (file)
@@ -59,7 +59,7 @@ proc checkarray {name array expected} {
 
 pload TOPTEST
 
-catch {Close D}
+Close D -silent
 
 # Normal test execution
 if !$Create_Doc {
index 72db86b..41994be 100644 (file)
@@ -1,4 +1,4 @@
 pload XDE OCAF MODELING VISUALIZATION
-catch { Close D }
+Close D -silent
 # PBR requires OpenGL 3.0+ on macOS
 if { $::tcl_platform(os) == "Darwin" } { vcaps -core }
index 72db86b..41994be 100644 (file)
@@ -1,4 +1,4 @@
 pload XDE OCAF MODELING VISUALIZATION
-catch { Close D }
+Close D -silent
 # PBR requires OpenGL 3.0+ on macOS
 if { $::tcl_platform(os) == "Darwin" } { vcaps -core }
index a974f7c..a2e9f91 100644 (file)
@@ -3,7 +3,7 @@ puts "0030953: Data Exchange - implement export of mesh data into glTF 2.0 forma
 puts "Test case exporting glTF model into glTF file."
 puts "========"
 
-catch { Close D1 }
+Close D1 -silent
 ReadGltf D1 [locate_data_file bug30691_DamagedHelmet.gltf]
 
 set aTmpGltfBase "${imagedir}/${casename}_tmp"
index 55c06b8..eda6d78 100644 (file)
@@ -3,7 +3,7 @@ puts "0031703: Data Exchange, RWGltf_CafWriter - add option putting textures ins
 puts "Test case exporting glTF model into GLB file."
 puts "========"
 
-catch { Close D1 }
+Close D1 -silent
 ReadGltf D1 [locate_data_file bug30691_DamagedHelmet.gltf]
 
 set aTmpGltfBase "${imagedir}/${casename}_tmp"
index fb9eaa2..e1bd11f 100644 (file)
@@ -2,7 +2,7 @@ puts "========"
 puts "0031816: Data Exchange - RWMesh_MaterialMap::CopyTexture() copies glb file instead of a texture inside it"
 puts "========"
 
-catch { Close D1 }
+Close D1 -silent
 ReadGltf D1 [locate_data_file bug30691_Lantern.glb]
 
 set aTmpGltfBase "${imagedir}/${casename}_tmp"
index f8650fa..170fc37 100644 (file)
@@ -3,7 +3,7 @@ puts "0031703: Data Exchange, RWGltf_CafWriter - add option putting textures ins
 puts "Test case exporting glTF model into GLB file."
 puts "========"
 
-catch { Close D1 }
+Close D1 -silent
 ReadGltf D1 [locate_data_file bug30691_Lantern.glb]
 
 set aTmpGltfBase "${imagedir}/${casename}_tmp"
index 72db86b..41994be 100644 (file)
@@ -1,4 +1,4 @@
 pload XDE OCAF MODELING VISUALIZATION
-catch { Close D }
+Close D -silent
 # PBR requires OpenGL 3.0+ on macOS
 if { $::tcl_platform(os) == "Darwin" } { vcaps -core }
index 54e6782..2f24805 100644 (file)
@@ -11,7 +11,7 @@ set aFile [locate_data_file OCC5023.cbf]
 puts "Info: Restore the document"
 
 if [info exists DD] {
-    catch {Close DD}; unset DD
+    Close DD -silent; unset DD
 }
 
 dchrono h restart
index a7cf383..b0611e2 100644 (file)
@@ -11,7 +11,7 @@ set aFile [locate_data_file OCC5023.std]
 puts "Info: Restore the document"
 
 if [info exists DD] {
-    catch {Close DD}; unset DD
+    Close DD -silent; unset DD
 }
 
 dchrono h restart
index 098c70f..af105dc 100644 (file)
@@ -6,7 +6,7 @@ pload MODELING OCAF XDE
 box b 10 10 10
 vclear
 vinit View1
-catch { Close D }
+Close D -silent
 NewDocument D BinXCAF
 XAddShape D b
 XSetColor D b BLUE
index 6b3ecff..d34792a 100644 (file)
@@ -8,7 +8,7 @@ pload XDE OCAF VISUALIZATION MODELING
 # PBR doesn't work with Compatible Profile on macOS
 if { $::tcl_platform(os) == "Darwin" } { vcaps -core }
 
-catch { Close D }
+Close D -silent
 
 vclear
 vclose ALL
index d87d9b1..e371c6c 100644 (file)
@@ -19,7 +19,7 @@ vrenderparams -shadingModel PBR
 vlight -clear
 vlight -add ambient
 
-catch { Close D }
+Close D -silent
 ReadGltf D [locate_data_file bug31302_NormalTangentTest.gltf]
 XDisplay -dispmode 1 D
 
index 87180d3..537a2b4 100644 (file)
@@ -13,7 +13,7 @@ psphere s3 0.5
 ttranslate s1 1 0 0
 ttranslate s2 2 0 0
 ttranslate s3 3 0 0
-catch { Close D }
+Close D -silent
 XNewDoc D
 set l0 [XAddShape D b  0]
 set l1 [XAddShape D s1 0]
index dd2df2c..4b98218 100644 (file)
@@ -5,7 +5,7 @@ puts "========"
 
 pload XDE OCAF MODELING VISUALIZATION
 
-catch { Close D }
+Close D -silent
 vclear
 vinit View1
 vaxo
index d547ae2..35c9398 100644 (file)
@@ -3,7 +3,7 @@ puts "0031096: Visualization, TKOpenGl - support metallic-roughness texture mapp
 puts "========"
 
 pload XDE OCAF MODELING VISUALIZATION
-catch { Close D }
+Close D -silent
 ReadGltf D [locate_data_file bug30691_DamagedHelmet.gltf]
 
 vclear
index f2b6ff8..f9e2448 100644 (file)
@@ -3,7 +3,7 @@ puts "0031275: Visualization, TKOpenGl - handle normal-map texture with Path-Tra
 puts "========"
 
 pload XDE OCAF MODELING VISUALIZATION
-catch { Close D }
+Close D -silent
 ReadGltf D [locate_data_file bug31275_SphereWithNormalMap.glb]
 
 vclear
index a5806f6..ec23299 100644 (file)
@@ -5,7 +5,7 @@ puts "========"
 
 pload MODELING VISUALIZATION XDE OCAF
 if { $::tcl_platform(os) == "Darwin" } { vcaps -core }
-catch {Close D}
+Close D -silent
 ReadGltf D [locate_data_file bug30691_Buggy.glb]
 vclear
 vinit View1