Open CASCADE Technology  7.3.0
Public Member Functions
ChFi2d_FilletAlgo Class Reference

Algorithm that creates fillet edge: arc tangent to two edges in the start and in the end vertices. Initial edges must be located on the plane and must be connected by the end or start points (shared vertices are not obligatory). Created fillet arc is created with the given radius, that is useful in sketcher applications. More...

#include <ChFi2d_FilletAlgo.hxx>

Public Member Functions

 ChFi2d_FilletAlgo ()
 An empty constructor of the fillet algorithm. Call a method Init() to initialize the algorithm before calling of a Perform() method. More...
 
 ChFi2d_FilletAlgo (const TopoDS_Wire &theWire, const gp_Pln &thePlane)
 A constructor of a fillet algorithm: accepts a wire consisting of two edges in a plane. More...
 
 ChFi2d_FilletAlgo (const TopoDS_Edge &theEdge1, const TopoDS_Edge &theEdge2, const gp_Pln &thePlane)
 A constructor of a fillet algorithm: accepts two edges in a plane. More...
 
void Init (const TopoDS_Wire &theWire, const gp_Pln &thePlane)
 Initializes a fillet algorithm: accepts a wire consisting of two edges in a plane. More...
 
void Init (const TopoDS_Edge &theEdge1, const TopoDS_Edge &theEdge2, const gp_Pln &thePlane)
 Initializes a fillet algorithm: accepts two edges in a plane. More...
 
Standard_Boolean Perform (const Standard_Real theRadius)
 Constructs a fillet edge. Returns true, if at least one result was found. More...
 
Standard_Integer NbResults (const gp_Pnt &thePoint)
 Returns number of possible solutions. <thePoint> chooses a particular fillet in case of several fillets may be constructed (for example, a circle intersecting a segment in 2 points). Put the intersecting (or common) point of the edges. More...
 
TopoDS_Edge Result (const gp_Pnt &thePoint, TopoDS_Edge &theEdge1, TopoDS_Edge &theEdge2, const Standard_Integer iSolution=-1)
 Returns result (fillet edge, modified edge1, modified edge2), neares to the given point <thePoint> if iSolution == -1. <thePoint> chooses a particular fillet in case of several fillets may be constructed (for example, a circle intersecting a segment in 2 points). Put the intersecting (or common) point of the edges. More...
 

Detailed Description

Algorithm that creates fillet edge: arc tangent to two edges in the start and in the end vertices. Initial edges must be located on the plane and must be connected by the end or start points (shared vertices are not obligatory). Created fillet arc is created with the given radius, that is useful in sketcher applications.

The algorithm is iterative that allows to create fillet on any curves of initial edges, that supports projection of point and C2 continuous. Principles of algorithm can de reduced to the Newton method:

  1. Splitting initial edge into N segments where probably only 1 root can be found. N depends on the complexity of the underlying curve.
  2. On each segment compute value and derivative of the function:
    • argument of the function is the parameter on the curve
    • take point on the curve by the parameter: point of tangency
    • make center of fillet: perpendicular vector from the point of tagency
    • make projection from the center to the second curve
    • length of the projection minus radius of the fillet is result of the function
    • derivative of this function in the point is computed by value in point with small shift
  3. Using Newton search method take the point on the segment where function value is most close to zero. If it is not enough close, step 2 and 3 are repeated taking as start or end point the found point.
  4. If solution is found, result is created on point on root of the function (as a start point), point of the projection onto second curve (as an end point) and center of arc in found center. Initial edges are cutted by the start and end point of tangency.

Constructor & Destructor Documentation

◆ ChFi2d_FilletAlgo() [1/3]

ChFi2d_FilletAlgo::ChFi2d_FilletAlgo ( )

An empty constructor of the fillet algorithm. Call a method Init() to initialize the algorithm before calling of a Perform() method.

◆ ChFi2d_FilletAlgo() [2/3]

ChFi2d_FilletAlgo::ChFi2d_FilletAlgo ( const TopoDS_Wire theWire,
const gp_Pln thePlane 
)

A constructor of a fillet algorithm: accepts a wire consisting of two edges in a plane.

◆ ChFi2d_FilletAlgo() [3/3]

ChFi2d_FilletAlgo::ChFi2d_FilletAlgo ( const TopoDS_Edge theEdge1,
const TopoDS_Edge theEdge2,
const gp_Pln thePlane 
)

A constructor of a fillet algorithm: accepts two edges in a plane.

Member Function Documentation

◆ Init() [1/2]

void ChFi2d_FilletAlgo::Init ( const TopoDS_Wire theWire,
const gp_Pln thePlane 
)

Initializes a fillet algorithm: accepts a wire consisting of two edges in a plane.

◆ Init() [2/2]

void ChFi2d_FilletAlgo::Init ( const TopoDS_Edge theEdge1,
const TopoDS_Edge theEdge2,
const gp_Pln thePlane 
)

Initializes a fillet algorithm: accepts two edges in a plane.

◆ NbResults()

Standard_Integer ChFi2d_FilletAlgo::NbResults ( const gp_Pnt thePoint)

Returns number of possible solutions. <thePoint> chooses a particular fillet in case of several fillets may be constructed (for example, a circle intersecting a segment in 2 points). Put the intersecting (or common) point of the edges.

◆ Perform()

Standard_Boolean ChFi2d_FilletAlgo::Perform ( const Standard_Real  theRadius)

Constructs a fillet edge. Returns true, if at least one result was found.

◆ Result()

TopoDS_Edge ChFi2d_FilletAlgo::Result ( const gp_Pnt thePoint,
TopoDS_Edge theEdge1,
TopoDS_Edge theEdge2,
const Standard_Integer  iSolution = -1 
)

Returns result (fillet edge, modified edge1, modified edge2), neares to the given point <thePoint> if iSolution == -1. <thePoint> chooses a particular fillet in case of several fillets may be constructed (for example, a circle intersecting a segment in 2 points). Put the intersecting (or common) point of the edges.


The documentation for this class was generated from the following file: