From 0575de6d7ed6880a3492bdb16bcd39699a5311ec Mon Sep 17 00:00:00 2001 From: gka Date: Tue, 27 Feb 2018 13:50:47 +0300 Subject: [PATCH] 0029526: Test Harness command "ReadIges" does not support "read.iges.onlyvisible" mode Modification Test Harness command "ReadIges" to take into account value of the parameter "read.iges.onlyvisible" was made. --- src/IGESControl/IGESControl_Reader.cxx | 8 +++++--- src/XDEDRAW/XDEDRAW_Common.cxx | 4 ++++ tests/bugs/iges/bug29526 | 6 ++++++ 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 tests/bugs/iges/bug29526 diff --git a/src/IGESControl/IGESControl_Reader.cxx b/src/IGESControl/IGESControl_Reader.cxx index 87e599de67..f904b4c217 100644 --- a/src/IGESControl/IGESControl_Reader.cxx +++ b/src/IGESControl/IGESControl_Reader.cxx @@ -60,7 +60,8 @@ IGESControl_Reader::IGESControl_Reader () IGESControl_Controller::Init(); SetWS (new XSControl_WorkSession); SetNorm("IGES"); - theReadOnlyVisible = Standard_False; + Standard_Integer onlyvisible = Interface_Static::IVal("read.iges.onlyvisible"); + theReadOnlyVisible = (onlyvisible == 1); } @@ -75,8 +76,9 @@ IGESControl_Reader::IGESControl_Reader IGESControl_Controller::Init(); SetWS (WS,scratch); SetNorm ("IGES"); - theReadOnlyVisible = Standard_False; -} + Standard_Integer onlyvisible = Interface_Static::IVal("read.iges.onlyvisible"); + theReadOnlyVisible = (onlyvisible == 1); + } //======================================================================= diff --git a/src/XDEDRAW/XDEDRAW_Common.cxx b/src/XDEDRAW/XDEDRAW_Common.cxx index 9d9b338fe9..8c43066b1b 100644 --- a/src/XDEDRAW/XDEDRAW_Common.cxx +++ b/src/XDEDRAW/XDEDRAW_Common.cxx @@ -47,6 +47,7 @@ #include #include #include +#include #include //============================================================ @@ -191,8 +192,11 @@ static Standard_Integer ReadIges (Draw_Interpretor& di, Standard_Integer argc, c DeclareAndCast(IGESControl_Controller,ctl,XSDRAW::Controller()); if (ctl.IsNull()) XSDRAW::SetNorm("IGES"); + IGESCAFControl_Reader reader ( XSDRAW::Session(),Standard_True); + Standard_Integer onlyvisible = Interface_Static::IVal("read.iges.onlyvisible"); + reader.SetReadVisible(onlyvisible == 1); if (argc == 4) { Standard_Boolean mode = Standard_True; diff --git a/tests/bugs/iges/bug29526 b/tests/bugs/iges/bug29526 new file mode 100644 index 0000000000..b142743375 --- /dev/null +++ b/tests/bugs/iges/bug29526 @@ -0,0 +1,6 @@ + param read.iges.onlyvisible 1 + newmodel + ReadIges D1 [locate_data_file bug29526.igs] + XGetOneShape a1 D1 + checknbshapes a1 -face 154 + \ No newline at end of file