// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
+#include <BRepFill_Filling.hxx>
-#include <Adaptor3d_CurveOnSurface.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <BRep_Builder.hxx>
#include <BRep_CurveRepresentation.hxx>
#include <BRepFill_CurveConstraint.hxx>
#include <BRepFill_EdgeFaceAndOrder.hxx>
#include <BRepFill_FaceAndOrder.hxx>
-#include <BRepFill_Filling.hxx>
#include <BRepLib.hxx>
#include <BRepLib_MakeVertex.hxx>
#include <BRepLib_MakeEdge.hxx>
Constr->SetCurve2dOnSurf( Curve2d );
}
}
- myBuilder.Add( Constr );
+ myBuilder->Add( Constr );
}
}
//======================================================================
void BRepFill_Filling::Build()
{
- GeomPlate_BuildPlateSurface thebuild( myDegree, myNbPtsOnCur, myNbIter,
- myTol2d, myTol3d, myTolAng, myTolCurv, myAnisotropie );
-
- myBuilder = thebuild;
+ myBuilder.reset (new GeomPlate_BuildPlateSurface (myDegree, myNbPtsOnCur, myNbIter,
+ myTol2d, myTol3d, myTolAng, myTolCurv, myAnisotropie));
TopoDS_Edge CurEdge;
TopoDS_Face CurFace;
Standard_Integer i, j;
{
Handle( BRepAdaptor_Surface ) HSurfInit = new BRepAdaptor_Surface();
HSurfInit->Initialize( myInitFace );
- myBuilder.LoadInitSurface( BRep_Tool::Surface( HSurfInit->Face() ) );
+ myBuilder->LoadInitSurface( BRep_Tool::Surface( HSurfInit->Face() ) );
}
//Adding constraints to myBuilder
AddConstraints( myBoundary );
- myBuilder.SetNbBounds( myBoundary.Length() );
+ myBuilder->SetNbBounds( myBoundary.Length() );
AddConstraints( myConstraints );
for (i = 1; i <= myPoints.Length(); i++)
- myBuilder.Add( myPoints(i) );
+ {
+ myBuilder->Add (myPoints (i));
+ }
- myBuilder.Perform();
- if (myBuilder.IsDone())
+ myBuilder->Perform();
+ if (myBuilder->IsDone())
+ {
myIsDone = Standard_True;
+ }
else
- {
- myIsDone = Standard_False;
- return;
- }
+ {
+ myIsDone = Standard_False;
+ return;
+ }
- Handle( GeomPlate_Surface ) GPlate = myBuilder.Surface();
- Handle( Geom_BSplineSurface ) Surface;
+ Handle(GeomPlate_Surface) GPlate = myBuilder->Surface();
+ Handle(Geom_BSplineSurface) Surface;
// Approximation
- Standard_Real dmax = 1.1 * myBuilder.G0Error(); //???????????
+ Standard_Real dmax = 1.1 * myBuilder->G0Error(); //???????????
//Standard_Real dmax = myTol3d;
if (! myIsInitFaceGiven)
{
TColgp_SequenceOfXY S2d;
TColgp_SequenceOfXYZ S3d;
- myBuilder.Disc2dContour(4,S2d);
- myBuilder.Disc3dContour(4,0,S3d);
- seuil = Max( myTol3d, 10*myBuilder.G0Error() ); //????????
+ myBuilder->Disc2dContour (4, S2d);
+ myBuilder->Disc3dContour (4, 0, S3d);
+ seuil = Max (myTol3d, 10 * myBuilder->G0Error()); //????????
GeomPlate_PlateG0Criterion Criterion( S2d, S3d, seuil );
GeomPlate_MakeApprox Approx( GPlate, Criterion, myTol3d, myMaxSegments, myMaxDeg );
Surface = Approx.Surface();
//Build the final wire and final face
TopTools_ListOfShape FinalEdges;
- Handle(TColGeom2d_HArray1OfCurve) CurvesOnPlate = myBuilder.Curves2d();
+ Handle(TColGeom2d_HArray1OfCurve) CurvesOnPlate = myBuilder->Curves2d();
BRep_Builder BB;
for (i = 1; i <= myBoundary.Length(); i++)
{
//==========================================================================
Standard_Real BRepFill_Filling::G0Error() const
{
- return myBuilder.G0Error();
+ return myBuilder->G0Error();
}
//=======================================================================
//======================================================================
Standard_Real BRepFill_Filling::G1Error() const
{
- return myBuilder.G1Error();
+ return myBuilder->G1Error();
}
//=======================================================================
//======================================================================
Standard_Real BRepFill_Filling::G2Error() const
{
- return myBuilder.G2Error();
+ return myBuilder->G2Error();
}
//==========================================================================
//==========================================================================
Standard_Real BRepFill_Filling::G0Error( const Standard_Integer Index )
{
- return myBuilder.G0Error( Index );
+ return myBuilder->G0Error (Index);
}
//==========================================================================
//==========================================================================
Standard_Real BRepFill_Filling::G1Error( const Standard_Integer Index )
{
- return myBuilder.G1Error( Index );
+ return myBuilder->G1Error (Index);
}
//==========================================================================
//==========================================================================
Standard_Real BRepFill_Filling::G2Error( const Standard_Integer Index )
{
- return myBuilder.G2Error( Index );
+ return myBuilder->G2Error (Index);
}