Porting to OCCT6.5.2.

This commit is contained in:
jfa 2011-09-27 11:42:33 +00:00
parent 9c7e11d3b0
commit e808f9b75f
7 changed files with 131 additions and 100 deletions

View File

@ -18,15 +18,14 @@
// 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
//
// File: GEOMAlgo_BuilderTools.cxx // File: GEOMAlgo_BuilderTools.cxx
// Created:
// Author: Peter KURNEV // Author: Peter KURNEV
// <pkv@irinox>
//
#include <GEOMAlgo_BuilderTools.ixx> #include <GEOMAlgo_BuilderTools.ixx>
#include <Basics_OCCTVersion.hxx>
#include <TColStd_Array1OfReal.hxx> #include <TColStd_Array1OfReal.hxx>
#include <gp_Pnt2d.hxx> #include <gp_Pnt2d.hxx>
@ -53,6 +52,11 @@
#include <TopoDS_Edge.hxx> #include <TopoDS_Edge.hxx>
#include <TopExp_Explorer.hxx> #include <TopExp_Explorer.hxx>
#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
#include <TopExp.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#endif
#include <BRep_Tool.hxx> #include <BRep_Tool.hxx>
#include <BRepBndLib.hxx> #include <BRepBndLib.hxx>
#include <BRepMesh_FastDiscret.hxx> #include <BRepMesh_FastDiscret.hxx>
@ -276,5 +280,12 @@ void BuildTriangulation(const TopoDS_Face& aF)
Standard_True, Standard_True,
Standard_False, Standard_False,
Standard_True); Standard_True);
#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
TopTools_IndexedDataMapOfShapeListOfShape anAncestors;
TopExp::MapShapesAndAncestors(aF, TopAbs_EDGE, TopAbs_FACE, anAncestors);
aMesher.Add(aF, anAncestors);
#else
aMesher.Add(aF); aMesher.Add(aF);
#endif
} }

View File

