AMCAX Kernel
Geometry kernel for CAD/CAE/CAM
AMCAX Kernel 1.0.0.0
AMCAX::MakeFillet Class Reference

The class of fillet. More...

#include <fillet/MakeFillet.hpp>

Inheritance diagram for AMCAX::MakeFillet:
Collaboration diagram for AMCAX::MakeFillet:

Public Member Functions

AMCAX_API MakeFillet (const TopoShape &s, FilletShapeType fiShape=FilletShapeType::Rational)
 Initialize the algorithm by setting a given shape and the type of fillet. More...
 
AMCAX_API void SetParams (double tolang, double tolesp, double tol2d, double tolApp3d, double tolApp2d, double fleche)
 Set the tolerance parameters. More...
 
AMCAX_API void SetContinuity (ContinuityType internalContinuity, double angularTolerance)
 Set the continuity and tolerace. More...
 
AMCAX_API void Add (const TopoEdge &e) override
 Add an edge to the fillet. More...
 
AMCAX_API void Add (double r, const TopoEdge &e)
 Add an edge with a radius to the fillet. More...
 
AMCAX_API void Add (double r1, double r2, const TopoEdge &e)
 Add an edge with a linear varying radius. More...
 
AMCAX_API void Add (const std::vector< Point2 > &UandR, const TopoEdge &e)
 Add an edge with a varying radius control by the parameter-radius pairs. More...
 
AMCAX_API void SetRadius (double r, int ic, int idxInSpine)
 Set the radius of the contour at given index. More...
 
AMCAX_API void SetRadius (double r1, double r2, int ic, int idxInSpine)
 Set the linear varying radius of the contour at given index. More...
 
AMCAX_API void SetRadius (const std::vector< Point2 > &UandR, int ic, int idxInSpine)
 Set the radius of the contour at a given index with parameter-radius pairs. More...
 
AMCAX_API void ResetContour (int ic) override
 Reset the contour at a given index. More...
 
AMCAX_API bool IsConstant (int ic)
 Is the contour has a constant radius. More...
 
AMCAX_API double Radius (int ic)
 Get the radius of the contour at a given index. More...
 
AMCAX_API bool IsConstant (int ic, const TopoEdge &e)
 Is the edge in a contour has a constant radius. More...
 
AMCAX_API double Radius (int ic, const TopoEdge &e)
 Get the radius of edge in the contour of given index. More...
 
AMCAX_API void SetRadius (double radius, int ic, const TopoEdge &e)
 Set the radius of edge in the contour of given index. More...
 
AMCAX_API void SetRadius (double radius, int ic, const TopoVertex &v)
 Set the radius of a vertex in the contour of given index. More...
 
AMCAX_API bool GetBounds (int ic, const TopoEdge &e, double &f, double &l)
 Get the radius bounds of the radius of an edge in a contour. More...
 
AMCAX_API void SetFilletShape (FilletShapeType fShape)
 Set the type of fillet shape. More...
 
AMCAX_API FilletShapeType GetFilletShape () const
 Get the type of fillet shape. More...
 
AMCAX_API int NContours () const override
 Get the number of contours. More...
 
AMCAX_API int Contour (const TopoEdge &e) const override
 Get the index of contour that contains a given edge, if the edge does not belong to any contour, return -1. More...
 
AMCAX_API int NEdges (int i) const override
 Get the number of edges in the i-th contour. More...
 
AMCAX_API const TopoEdgeEdge (int i, int j) const override
 Get the j-th edge in the i-th contour. More...
 
AMCAX_API void Remove (const TopoEdge &e) override
 Remove the contour containing a given edge. More...
 
AMCAX_API double Length (int ic) const override
 Get the length of the i-th contour. More...
 
AMCAX_API TopoVertex FirstVertex (int ic) const override
 Get the first vertex of the i-th contour. More...
 
AMCAX_API TopoVertex LastVertex (int ic) const override
 Get the last vertex of the i-th contour. More...
 
