From f4e80938ef58dcba151bba62136950bff95ec85f Mon Sep 17 00:00:00 2001 From: san Date: Thu, 28 Jul 2005 15:06:06 +0000 Subject: [PATCH] SALOME porting to OCCT 5.2.4 --- src/GEOMBase/Makefile.in | 2 +- src/GEOMImpl/GEOMImpl_IHealingOperations.cxx | 10 +++++++--- src/GEOMImpl/GEOMImpl_ShapeDriver.cxx | 4 ++-- src/ShHealOper/ShHealOper_Sewing.cxx | 4 ++-- src/ShHealOper/ShHealOper_Sewing.hxx | 4 ++-- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/GEOMBase/Makefile.in b/src/GEOMBase/Makefile.in index eaffda30d..871e7f452 100644 --- a/src/GEOMBase/Makefile.in +++ b/src/GEOMBase/Makefile.in @@ -66,6 +66,6 @@ LIB_SERVER_IDL = CPPFLAGS += $(QT_INCLUDES) $(VTK_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) $(BOOST_CPPFLAGS) -I${KERNEL_ROOT_DIR}/include/salome -I${GUI_ROOT_DIR}/include/salome CXXFLAGS += $(BOOST_CPPFLAGS) -I${KERNEL_ROOT_DIR}/include/salome -I${GUI_ROOT_DIR}/include/salome -LDFLAGS += -L$(KERNEL_ROOT_DIR)/lib/salome -L$(GUI_ROOT_DIR)/lib/salome -lDlgRef -lGEOM -lsuit -lOCCViewer -lVTKViewer -lSalomeDS +LDFLAGS += -L$(KERNEL_ROOT_DIR)/lib/salome -L$(GUI_ROOT_DIR)/lib/salome $(CAS_LDPATH) -lDlgRef -lGEOM -lsuit -lOCCViewer -lVTKViewer -lSalomeDS -lTKPrim @CONCLUDE@ diff --git a/src/GEOMImpl/GEOMImpl_IHealingOperations.cxx b/src/GEOMImpl/GEOMImpl_IHealingOperations.cxx index a87816fb3..3fc9299b7 100644 --- a/src/GEOMImpl/GEOMImpl_IHealingOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IHealingOperations.cxx @@ -534,9 +534,13 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::FillHoles (Handle(GEOM_Object) pd << aNewObject << " = geompy.SuppressHoles(" << theObject << ", ["; // list of wire ids - int i = theWires->Lower(), nb = theWires->Upper(); - for ( ; i <= nb; i++) - pd << theWires->Value( i ) << (( i < nb ) ? ", " : "])"); + if ( theWires.IsNull() ) + pd << "])"; + else { + int i = theWires->Lower(), nb = theWires->Upper(); + for ( ; i <= nb; i++) + pd << theWires->Value( i ) << (( i < nb ) ? ", " : "])"); + } SetErrorCode(OK); return aNewObject; diff --git a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx index dc5d0b9db..df96b659d 100644 --- a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx @@ -9,7 +9,7 @@ using namespace std; #include #include #include -#include +#include #include #include #include @@ -177,7 +177,7 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const unsigned int ind, nbshapes = aShapes->Length(); // add faces - BRepAlgo_Sewing aSewing(Precision::Confusion()*10.0); + BRepBuilderAPI_Sewing aSewing(Precision::Confusion()*10.0); for (ind = 1; ind <= nbshapes; ind++) { Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aShapes->Value(ind)); TopoDS_Shape aShape_i = aRefShape->GetValue(); diff --git a/src/ShHealOper/ShHealOper_Sewing.cxx b/src/ShHealOper/ShHealOper_Sewing.cxx index b0f8e4206..62ed52e49 100644 --- a/src/ShHealOper/ShHealOper_Sewing.cxx +++ b/src/ShHealOper/ShHealOper_Sewing.cxx @@ -94,7 +94,7 @@ Standard_Boolean ShHealOper_Sewing::sewing(const TopTools_SequenceOfShape& theSe return myDone; } //sewing shape - Handle(BRepAlgo_Sewing) aSewing = new BRepAlgo_Sewing; + Handle(BRepBuilderAPI_Sewing) aSewing = new BRepBuilderAPI_Sewing; aSewing->Load(myInitShape); aSewing->SetTolerance(myTolerance); aSewing->SetFaceMode(myFacesMode); @@ -221,7 +221,7 @@ Standard_Boolean ShHealOper_Sewing::getWires(const TopoDS_Shape& theSewShape) co //======================================================================= Standard_Boolean ShHealOper_Sewing::getModifications(const TopoDS_Shape& theShape, - const Handle(BRepAlgo_Sewing)& theSewing) const + const Handle(BRepBuilderAPI_Sewing)& theSewing) const { if((Standard_Integer)theShape.ShapeType() > (Standard_Integer)myHistoryLevel) return Standard_False; diff --git a/src/ShHealOper/ShHealOper_Sewing.hxx b/src/ShHealOper/ShHealOper_Sewing.hxx index e7244b227..8872e294d 100644 --- a/src/ShHealOper/ShHealOper_Sewing.hxx +++ b/src/ShHealOper/ShHealOper_Sewing.hxx @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include @@ -125,7 +125,7 @@ class ShHealOper_Sewing : public ShHealOper_Tool Standard_Boolean getShells(const TopoDS_Shape& theSewShape) const; Standard_Boolean getWires(const TopoDS_Shape& theSewShape) const; Standard_Boolean getModifications(const TopoDS_Shape& theShape, - const Handle(BRepAlgo_Sewing)& theSewing) const; + const Handle(BRepBuilderAPI_Sewing)& theSewing) const; Standard_Boolean isSewed(const TopoDS_Shape& theShape) const; -- 2.39.2