@ -18,15 +18,19 @@
// 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
//
// File: GEOMAlgo_FinderShapeOn.cxx // File: GEOMAlgo_FinderShapeOn.cxx
// Created: Tue Jan 11 14:44:31 2005 // Created: Tue Jan 11 14:44:31 2005
// Author: Peter KURNEV // Author: Peter KURNEV
// <pkv@irinox>
//
#include <GEOMAlgo_FinderShapeOn.ixx> #include <GEOMAlgo_FinderShapeOn.ixx>
#include <Basics_OCCTVersion.hxx>
#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
#include <Precision.hxx>
#endif
#include <gp_Pnt.hxx> #include <gp_Pnt.hxx>
#include <TopAbs_ShapeEnum.hxx> #include <TopAbs_ShapeEnum.hxx>
@ -383,7 +387,11 @@ void GEOMAlgo_FinderShapeOn::MakeArgument1()
// //
// Argument 1 // Argument 1
if (!myIsAnalytic) { if (!myIsAnalytic) {
#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
aMF.Init(mySurface, Standard_True, Precision::Confusion());
#else
aMF.Init(mySurface, Standard_True); aMF.Init(mySurface, Standard_True);
#endif
aFErr=aMF.Error(); aFErr=aMF.Error();
if (aFErr!=BRepLib_FaceDone) { if (aFErr!=BRepLib_FaceDone) {
myErrorStatus=20; // can not build the face myErrorStatus=20; // can not build the face

View File

@ -18,9 +18,8 @@
// 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
//
// File: GEOMAlgo_GetInPlace_1.cxx // File: GEOMAlgo_GetInPlace_1.cxx
// Created:
// Author: Peter KURNEV // Author: Peter KURNEV
#include <GEOMAlgo_GetInPlace.hxx> #include <GEOMAlgo_GetInPlace.hxx>
@ -91,9 +90,9 @@ static
Standard_Boolean GEOMAlgo_GetInPlace::CheckCoincidence(const TopoDS_Shape& aS1, Standard_Boolean GEOMAlgo_GetInPlace::CheckCoincidence(const TopoDS_Shape& aS1,
const TopoDS_Shape& aS2) const TopoDS_Shape& aS2)
{ {
Standard_Boolean bOk, bIsDone; Standard_Boolean bOk;
Standard_Integer iErr; Standard_Integer iErr;
Standard_Real aTol2, aD2; Standard_Real aTol2;
TopAbs_ShapeEnum aType1, aType2; TopAbs_ShapeEnum aType1, aType2;
TopAbs_State aState; TopAbs_State aState;
gp_Pnt aP1, aP2; gp_Pnt aP1, aP2;

View File

@ -18,7 +18,6 @@
// 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 "GEOMImpl_ArchimedeDriver.hxx" #include "GEOMImpl_ArchimedeDriver.hxx"
#include "GEOMImpl_IArchimede.hxx" #include "GEOMImpl_IArchimede.hxx"
@ -26,6 +25,8 @@
#include "Archimede_VolumeSection.hxx" #include "Archimede_VolumeSection.hxx"
#include <Basics_OCCTVersion.hxx>
#include <stdio.h> #include <stdio.h>
#include <BRepBuilderAPI_MakeFace.hxx> #include <BRepBuilderAPI_MakeFace.hxx>
@ -128,7 +129,11 @@ Standard_Integer GEOMImpl_ArchimedeDriver::Execute(TFunction_Logbook& log) const
Standard_Real u1,u2,v1,v2; Standard_Real u1,u2,v1,v2;
SurfaceTrimmee->Bounds(u1,u2,v1,v2); SurfaceTrimmee->Bounds(u1,u2,v1,v2);
#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
TopoDS_Face tirant = BRepBuilderAPI_MakeFace(SurfaceTrimmee, u1, u2, v1, v2, Precision::Confusion());
#else
TopoDS_Face tirant = BRepBuilderAPI_MakeFace(SurfaceTrimmee, u1, u2, v1, v2); TopoDS_Face tirant = BRepBuilderAPI_MakeFace(SurfaceTrimmee, u1, u2, v1, v2);
#endif
if (tirant.IsNull()) { if (tirant.IsNull()) {
StdFail_NotDone::Raise("Failed to build secant face"); StdFail_NotDone::Raise("Failed to build secant face");
@ -182,7 +187,5 @@ const Handle(GEOMImpl_ArchimedeDriver) Handle(GEOMImpl_ArchimedeDriver)::DownCas
} }
} }
return _anOtherObject ; return _anOtherObject;
} }

View File

@ -18,28 +18,32 @@
// 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 <Standard_Stream.hxx> #include <Standard_Stream.hxx>
#include <GEOMImpl_FillingDriver.hxx> #include <GEOMImpl_FillingDriver.hxx>
#include <GEOM_Function.hxx>
#include <GEOMImpl_IFilling.hxx> #include <GEOMImpl_IFilling.hxx>
#include <GEOMImpl_Types.hxx> #include <GEOMImpl_Types.hxx>
#include <GEOM_Function.hxx>
#include <Basics_OCCTVersion.hxx>
#include <ShapeFix_Face.hxx>
#include <BRep_Tool.hxx> #include <BRep_Tool.hxx>
#include <BRepAlgo.hxx> #include <BRepAlgo.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
#include <BRep_Builder.hxx> #include <BRep_Builder.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
#include <BRepBuilderAPI_Copy.hxx> #include <BRepBuilderAPI_Copy.hxx>
#include <TopAbs.hxx> #include <TopAbs.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx> #include <TopoDS.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Compound.hxx> #include <TopoDS_Compound.hxx>
#include <TopoDS_Edge.hxx> #include <TopoDS_Edge.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx> #include <TopoDS_Vertex.hxx>
#include <TopExp_Explorer.hxx>
#include <Geom_Curve.hxx> #include <Geom_Curve.hxx>
#include <Geom_Surface.hxx> #include <Geom_Surface.hxx>
@ -48,25 +52,22 @@
#include <Geom_Circle.hxx> #include <Geom_Circle.hxx>
#include <Geom_Ellipse.hxx> #include <Geom_Ellipse.hxx>
#include <Geom_BezierCurve.hxx> #include <Geom_BezierCurve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_BSplineSurface.hxx> #include <Geom_BSplineSurface.hxx>
#include <GeomFill_Line.hxx> #include <GeomFill_Line.hxx>
#include <GeomFill_AppSurf.hxx> #include <GeomFill_AppSurf.hxx>
#include <GeomFill_SectionGenerator.hxx> #include <GeomFill_SectionGenerator.hxx>
#include <GeomAPI_PointsToBSplineSurface.hxx>
#include <Precision.hxx> #include <GeomAPI_PointsToBSpline.hxx>
#include <Standard_ConstructionError.hxx>
#include <TColGeom_SequenceOfCurve.hxx> #include <TColGeom_SequenceOfCurve.hxx>
#include <ShapeFix_Face.hxx>
#include <GeomAPI_PointsToBSplineSurface.hxx>
#include <Geom_BSplineCurve.hxx>
#include <GeomAPI_PointsToBSpline.hxx>
#include <TColgp_SequenceOfPnt.hxx> #include <TColgp_SequenceOfPnt.hxx>
#include <TColgp_Array1OfPnt.hxx> #include <TColgp_Array1OfPnt.hxx>
//#include <BRepTools.hxx> #include <Precision.hxx>
#include <Standard_ConstructionError.hxx>
//======================================================================= //=======================================================================
//function : GetID //function : GetID
@ -78,7 +79,6 @@ const Standard_GUID& GEOMImpl_FillingDriver::GetID()
return aFillingDriver; return aFillingDriver;
} }
//======================================================================= //=======================================================================
//function : GEOMImpl_FillingDriver //function : GEOMImpl_FillingDriver
//purpose : //purpose :
@ -290,7 +290,11 @@ Standard_Integer GEOMImpl_FillingDriver::Execute(TFunction_Logbook& log) const
App.SurfUMults(), App.SurfVMults(), App.UDegree(), App.VDegree()); App.SurfUMults(), App.SurfVMults(), App.UDegree(), App.VDegree());
if (GBS.IsNull()) return 0; if (GBS.IsNull()) return 0;
#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
aShape = BRepBuilderAPI_MakeFace(GBS, Precision::Confusion());
#else
aShape = BRepBuilderAPI_MakeFace(GBS); aShape = BRepBuilderAPI_MakeFace(GBS);
#endif
} }
else { else {
// implemented by skl 20.03.2008 for bug 16568 // implemented by skl 20.03.2008 for bug 16568
@ -349,7 +353,11 @@ Standard_Integer GEOMImpl_FillingDriver::Execute(TFunction_Logbook& log) const
} }
GeomAPI_PointsToBSplineSurface PTB(Points,mindeg,maxdeg,GeomAbs_C2,tol3d); GeomAPI_PointsToBSplineSurface PTB(Points,mindeg,maxdeg,GeomAbs_C2,tol3d);
Handle(Geom_BSplineSurface) BS = PTB.Surface(); Handle(Geom_BSplineSurface) BS = PTB.Surface();
BRepBuilderAPI_MakeFace BB(BS); #if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
BRepBuilderAPI_MakeFace BB (BS, Precision::Confusion());
#else
BRepBuilderAPI_MakeFace BB (BS);
#endif
TopoDS_Face NewF = BB.Face(); TopoDS_Face NewF = BB.Face();
Handle(ShapeFix_Face) sff = new ShapeFix_Face(NewF); Handle(ShapeFix_Face) sff = new ShapeFix_Face(NewF);
sff->Perform(); sff->Perform();