AMCAX_API double Abscissa (int ic, const TopoVertex &v) const override
 Get the abscissa of a vertex on the i-th contour. More...
 
AMCAX_API double RelativeAbscissa (int ic, const TopoVertex &v) const override
 Get the relative abscissa of a vertex on the i-th contour, range in [0, 1]. More...
 
AMCAX_API bool ClosedAndTangent (int ic) const override
 Get the status that whether the i-th contour is closed and tangent. More...
 
AMCAX_API bool Closed (int ic) const override
 Get the status that whether the i-th contour is closed. More...
 
AMCAX_API void Build () override
 Perform the algorithm. More...
 
AMCAX_API void Reset () override
 Reset the building state. More...
 
AMCAX_API const std::list< TopoShape > & Generated (const TopoShape &s) override
 Get the shapes generated from the given shape. More...
 
AMCAX_API const std::list< TopoShape > & Modified (const TopoShape &s) override
 Get the shapes modified from the given shape. More...
 
AMCAX_API bool IsDeleted (const TopoShape &s) override
 Is the given shape deleted. More...
 
AMCAX_API int NSurfaces () const
 Get the number of generated surfaces of the fillet. More...
 
AMCAX_API const std::list< TopoShape > & NewFaces (int i)
 Get the faces for the surface of a given index. More...
 
AMCAX_API void Simulate (int ic) override
 Simulate the i-th contour computation for fast preview. More...
 
AMCAX_API int NSurf (int ic) const override
 Get the number of surfaces in the i-th contour. More...
 
AMCAX_API int NFaultyContours () const
 Get the number of contours failed to perform fillet. More...
 
AMCAX_API int FaultyContour (int i) const
 Get the contour failed to perform fillet at a given index. More...
 
AMCAX_API int NComputedSurfaces (int ic) const
 Get the number of computed surfaces on the given index of contour. More...
 
AMCAX_API std::shared_ptr< Geom3SurfaceComputedSurface (int ic, int isurf) const
 Get the computed surface of given index. More...
 
AMCAX_API int NFaultyVertices () const
 Get the number of vertices failed to perform fillet. More...
 
AMCAX_API TopoVertex FaultyVertex (int iv) const
 Get the vertex failed to perform fillet of a given index. More...
 
AMCAX_API bool HasResult () const
 Are some partial results generated. More...
 
AMCAX_API TopoShape BadShape () const
 Get the bad partial result. More...
 
AMCAX_API ChamferFilletErrorStatus StripeStatus (int ic) const
 Get the error status of the contour of given index. More...
 
virtual AMCAX_API void Add (const TopoEdge &e)=0
 Add an edge and build a contour. More...
 
virtual AMCAX_API void ResetContour (int i)=0
 Reset the i-th contour. More...
 
virtual AMCAX_API int NContours () const =0
 Get the number of contours. More...
 
virtual AMCAX_API int Contour (const TopoEdge &e) const =0
 Get the index of contour that contains a given edge, if the edge does not belong to any contour, return -1. More...
 
virtual AMCAX_API int NEdges (int i) const =0
 Get the number of edges in the i-th contour. More...
 
virtual AMCAX_API const TopoEdgeEdge (int i, int j) const =0
 Get the j-th edge in the i-th contour. More...
 
virtual AMCAX_API void Remove (const TopoEdge &e)=0
 Remove the contour containing a given edge. More...
 
virtual AMCAX_API double Length (int i) const =0
 Get the length of the i-th contour. More...
 
virtual AMCAX_API TopoVertex FirstVertex (int i) const =0
 Get the first vertex of the i-th contour. More...
 
virtual AMCAX_API TopoVertex LastVertex (int i) const =0
 Get the last vertex of the i-th contour. More...
 
virtual AMCAX_API double Abscissa (int i, const TopoVertex &v) const =0
 Get the abscissa of a vertex on the i-th contour. More...
 
