]> OCCT Git - occt-copy.git/commitdiff
Bug#209: Some IGES Files do not import correctly to OCCT 7.1
authorgka <gka@opencascade.com>
Mon, 26 Feb 2018 13:27:46 +0000 (16:27 +0300)
committergka <gka@opencascade.com>
Mon, 26 Feb 2018 13:32:30 +0000 (16:32 +0300)
To read only visible roots from IGES file in the XCAF document Test Harness command "ReadIges" was modified to take into account value of the Test Harness parameter "read.iges.onlyvisible".

src/XDEDRAW/XDEDRAW_Common.cxx

index 9b347cc8ccd6870a2ce90d7e399844832e750140..613a2780ac48647148b117054036b1373a192218 100644 (file)
@@ -47,6 +47,7 @@
 #include <XCAFDoc_Editor.hxx>
 #include <TDF_Tool.hxx>
 #include <TopoDS_Shape.hxx>
+#include <Interface_Static.hxx>
 
 #include <stdio.h>
 //============================================================
@@ -191,9 +192,10 @@ static Standard_Integer ReadIges (Draw_Interpretor& di, Standard_Integer argc, c
   
   DeclareAndCast(IGESControl_Controller,ctl,XSDRAW::Controller());
   if (ctl.IsNull()) XSDRAW::SetNorm("IGES");
-
+  Standard_Integer readOnlyVisible = Interface_Static::IVal("read.iges.onlyvisible");
   IGESCAFControl_Reader reader ( XSDRAW::Session(),Standard_True);
-  
+  reader.SetReadVisible(readOnlyVisible);
   if (argc == 4) {
     Standard_Boolean mode = Standard_True;
     for ( Standard_Integer i = 0; argv[3][i] ; i++ )