X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_IGESExport.cpp;h=7cc6a022ffc9fe4c03b897644744a0c3c093cdac;hb=0cf99274b55d2df4c2d547ccdfc6f2e4d6369257;hp=49ed7e96df466db35f9a346836a6131c2fbccc40;hpb=2532fb2df83ee1ddd9ff3e8b381d3788eaa15b69;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_IGESExport.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_IGESExport.cpp index 49ed7e96d..7cc6a022f 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_IGESExport.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_IGESExport.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2022 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -12,23 +12,31 @@ // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #include #include "GeomAlgoAPI_Tools.h" +#include + // OOCT includes #include #include +#include #include +#include +#include + #include #include +#include + //============================================================================= /*! * @@ -140,6 +148,13 @@ bool IGESExport(const std::string& theFileName, IGESControl_Writer ICW( "M", aBrepMode ); // export explicitly in meters Interface_Static::SetCVal( "xstep.cascade.unit", "M" ); +#if OCC_VERSION_LARGE >= 0x07070000 + Interface_Static::SetCVal("write.iges.unit", "M"); + XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info + Standard_Real aScaleFactorMM = UnitsMethods::GetCasCadeLengthUnit(); + ICW.Model()->ChangeGlobalSection().SetCascadeUnit(aScaleFactorMM); +#endif + // 09.03.2010 skl for bug 0020726 // change default value "Average" to "Max" Interface_Static::SetCVal( "write.precision.mode", "Max" );