View File

@ -18,7 +18,6 @@
// 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 <Standard_Stream.hxx> #include <Standard_Stream.hxx>
@ -29,6 +28,8 @@
#include <GEOMImpl_IMeasureOperations.hxx> #include <GEOMImpl_IMeasureOperations.hxx>
#include <Basics_OCCTVersion.hxx>
// OCCT Includes // OCCT Includes
#include <BRepBuilderAPI_MakeFace.hxx> #include <BRepBuilderAPI_MakeFace.hxx>
#include <BRep_Tool.hxx> #include <BRep_Tool.hxx>
@ -125,7 +126,12 @@ Standard_Integer GEOMImpl_PlaneDriver::Execute(TFunction_Logbook& log) const
if (gp_Vec(aP1, aP2).IsParallel(gp_Vec(aP1, aP3), Precision::Angular())) if (gp_Vec(aP1, aP2).IsParallel(gp_Vec(aP1, aP3), Precision::Angular()))
Standard_ConstructionError::Raise("Plane creation aborted: points lay on one line"); Standard_ConstructionError::Raise("Plane creation aborted: points lay on one line");
GC_MakePlane aMakePlane (aP1, aP2, aP3); GC_MakePlane aMakePlane (aP1, aP2, aP3);
#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
aShape = BRepBuilderAPI_MakeFace(aMakePlane, -aSize, +aSize, -aSize, +aSize,
Precision::Confusion()).Shape();
#else
aShape = BRepBuilderAPI_MakeFace(aMakePlane, -aSize, +aSize, -aSize, +aSize).Shape(); aShape = BRepBuilderAPI_MakeFace(aMakePlane, -aSize, +aSize, -aSize, +aSize).Shape();
#endif
} else if (aType == PLANE_FACE) { } else if (aType == PLANE_FACE) {
Handle(GEOM_Function) aRef = aPI.GetFace(); Handle(GEOM_Function) aRef = aPI.GetFace();
TopoDS_Shape aRefShape = aRef->GetValue(); TopoDS_Shape aRefShape = aRef->GetValue();

View File

@ -18,46 +18,50 @@
// 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
//
// File: ShHealOper_FillHoles.cxx // File: ShHealOper_FillHoles.cxx
// Created: 26.04.04 17:35:30 // Created: 26.04.04 17:35:30
// Author: Galina KULIKOVA // Author: Galina KULIKOVA
//
#include <Basics_OCCTVersion.hxx>
#include <ShapeFix_Shell.hxx>
#include <ShapeFix_Face.hxx>
#include <ShHealOper_FillHoles.hxx> #include <ShHealOper_FillHoles.hxx>
#include <TopExp.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <ShapeAnalysis_FreeBounds.hxx> #include <ShapeAnalysis_FreeBounds.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Iterator.hxx>
#include <Geom_Curve.hxx>
#include <BRep_Tool.hxx> #include <BRep_Tool.hxx>
#include <TopExp_Explorer.hxx>
#include <TopTools_HSequenceOfShape.hxx>
#include <TopoDS.hxx>
#include <Geom_BSplineSurface.hxx>
#include <GeomPlate_BuildPlateSurface.hxx>
#include <TopoDS_Edge.hxx>
#include <BRepAdaptor_Curve.hxx> #include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_HCurve.hxx> #include <BRepAdaptor_HCurve.hxx>
#include <GeomPlate_CurveConstraint.hxx>
#include <GeomPlate_Surface.hxx>
#include <TColgp_SequenceOfXY.hxx>
#include <TColgp_SequenceOfXYZ.hxx>
#include <BRep_Builder.hxx> #include <BRep_Builder.hxx>
#include <ShapeFix_Face.hxx>
#include <BRep_Tool.hxx>
#include <TopLoc_Location.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopoDS_Shell.hxx>
#include <ShapeFix_Shell.hxx>
#include <GeomPlate_PlateG0Criterion.hxx>
#include <GeomPlate_MakeApprox.hxx>
#include <Precision.hxx>
#include <TopTools_ListOfShape.hxx>
#include <BRepFill_CurveConstraint.hxx> #include <BRepFill_CurveConstraint.hxx>
#include <BRepBuilderAPI_MakeFace.hxx> #include <BRepBuilderAPI_MakeFace.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopLoc_Location.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_HSequenceOfShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <Geom_Curve.hxx>
#include <Geom_BSplineSurface.hxx>
#include <GeomPlate_Surface.hxx>
#include <GeomPlate_MakeApprox.hxx>
#include <GeomPlate_CurveConstraint.hxx>
#include <GeomPlate_PlateG0Criterion.hxx>
#include <GeomPlate_BuildPlateSurface.hxx>
#include <TColgp_SequenceOfXY.hxx>
#include <TColgp_SequenceOfXYZ.hxx>
#include <Precision.hxx>
//======================================================================= //=======================================================================
//function : ShHealOper_FillHoles() //function : ShHealOper_FillHoles()
@ -72,18 +76,16 @@ ShHealOper_FillHoles::ShHealOper_FillHoles ()
//function : ShHealOper_FillHoles //function : ShHealOper_FillHoles
//purpose : //purpose :
//======================================================================= //=======================================================================
ShHealOper_FillHoles::ShHealOper_FillHoles (const TopoDS_Shape& theShape) ShHealOper_FillHoles::ShHealOper_FillHoles (const TopoDS_Shape& theShape)
{ {
Init(theShape); Init(theShape);
InitParameters(); InitParameters();
} }
//======================================================================= //=======================================================================
//function : Init //function : Init
//purpose : //purpose :
//======================================================================= //=======================================================================
void ShHealOper_FillHoles::Init(const TopoDS_Shape& theShape) void ShHealOper_FillHoles::Init(const TopoDS_Shape& theShape)
{ {
ShHealOper_Tool::Init(theShape); ShHealOper_Tool::Init(theShape);
@ -92,11 +94,11 @@ void ShHealOper_FillHoles::Init(const TopoDS_Shape& theShape)
TopExp::MapShapesAndAncestors ( myInitShape, TopAbs_EDGE,TopAbs_FACE, myEdgeFaces ); TopExp::MapShapesAndAncestors ( myInitShape, TopAbs_EDGE,TopAbs_FACE, myEdgeFaces );
} }
//======================================================================= //=======================================================================
//function : InitParameters //function : InitParameters
//purpose : //purpose :
//======================================================================= //=======================================================================
void ShHealOper_FillHoles::InitParameters(Standard_Integer theDegree, void ShHealOper_FillHoles::InitParameters(Standard_Integer theDegree,
Standard_Integer theNbPtsOnCur, Standard_Integer theNbPtsOnCur,
Standard_Integer theNbIter, Standard_Integer theNbIter,
@ -121,7 +123,6 @@ void ShHealOper_FillHoles::InitParameters(Standard_Integer theDegree,
//function : Fill //function : Fill
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Boolean ShHealOper_FillHoles::Fill() Standard_Boolean ShHealOper_FillHoles::Fill()
{ {
ShapeAnalysis_FreeBounds sab(myInitShape); ShapeAnalysis_FreeBounds sab(myInitShape);
@ -152,7 +153,6 @@ Standard_Boolean ShHealOper_FillHoles::Fill()
//function : Fill //function : Fill
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Boolean ShHealOper_FillHoles::Fill(const TopTools_SequenceOfShape& theFillShapes) Standard_Boolean ShHealOper_FillHoles::Fill(const TopTools_SequenceOfShape& theFillShapes)
{ {
myDone = Standard_False; myDone = Standard_False;
@ -188,6 +188,7 @@ Standard_Boolean ShHealOper_FillHoles::Fill(const TopTools_SequenceOfShape& theF
myResultShape = myContext->Apply(myResultShape); myResultShape = myContext->Apply(myResultShape);
return myDone; return myDone;
} }
//======================================================================= //=======================================================================
//function : isCircle //function : isCircle
//purpose : //purpose :
@ -210,7 +211,6 @@ Standard_Boolean ShHealOper_FillHoles::prepareWires(const TopTools_SequenceOfSha
Handle(TopTools_HSequenceOfShape)& theSeqWires) Handle(TopTools_HSequenceOfShape)& theSeqWires)
{ {
Handle(TopTools_HSequenceOfShape) aSeqEdges = new TopTools_HSequenceOfShape; Handle(TopTools_HSequenceOfShape) aSeqEdges = new TopTools_HSequenceOfShape;
BRep_Builder aB;
Standard_Integer i =1; Standard_Integer i =1;
for( ; i <= theFillShapes.Length(); i++) { for( ; i <= theFillShapes.Length(); i++) {
TopExp_Explorer aExp; TopExp_Explorer aExp;
@ -248,8 +248,6 @@ Standard_Boolean ShHealOper_FillHoles::prepareWires(const TopTools_SequenceOfSha
theSeqWires->Append (anWiresOpen->Value (i)); theSeqWires->Append (anWiresOpen->Value (i));
} }
for( i =1; i <= theSeqWires->Length(); i++) { for( i =1; i <= theSeqWires->Length(); i++) {
TopoDS_Wire aWire = TopoDS::Wire(theSeqWires->Value(i)); TopoDS_Wire aWire = TopoDS::Wire(theSeqWires->Value(i));
@ -277,7 +275,6 @@ Handle(Geom_Surface) ShHealOper_FillHoles::buildSurface(const TopoDS_Wire& theWi
{ {
Handle(Geom_BSplineSurface) aSurf; Handle(Geom_BSplineSurface) aSurf;
try { try {
GeomPlate_BuildPlateSurface aBuilder(myDegree, myNbPtsOnCur, myNbIter, GeomPlate_BuildPlateSurface aBuilder(myDegree, myNbPtsOnCur, myNbIter,
myTol2d, myTol3d, myTolAng, myTolCrv); myTol2d, myTol3d, myTolAng, myTolCrv);
TopoDS_Iterator aIter; TopoDS_Iterator aIter;
@ -318,7 +315,6 @@ Handle(Geom_Surface) ShHealOper_FillHoles::buildSurface(const TopoDS_Wire& theWi
theCurves2d = aBuilder.Curves2d(); theCurves2d = aBuilder.Curves2d();
theOrders = aBuilder.Order(); theOrders = aBuilder.Order();
theSenses = aBuilder.Sense(); theSenses = aBuilder.Sense();
} }
catch (Standard_Failure) { catch (Standard_Failure) {
@ -339,11 +335,14 @@ Standard_Boolean ShHealOper_FillHoles::addFace(const Handle(Geom_Surface)& theSu
const Handle(TColStd_HArray1OfInteger)& theOrders, const Handle(TColStd_HArray1OfInteger)& theOrders,
const Handle(TColStd_HArray1OfInteger)& theSenses) const Handle(TColStd_HArray1OfInteger)& theSenses)
{ {
#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
BRepBuilderAPI_MakeFace aMakeFace (theSurf, Precision::Confusion());
#else
BRepBuilderAPI_MakeFace aMakeFace (theSurf); BRepBuilderAPI_MakeFace aMakeFace (theSurf);
#endif
TopoDS_Face aFace = aMakeFace.Face(); TopoDS_Face aFace = aMakeFace.Face();
aFace.EmptyCopy(); aFace.EmptyCopy();
TopoDS_Wire aWire; TopoDS_Wire aWire;
BRep_Builder aB; BRep_Builder aB;
aB.MakeWire(aWire); aB.MakeWire(aWire);
@ -432,7 +431,6 @@ void ShHealOper_FillHoles::getResShape(const TopoDS_Shape& theAddShape,
aB.MakeShell(aTmpShell); aB.MakeShell(aTmpShell);
TopTools_SequenceOfShape aseqShells; TopTools_SequenceOfShape aseqShells;
if(anhasShell) { if(anhasShell) {
aB.Add(aTmpShell,theAddShape); aB.Add(aTmpShell,theAddShape);
Standard_Integer i =1; Standard_Integer i =1;
for( ; i <= aMapParent.Extent(); i++) { for( ; i <= aMapParent.Extent(); i++) {
@ -454,7 +452,6 @@ void ShHealOper_FillHoles::getResShape(const TopoDS_Shape& theAddShape,
Standard_Integer i =2; Standard_Integer i =2;
for( ; i<= aseqShells.Length(); i++) for( ; i<= aseqShells.Length(); i++)
myContext->Remove(aseqShells.Value(i)); myContext->Remove(aseqShells.Value(i));
} }
else { else {
TopoDS_Compound aComp; TopoDS_Compound aComp;
@ -465,6 +462,5 @@ void ShHealOper_FillHoles::getResShape(const TopoDS_Shape& theAddShape,
aB.Add(aComp,aIt.Value()); aB.Add(aComp,aIt.Value());
aB.Add(aComp,theAddShape); aB.Add(aComp,theAddShape);
myContext->Replace( oldshape,aComp); myContext->Replace( oldshape,aComp);
} }
} }