virtual AMCAX_API double RelativeAbscissa (int i, const TopoVertex &v) const =0
 Get the relative abscissa of a vertex on the i-th contour, range in [0, 1]. More...
 
virtual AMCAX_API bool ClosedAndTangent (int i) const =0
 Get the status that whether the i-th contour is closed and tangent. More...
 
virtual AMCAX_API bool Closed (int i) const =0
 Get the status that whether the i-th contour is closed. More...
 
virtual AMCAX_API void Reset ()=0
 Reset the building state. More...
 
virtual AMCAX_API void Simulate (int i)=0
 Simulate the i-th contour computation for fast preview. More...
 
virtual AMCAX_API int NSurf (int i) const =0
 Get the number of surfaces in the i-th contour. More...
 
- Public Member Functions inherited from AMCAX::MakeShape
virtual ~MakeShape ()=default
 Destructor.
 
virtual AMCAX_API bool IsDone () const
 Is the construction algorithm done. More...
 
virtual AMCAX_API void Build ()
 Perform the algorithm. More...
 
virtual AMCAX_API const TopoShapeShape ()
 Get the resulting shape. More...
 
AMCAX_API operator TopoShape ()
 Get the resulting shape. More...
 
virtual AMCAX_API const std::list< TopoShape > & Generated (const TopoShape &s)
 Get the shapes generated from the given shape. More...
 
virtual AMCAX_API const std::list< TopoShape > & Modified (const TopoShape &s)
 Get the shapes modified from the given shape. More...
 
virtual AMCAX_API bool IsDeleted (const TopoShape &s)
 Is the given shape deleted. More...
 

Additional Inherited Members

- Protected Member Functions inherited from AMCAX::MakeShape
 MakeShape ()=default
 Default constructor.
 
void Done ()
 Set the status by done.
 
void NotDone ()
 Set the status by not done.
 
- Protected Attributes inherited from AMCAX::MakeShape
TopoShape shape
 The resulting shape.
 
std::list< TopoShapegenerated
 The generated sub-shapes.
 

Detailed Description

The class of fillet.

Constructor & Destructor Documentation

◆ MakeFillet()

AMCAX_API AMCAX::MakeFillet::MakeFillet ( const TopoShape s,
FilletShapeType  fiShape = FilletShapeType::Rational 
)
explicit

Initialize the algorithm by setting a given shape and the type of fillet.

Parameters
sThe given shape
fiShapeType of fillet shape

Member Function Documentation

◆ Abscissa()

AMCAX_API double AMCAX::MakeFillet::Abscissa ( int  i,
const TopoVertex v 
) const
overridevirtual

Get the abscissa of a vertex on the i-th contour.

Parameters
iThe index of contour
vThe given vertex
Returns
The abscissa of vertex

Implements AMCAX::MakeChamferFilletBase.

◆ Add() [1/4]

AMCAX_API void AMCAX::MakeFillet::Add ( const std::vector< Point2 > &  UandR,
const TopoEdge e 
)

Add an edge with a varying radius control by the parameter-radius pairs.

Parameters
UandRThe pair values of parameter and radius
eThe edge

◆ Add() [2/4]

AMCAX_API void AMCAX::MakeFillet::Add ( const TopoEdge e)
overridevirtual

Add an edge to the fillet.

The radius must be set later

Parameters
eThe edge

Implements AMCAX::MakeChamferFilletBase.

◆ Add() [3/4]

AMCAX_API void AMCAX::MakeFillet::Add ( double  r,
const TopoEdge e 
)

Add an edge with a radius to the fillet.

Parameters
rThe radius
eThe edge

◆ Add() [4/4]

AMCAX_API void AMCAX::MakeFillet::Add ( double  r1,
double  r2,
const TopoEdge e 
)

Add an edge with a linear varying radius.

Parameters
r1The start radius
r2The end radius
eThe edge to be fillet

◆ BadShape()

AMCAX_API TopoShape AMCAX::MakeFillet::BadShape ( ) const

