1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0022783: Improvement of BRepOffsetAPI_MakeFilling: keep old and new boundary edges with all pcurves

This commit is contained in:
JGV
2011-12-23 07:05:13 +00:00
committed by bugmaster
parent c2b143174b
commit 01697018a3
8 changed files with 509 additions and 216 deletions

View File

@@ -46,6 +46,7 @@ uses
Face from TopoDS,
Pnt from gp,
Shape from GeomAbs,
ListOfShape from TopTools,
Filling from BRepFill
raises
@@ -202,6 +203,14 @@ is
is redefined;
--- Purpose: Tests whether computation of the filling plate has been completed.
Generated (me: in out; S : Shape from TopoDS)
---Purpose: Returns the list of shapes generated from the
-- shape <S>.
---C++: return const &
---Level: Public
returns ListOfShape from TopTools
is redefined;
G0Error(me) returns Real from Standard;
--- Purpose: Returns the maximum distance between the result and
-- the constraints. This is set at construction time.

View File

@@ -7,6 +7,10 @@
#include <BRepOffsetAPI_MakeFilling.ixx>
//=======================================================================
//function : Constructor
//purpose :
//======================================================================
BRepOffsetAPI_MakeFilling::BRepOffsetAPI_MakeFilling( const Standard_Integer Degree,
const Standard_Integer NbPtsOnCur,
const Standard_Integer NbIter,
@@ -21,6 +25,10 @@ myFilling( Degree, NbPtsOnCur, NbIter, Anisotropie, Tol2d, Tol3d, TolAng, TolCur
{
}
//=======================================================================
//function : SetConstrParam
//purpose :
//======================================================================
void BRepOffsetAPI_MakeFilling::SetConstrParam( const Standard_Real Tol2d,
const Standard_Real Tol3d,
const Standard_Real TolAng,
@@ -29,6 +37,10 @@ void BRepOffsetAPI_MakeFilling::SetConstrParam( const Standard_Real Tol2d,
myFilling.SetConstrParam( Tol2d, Tol3d, TolAng, TolCurv );
}
//=======================================================================
//function : SetResolParam
//purpose :
//======================================================================
void BRepOffsetAPI_MakeFilling::SetResolParam( const Standard_Integer Degree,
const Standard_Integer NbPtsOnCur,
const Standard_Integer NbIter,
@@ -37,17 +49,29 @@ void BRepOffsetAPI_MakeFilling::SetResolParam( const Standard_Integer Degree,
myFilling.SetResolParam( Degree, NbPtsOnCur, NbIter, Anisotropie );
}
//=======================================================================
//function : SetApproxParam
//purpose :
//======================================================================
void BRepOffsetAPI_MakeFilling::SetApproxParam( const Standard_Integer MaxDeg,
const Standard_Integer MaxSegments )
{
myFilling.SetApproxParam( MaxDeg, MaxSegments );
}
//=======================================================================
//function : LoadInitSurface
//purpose :
//======================================================================
void BRepOffsetAPI_MakeFilling::LoadInitSurface( const TopoDS_Face& Surf )
{
myFilling.LoadInitSurface( Surf );
}
//=======================================================================
//function : Add
//purpose : adds an edge as a constraint
//======================================================================
Standard_Integer BRepOffsetAPI_MakeFilling::Add( const TopoDS_Edge& Constr,
const GeomAbs_Shape Order,
const Standard_Boolean IsBound )
@@ -55,6 +79,10 @@ Standard_Integer BRepOffsetAPI_MakeFilling::Add( const TopoDS_Edge& Constr,
return myFilling.Add( Constr, Order, IsBound );
}
//=======================================================================
//function : Add
//purpose : adds an edge with supporting face as a constraint
//======================================================================
Standard_Integer BRepOffsetAPI_MakeFilling::Add( const TopoDS_Edge& Constr,
const TopoDS_Face& Support,
const GeomAbs_Shape Order,
@@ -63,17 +91,29 @@ Standard_Integer BRepOffsetAPI_MakeFilling::Add( const TopoDS_Edge& Constr,
return myFilling.Add( Constr, Support, Order, IsBound );
}
//=======================================================================
//function : Add
//purpose : adds a "free constraint": face without edge
//======================================================================
Standard_Integer BRepOffsetAPI_MakeFilling::Add( const TopoDS_Face& Support,
const GeomAbs_Shape Order )
{
return myFilling.Add( Support, Order );
}
//=======================================================================
//function : Add
//purpose : adds a point constraint
//======================================================================
Standard_Integer BRepOffsetAPI_MakeFilling::Add( const gp_Pnt& Point )
{
return myFilling.Add( Point );
}
//=======================================================================
//function : Add
//purpose : adds a point constraint on a face
//======================================================================
Standard_Integer BRepOffsetAPI_MakeFilling::Add( const Standard_Real U,
const Standard_Real V,
const TopoDS_Face& Support,
@@ -83,42 +123,88 @@ Standard_Integer BRepOffsetAPI_MakeFilling::Add( const Standard_Real U,
}
//=======================================================================
//function : Build
//purpose : builds the resulting face
//======================================================================
void BRepOffsetAPI_MakeFilling::Build()
{
myFilling.Build();
myShape = myFilling.Face();
}
//=======================================================================
//function : IsDone
//purpose :
//======================================================================
Standard_Boolean BRepOffsetAPI_MakeFilling::IsDone() const
{
return myFilling.IsDone();
}
//=======================================================================
//function : Generated
//purpose : returns the new edge (first in list) made from old edge "S"
//=======================================================================
const TopTools_ListOfShape& BRepOffsetAPI_MakeFilling::Generated(const TopoDS_Shape& S)
{
return myFilling.Generated(S);
}
//==========================================================================
//function : G0Error
//purpose : returns maximum distance from boundary to the resulting surface
//==========================================================================
Standard_Real BRepOffsetAPI_MakeFilling::G0Error() const
{
return myFilling.G0Error();
}
//=======================================================================
//function : G1Error
//purpose : returns maximum angle between the resulting surface
// and constraint surfaces at boundaries
//======================================================================
Standard_Real BRepOffsetAPI_MakeFilling::G1Error() const
{
return myFilling.G1Error();
}
//=======================================================================
//function : G2Error
//purpose : returns maximum difference of curvature between
// the resulting surface and constraint surfaces at boundaries
//======================================================================
Standard_Real BRepOffsetAPI_MakeFilling::G2Error() const
{
return myFilling.G2Error();
}
//==========================================================================
//function : G0Error
//purpose : returns maximum distance between the constraint number Index
// and the resulting surface
//==========================================================================
Standard_Real BRepOffsetAPI_MakeFilling::G0Error( const Standard_Integer Index )
{
return myFilling.G0Error( Index );
}
//==========================================================================
//function : G1Error
//purpose : returns maximum angle between the constraint number Index
// and the resulting surface
//==========================================================================
Standard_Real BRepOffsetAPI_MakeFilling::G1Error( const Standard_Integer Index )
{
return myFilling.G1Error( Index );
}
//==========================================================================
//function : G2Error
//purpose : returns maximum difference of curvature between
// the constraint number Index and the resulting surface
//==========================================================================
Standard_Real BRepOffsetAPI_MakeFilling::G2Error( const Standard_Integer Index )
{
return myFilling.G2Error( Index );