mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-11 16:19:17 +05:00
Porting Salome to OCCT 7.7.0
This commit is contained in:
parent
922cc08eea
commit
fe14e2fc44
@ -26,6 +26,8 @@
|
|||||||
|
|
||||||
#include <Utils_ExceptHandlers.hxx>
|
#include <Utils_ExceptHandlers.hxx>
|
||||||
|
|
||||||
|
#include <Basics_OCCTVersion.hxx>
|
||||||
|
|
||||||
// OCCT Includes
|
// OCCT Includes
|
||||||
#include <BRepMesh_IncrementalMesh.hxx>
|
#include <BRepMesh_IncrementalMesh.hxx>
|
||||||
|
|
||||||
@ -994,7 +996,9 @@ Standard_Real GEOMUtils::GetMinDistance
|
|||||||
|
|
||||||
// skl 30.06.2008
|
// skl 30.06.2008
|
||||||
// additional workaround for bugs 19899, 19908 and 19910 from Mantis
|
// additional workaround for bugs 19899, 19908 and 19910 from Mantis
|
||||||
|
#if OCC_VERSION_LARGE < 0x07070000
|
||||||
aResult = GEOMUtils::GetMinDistanceSingular(theShape1, theShape2, thePnt1, thePnt2);
|
aResult = GEOMUtils::GetMinDistanceSingular(theShape1, theShape2, thePnt1, thePnt2);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (dist > -1.0) {
|
if (dist > -1.0) {
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
// KERNEL includes
|
// KERNEL includes
|
||||||
#include <utilities.h>
|
#include <utilities.h>
|
||||||
#include <Basics_Utils.hxx>
|
#include <Basics_Utils.hxx>
|
||||||
|
#include <Basics_OCCTVersion.hxx>
|
||||||
|
|
||||||
// GEOM includes
|
// GEOM includes
|
||||||
#include "GEOM_Function.hxx"
|
#include "GEOM_Function.hxx"
|
||||||
@ -31,11 +32,17 @@
|
|||||||
// OOCT includes
|
// OOCT includes
|
||||||
#include <IGESControl_Controller.hxx>
|
#include <IGESControl_Controller.hxx>
|
||||||
#include <IGESControl_Writer.hxx>
|
#include <IGESControl_Writer.hxx>
|
||||||
|
#include <IGESData_IGESModel.hxx>
|
||||||
#include <Interface_Static.hxx>
|
#include <Interface_Static.hxx>
|
||||||
|
|
||||||
|
#include <XSAlgo.hxx>
|
||||||
|
#include <XSAlgo_AlgoContainer.hxx>
|
||||||
|
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
#include <TopoDS_Iterator.hxx>
|
#include <TopoDS_Iterator.hxx>
|
||||||
|
|
||||||
|
#include <UnitsMethods.hxx>
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* KindOfBRep
|
* KindOfBRep
|
||||||
@ -161,6 +168,13 @@ Standard_Integer IGESPlugin_ExportDriver::Execute(Handle(TFunction_Logbook)& /*l
|
|||||||
IGESControl_Writer ICW( "M", aBrepMode ); // export explicitly in meters
|
IGESControl_Writer ICW( "M", aBrepMode ); // export explicitly in meters
|
||||||
Interface_Static::SetCVal( "xstep.cascade.unit", "M" );
|
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
|
// 09.03.2010 skl for bug 0020726
|
||||||
// change default value "Average" to "Max"
|
// change default value "Average" to "Max"
|
||||||
Interface_Static::SetCVal( "write.precision.mode", "Max" );
|
Interface_Static::SetCVal( "write.precision.mode", "Max" );
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
// KERNEL includes
|
// KERNEL includes
|
||||||
#include <utilities.h>
|
#include <utilities.h>
|
||||||
#include <Basics_Utils.hxx>
|
#include <Basics_Utils.hxx>
|
||||||
|
#include <Basics_OCCTVersion.hxx>
|
||||||
|
|
||||||
// GEOM includes
|
// GEOM includes
|
||||||
#include "GEOM_Function.hxx"
|
#include "GEOM_Function.hxx"
|
||||||
@ -120,14 +121,20 @@ Standard_Integer STEPPlugin_ExportDriver::Execute(Handle(TFunction_Logbook)& /*l
|
|||||||
// Set "C" numeric locale to save numbers correctly
|
// Set "C" numeric locale to save numbers correctly
|
||||||
Kernel_Utils::Localizer loc;
|
Kernel_Utils::Localizer loc;
|
||||||
|
|
||||||
IFSelect_ReturnStatus status ;
|
#if OCC_VERSION_LARGE < 0x07070000
|
||||||
//VRV: OCC 4.0 migration
|
|
||||||
STEPControl_Writer aWriter;
|
STEPControl_Writer aWriter;
|
||||||
Interface_Static::SetCVal("xstep.cascade.unit","M");
|
Interface_Static::SetCVal("xstep.cascade.unit","M");
|
||||||
Interface_Static::SetCVal("write.step.unit", aWriteUnit.ToCString());
|
Interface_Static::SetCVal("write.step.unit", aWriteUnit.ToCString());
|
||||||
Interface_Static::SetIVal("write.step.nonmanifold", 1);
|
Interface_Static::SetIVal("write.step.nonmanifold", 1);
|
||||||
status = aWriter.Transfer( aShape, STEPControl_AsIs );
|
#else
|
||||||
//VRV: OCC 4.0 migration
|
STEPControl_Writer aWriterTmp;
|
||||||
|
Interface_Static::SetCVal("xstep.cascade.unit","M");
|
||||||
|
Interface_Static::SetCVal("write.step.unit", aWriteUnit.ToCString());
|
||||||
|
Interface_Static::SetIVal("write.step.nonmanifold", 1);
|
||||||
|
STEPControl_Writer aWriter;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
IFSelect_ReturnStatus status = aWriter.Transfer( aShape, STEPControl_AsIs );
|
||||||
if( status == IFSelect_RetDone )
|
if( status == IFSelect_RetDone )
|
||||||
status = aWriter.Write( aFileName.ToCString() );
|
status = aWriter.Write( aFileName.ToCString() );
|
||||||
|
|
||||||
@ -137,7 +144,7 @@ Standard_Integer STEPPlugin_ExportDriver::Execute(Handle(TFunction_Logbook)& /*l
|
|||||||
}
|
}
|
||||||
catch (Standard_Failure&)
|
catch (Standard_Failure&)
|
||||||
{
|
{
|
||||||
//THROW_SALOME_CORBA_EXCEPTION("Exception caught in STEPExport", SALOME::BAD_PARAM);
|
//THROW_SALOME_CORBA_EXCEPTION("Exception caught in STEPExport", SALOME::BAD_PARAM);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user