Get the bad partial result.

Returns
The partial result

◆ Build()

AMCAX_API void AMCAX::MakeFillet::Build ( )
overridevirtual

Perform the algorithm.

Reimplemented from AMCAX::MakeShape.

◆ Closed()

AMCAX_API bool AMCAX::MakeFillet::Closed ( int  i) const
overridevirtual

Get the status that whether the i-th contour is closed.

Parameters
iThe index of contour
Returns
Whether the contour is closed

Implements AMCAX::MakeChamferFilletBase.

◆ ClosedAndTangent()

AMCAX_API bool AMCAX::MakeFillet::ClosedAndTangent ( int  i) const
overridevirtual

Get the status that whether the i-th contour is closed and tangent.

Parameters
iThe index of contour
Returns
Whether the contour is closed and tangent

Implements AMCAX::MakeChamferFilletBase.

◆ ComputedSurface()

AMCAX_API std::shared_ptr< Geom3Surface > AMCAX::MakeFillet::ComputedSurface ( int  ic,
int  isurf 
) const

Get the computed surface of given index.

Parameters
icThe index of contour
isurfThe index of surface in the contour
Returns
The computed surface

◆ Contour()

AMCAX_API int AMCAX::MakeFillet::Contour ( const TopoEdge e) const
overridevirtual

Get the index of contour that contains a given edge, if the edge does not belong to any contour, return -1.

Parameters
eThe given edge
Returns
The index of contour

Implements AMCAX::MakeChamferFilletBase.

◆ Edge()

AMCAX_API const TopoEdge & AMCAX::MakeFillet::Edge ( int  i,
int  j 
) const
overridevirtual

Get the j-th edge in the i-th contour.

Parameters
iThe index of edge
jThe index of contour
Returns
The j-th edge in the i-th contour

Implements AMCAX::MakeChamferFilletBase.

◆ FaultyContour()

AMCAX_API int AMCAX::MakeFillet::FaultyContour ( int  i) const

Get the contour failed to perform fillet at a given index.

Parameters
iThe index of failed contour
Returns
The index of contour

◆ FaultyVertex()

AMCAX_API TopoVertex AMCAX::MakeFillet::FaultyVertex ( int  iv) const

Get the vertex failed to perform fillet of a given index.

Parameters
ivThe index of failed vertex
Returns
The failed vertex

◆ FirstVertex()

AMCAX_API TopoVertex AMCAX::MakeFillet::FirstVertex ( int  i) const
overridevirtual

Get the first vertex of the i-th contour.

Parameters
iThe index of contour
Returns
The first vertex of contour

Implements AMCAX::MakeChamferFilletBase.

◆ Generated()

AMCAX_API const std::list< TopoShape > & AMCAX::MakeFillet::Generated ( const TopoShape s)
overridevirtual

Get the shapes generated from the given shape.

Parameters
sThe given shape
Returns
The list of generated shapes

Reimplemented from AMCAX::MakeShape.

◆ GetBounds()

AMCAX_API bool AMCAX::MakeFillet::GetBounds ( int  ic,
const TopoEdge e,
double &  f,
double &  l 
)

Get the radius bounds of the radius of an edge in a contour.

Parameters
icThe index of contour
eThe edge
fThe first radius
lThe last radius
Returns
True if the edge has a radius bound

◆ GetFilletShape()

AMCAX_API FilletShapeType AMCAX::MakeFillet::GetFilletShape ( ) const

Get the type of fillet shape.

Returns
Type of fillet shape

◆ HasResult()

AMCAX_API bool AMCAX::MakeFillet::HasResult ( ) const

Are some partial results generated.

Returns
True if the algorithm has some intermediate result

◆ IsConstant() [1/2]

AMCAX_API bool AMCAX::MakeFillet::IsConstant ( int  ic)

Is the contour has a constant radius.

Parameters
icThe index of contour
Returns
True if the contour has a constant radius

◆ IsConstant() [2/2]

