From: jfa Date: Fri, 10 Mar 2023 15:32:01 +0000 (+0000) Subject: Porting Salome to OCCT 7.7.0 X-Git-Tag: V9_11_0a1~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=901ba4f298d9a24e4ca6f3cae8c223b7c51da7d8;p=modules%2Fgeom.git Porting Salome to OCCT 7.7.0 --- diff --git a/src/STLPlugin/STLPlugin_ImportDriver.cxx b/src/STLPlugin/STLPlugin_ImportDriver.cxx index 319535473..b63c54600 100644 --- a/src/STLPlugin/STLPlugin_ImportDriver.cxx +++ b/src/STLPlugin/STLPlugin_ImportDriver.cxx @@ -24,6 +24,7 @@ // KERNEL includes #include #include +#include // GEOM includes #include "GEOM_Function.hxx" @@ -34,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -70,7 +72,7 @@ Standard_Integer STLPlugin_ImportDriver::Execute(Handle(TFunction_Logbook)& log) TCollection_AsciiString aFileName = aData.GetFileName().ToCString(); - MESSAGE( "Import STL to file " << aFileName ); + MESSAGE( "Import STL from file " << aFileName ); // Set "C" numeric locale to save numbers correctly Kernel_Utils::Localizer loc; @@ -82,6 +84,16 @@ Standard_Integer STLPlugin_ImportDriver::Execute(Handle(TFunction_Logbook)& log) if( aShape.IsNull() ) return 0; +#if OCC_VERSION_LARGE >= 0x07070000 + BRepBuilderAPI_Sewing aSewingTool; + aSewingTool.Init(1.0e-06, Standard_True); + aSewingTool.Load(aShape); + aSewingTool.Perform(); + TopoDS_Shape aSewedShape = aSewingTool.SewedShape(); + if (!aSewedShape.IsNull()) + aShape = aSewedShape; +#endif + // Fix the orientation of closed shell or solid. if( BRep_Tool::IsClosed( aShape ) ) { TopAbs_ShapeEnum aType = aShape.ShapeType();