-// Copyright (C) 2014-2019 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2014-2023 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// KERNEL includes
#include <utilities.h>
#include <Basics_Utils.hxx>
+#include <Basics_OCCTVersion.hxx>
// GEOM includes
#include "GEOM_Function.hxx"
// OOCT includes
#include <IGESControl_Controller.hxx>
#include <IGESControl_Writer.hxx>
+#include <IGESData_IGESModel.hxx>
#include <Interface_Static.hxx>
+#include <XSAlgo.hxx>
+#include <XSAlgo_AlgoContainer.hxx>
+
#include <TopoDS_Shape.hxx>
#include <TopoDS_Iterator.hxx>
+#include <UnitsMethods.hxx>
+
//=============================================================================
/*!
* KindOfBRep
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer IGESPlugin_ExportDriver::Execute(Handle(TFunction_Logbook)& log) const
+Standard_Integer IGESPlugin_ExportDriver::Execute(Handle(TFunction_Logbook)& /*log*/) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
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" );
*/
//================================================================================
bool IGESPlugin_ExportDriver::
-GetCreationInformation( std::string& theOperationName,
- std::vector<GEOM_Param>& theParams )
+GetCreationInformation( std::string& /*theOperationName*/,
+ std::vector<GEOM_Param>& /*theParams*/ )
{
return false;
}
-IMPLEMENT_STANDARD_RTTIEXT( IGESPlugin_ExportDriver,GEOM_BaseDriver );
+IMPLEMENT_STANDARD_RTTIEXT( IGESPlugin_ExportDriver,GEOM_BaseDriver )