AMCAX_API bool AMCAX::MakeFillet::IsConstant ( int  ic,
const TopoEdge e 
)

Is the edge in a contour has a constant radius.

Parameters
icThe index of contour
eThe edge
Returns
True if the edge is in the contour and has a constant radius

◆ IsDeleted()

AMCAX_API bool AMCAX::MakeFillet::IsDeleted ( const TopoShape s)
overridevirtual

Is the given shape deleted.

Parameters
sThe given shape
Returns
True if the given shape is deleted

Reimplemented from AMCAX::MakeShape.

◆ LastVertex()

AMCAX_API TopoVertex AMCAX::MakeFillet::LastVertex ( int  i) const
overridevirtual

Get the last vertex of the i-th contour.

Parameters
iThe index of contour
Returns
The last vertex of contour

Implements AMCAX::MakeChamferFilletBase.

◆ Length()

AMCAX_API double AMCAX::MakeFillet::Length ( int  i) const
overridevirtual

Get the length of the i-th contour.

Parameters
iThe index of contour
Returns
The length of contour

Implements AMCAX::MakeChamferFilletBase.

◆ Modified()

AMCAX_API const std::list< TopoShape > & AMCAX::MakeFillet::Modified ( const TopoShape s)
overridevirtual

Get the shapes modified from the given shape.

Parameters
sThe given shape
Returns
The list of modified shapes

Reimplemented from AMCAX::MakeShape.

◆ NComputedSurfaces()

AMCAX_API int AMCAX::MakeFillet::NComputedSurfaces ( int  ic) const

Get the number of computed surfaces on the given index of contour.

Parameters
icThe index of contour
Returns
The number of computed surfaces

◆ NContours()

AMCAX_API int AMCAX::MakeFillet::NContours ( ) const
overridevirtual

Get the number of contours.

Returns
The number of contours

Implements AMCAX::MakeChamferFilletBase.

◆ NEdges()

AMCAX_API int AMCAX::MakeFillet::NEdges ( int  i) const
overridevirtual

Get the number of edges in the i-th contour.

Parameters
iThe index of contour
Returns
The number of edges

Implements AMCAX::MakeChamferFilletBase.

◆ NewFaces()

AMCAX_API const std::list< TopoShape > & AMCAX::MakeFillet::NewFaces ( int  i)

Get the faces for the surface of a given index.

Parameters
iThe index of surface
Returns
The list of face

◆ NFaultyContours()

AMCAX_API int AMCAX::MakeFillet::NFaultyContours ( ) const

Get the number of contours failed to perform fillet.

Returns
The number of failed contours

◆ NFaultyVertices()

AMCAX_API int AMCAX::MakeFillet::NFaultyVertices ( ) const

Get the number of vertices failed to perform fillet.

Returns
The number of failed vertices

◆ NSurf()

AMCAX_API int AMCAX::MakeFillet::NSurf ( int  i) const
overridevirtual

Get the number of surfaces in the i-th contour.

Parameters
iThe index of contour
Returns
The number of surfaces

Implements AMCAX::MakeChamferFilletBase.

◆ NSurfaces()

AMCAX_API int AMCAX::MakeFillet::NSurfaces ( ) const

Get the number of generated surfaces of the fillet.

Returns
The number of generated surfaces

◆ Radius() [1/2]

AMCAX_API double AMCAX::MakeFillet::Radius ( int  ic)

Get the radius of the contour at a given index.

Parameters
icThe index of contour
Returns
The radius

◆ Radius() [2/2]

AMCAX_API double AMCAX::MakeFillet::Radius ( int  ic,
const TopoEdge e 
)

Get the radius of edge in the contour of given index.

Parameters
icThe index of contour
eThe edge
Returns
The radius

◆ RelativeAbscissa()

AMCAX_API double AMCAX::MakeFillet::RelativeAbscissa ( int  i,
const TopoVertex v 
) const
overridevirtual

Get the relative abscissa of a vertex on the i-th contour, range in [0, 1].

Parameters
iThe index of contour
vThe given vertex
Returns
The relative abscissa of vertex

Implements AMCAX::MakeChamferFilletBase.

◆ Remove()

AMCAX_API void AMCAX::MakeFillet::Remove ( const TopoEdge e)
overridevirtual

Remove the contour containing a given edge.

Parameters
eThe given edge

Implements AMCAX::MakeChamferFilletBase.

◆ Reset()

AMCAX_API void AMCAX::MakeFillet::Reset ( )
overridevirtual

Reset the building state.

Implements AMCAX::MakeChamferFilletBase.

◆ ResetContour()

AMCAX_API void AMCAX::MakeFillet::ResetContour ( int  ic)
overridevirtual

Reset the contour at a given index.

Parameters
icThe index of contour

Implements AMCAX::MakeChamferFilletBase.

◆ SetContinuity()

AMCAX_API void AMCAX::MakeFillet::SetContinuity ( ContinuityType  internalContinuity,
double  angularTolerance 
)

Set the continuity and tolerace.

Parameters
internalContinuityThe continuity of fillet
angularToleranceThe tolerance used for G1 continuity

◆ SetFilletShape()

AMCAX_API void AMCAX::MakeFillet::SetFilletShape ( FilletShapeType  fShape)

Set the type of fillet shape.

Parameters
fShapeType of fillet shape

◆ SetParams()

AMCAX_API void AMCAX::MakeFillet::SetParams ( double  tolang,
double  tolesp,
double  tol2d,
double  tolApp3d,
double  tolApp2d,
double  fleche 
)

Set the tolerance parameters.

Parameters
tolangAngle tolerance
tolesp3d tolerance
tol2d2d tolerance
tolApp3d3d tolerance in approximation
tolApp2d2d tolerance in approximation
fleche

◆ SetRadius() [1/5]

AMCAX_API void AMCAX::MakeFillet::SetRadius ( const std::vector< Point2 > &  UandR,
int  ic,
int  idxInSpine 
)

Set the radius of the contour at a given index with parameter-radius pairs.

Parameters
UandRThe pair values of parameter and radius
icThe index of contour
idxInSpineThe index of edge in the contour

◆ SetRadius() [2/5]

AMCAX_API void AMCAX::MakeFillet::SetRadius ( double  r,
int  ic,
int  idxInSpine 
)

Set the radius of the contour at given index.

Parameters
rThe radius
icThe index of contour
idxInSpineThe index of edge in the contour

◆ SetRadius() [3/5]

AMCAX_API void AMCAX::MakeFillet::SetRadius ( double  r1,
double  r2,
int  ic,
int  idxInSpine 
)

Set the linear varying radius of the contour at given index.

Parameters
r1The start radius
r2The end radius
icThe index of contour
idxInSpineThe index of edge in the contour

◆ SetRadius() [4/5]

AMCAX_API void AMCAX::MakeFillet::SetRadius ( double  radius,
int  ic,
const TopoEdge e 
)

Set the radius of edge in the contour of given index.

Parameters
radiusthe radius
icThe index of contour
eThe edge

◆ SetRadius() [5/5]

AMCAX_API void AMCAX::MakeFillet::SetRadius ( double  radius,
int  ic,
const TopoVertex v 
)

Set the radius of a vertex in the contour of given index.

Parameters
radiusThe radius
icThe index of contour
vThe vertex

◆ Simulate()

AMCAX_API void AMCAX::MakeFillet::Simulate ( int  i)
overridevirtual

Simulate the i-th contour computation for fast preview.

Parameters
iThe index of contour

Implements AMCAX::MakeChamferFilletBase.

◆ StripeStatus()

AMCAX_API ChamferFilletErrorStatus AMCAX::MakeFillet::StripeStatus ( int  ic) const

Get the error status of the contour of given index.

Parameters
icThe index of contour
Returns
The error status

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