OCC.ChFi2d module¶
This package contains the algorithms used to buildfillets or chamfers on planar wire.This package provides two algorithms for 2D fillets:ChFi2d_Builder - it constructs a fillet or chamferfor linear and circular edges of a face.ChFi2d_FilletAPI - it encapsulates two algorithms:ChFi2d_AnaFilletAlgo - analytical constructor of the fillet.It works only for linear and circular edges,having a common point.ChFi2d_FilletAlgo - iteration recursive method constructingthe fillet edge for any type of edges includingellipses and b-splines.The edges may even have no common point.ChFi2d_ChamferAPI - an algoroithm for construction of chamfersbetween two linear edges of a plane.The algorithms ChFi2d_AnaFilletAlgo and ChFi2d_FilletAlgo may be used directlyor via the interface class ChFi2d_FilletAPI.
-
class
ChFi2d_AnaFilletAlgo
(*args)¶ Bases:
object
- An empty constructor. Use the method Init() to initialize the class.
Return type: None - A constructor. It expects a wire consisting of two edges of type (any combination of): - segment - arc of circle.
Parameters: - theWire (TopoDS_Wire &) –
- thePlane (gp_Pln) –
Return type: - A constructor. It expects two edges having a common point of type: - segment - arc of circle.
Parameters: - theEdge1 (TopoDS_Edge &) –
- theEdge2 (TopoDS_Edge &) –
- thePlane (gp_Pln) –
Return type: -
Init
()¶ - Initializes the class by a wire consisting of two edges.
Parameters: - theWire (TopoDS_Wire &) –
- thePlane (gp_Pln) –
Return type: - Initializes the class by two edges.
Parameters: - theEdge1 (TopoDS_Edge &) –
- theEdge2 (TopoDS_Edge &) –
- thePlane (gp_Pln) –
Return type:
-
Result
()¶ - Retrieves a result (fillet and shrinked neighbours).
Parameters: - e1 (TopoDS_Edge &) –
- e2 (TopoDS_Edge &) –
Return type:
-
thisown
¶ The membership flag
-
class
ChFi2d_Builder
(*args)¶ Bases:
object
Return type: None - The face <F> can be build on a closed or an open wire.
Parameters: F (TopoDS_Face &) – Return type: None -
AddChamfer
()¶ - Add a chamfer on the wire between the two edges connected <E1> and <E2>. <AddChamfer> returns the chamfer edge. This edge has sense only if the status <status> is <IsDone>.
Parameters: Return type: - Add a chamfer on the wire between the two edges connected to the vertex <V>. The chamfer will make an angle <Ang> with the edge <E>, and one of its extremities will be on <E> at distance <D>. The returned edge has sense only if the status <status> is <IsDone>. Warning: The value of <Ang> must be expressed in Radian.
Parameters: Return type:
-
AddFillet
()¶ - Add a fillet of radius <Radius> on the wire between the two edges connected to the vertex <V>. <AddFillet> returns the fillet edge. The returned edge has sense only if the status <status> is <IsDone>
Parameters: - V (TopoDS_Vertex &) –
- Radius (float) –
Return type:
-
BasisEdge
()¶ - Returns the parent edge of <E> Warning: If <E>is a basis edge, the returned edge would be equal to <E>
Parameters: E (TopoDS_Edge &) – Return type: TopoDS_Edge
-
ChamferEdges
()¶ - returns the list of new edges
Return type: TopTools_SequenceOfShape
-
DescendantEdge
()¶ - returns the modified edge if <E> has descendant or <E> in the other case.
Parameters: E (TopoDS_Edge &) – Return type: TopoDS_Edge
-
FilletEdges
()¶ - returns the list of new edges
Return type: TopTools_SequenceOfShape
-
Init
()¶ Parameters: - F (TopoDS_Face &) –
- RefFace (TopoDS_Face &) –
- ModFace (TopoDS_Face &) –
Return type: Return type:
-
ModifyChamfer
()¶ - modify the chamfer <Chamfer> and returns the new chamfer edge. This edge as sense only if the status <status> is <IsDone>.
Parameters: Return type: - modify the chamfer <Chamfer> and returns the new chamfer edge. This edge as sense only if the status <status> is <IsDone>. Warning: The value of <Ang> must be expressed in Radian.
Parameters: Return type:
-
ModifyFillet
()¶ - modify the fillet radius and return the new fillet edge. this edge has sense only if the status <status> is <IsDone>.
Parameters: - Fillet (TopoDS_Edge &) –
- Radius (float) –
Return type:
-
RemoveChamfer
()¶ - removes the chamfer <Chamfer> and returns the vertex connecting the two adjacent edges to this chamfer.
Parameters: Chamfer (TopoDS_Edge &) – Return type: TopoDS_Vertex
-
RemoveFillet
()¶ - removes the fillet <Fillet> and returns the vertex connecting the two adjacent edges to this fillet.
Parameters: Fillet (TopoDS_Edge &) – Return type: TopoDS_Vertex
-
Result
()¶ - returns the modified face
Return type: TopoDS_Face
-
Status
()¶ Return type: ChFi2d_ConstructionError
-
thisown
¶ The membership flag
-
class
ChFi2d_ChamferAPI
(*args)¶ Bases:
object
- An empty constructor.
Return type: None - A constructor accepting a wire consisting of two linear edges.
Parameters: theWire (TopoDS_Wire &) – Return type: None - A constructor accepting two linear edges.
Parameters: - theEdge1 (TopoDS_Edge &) –
- theEdge2 (TopoDS_Edge &) –
Return type: -
Init
()¶ - Initializes the class by a wire consisting of two libear edges.
Parameters: theWire (TopoDS_Wire &) – Return type: None - Initializes the class by two linear edges.
Parameters: - theEdge1 (TopoDS_Edge &) –
- theEdge2 (TopoDS_Edge &) –
Return type:
-
Result
()¶ Parameters: Return type:
-
thisown
¶ The membership flag
-
class
ChFi2d_FilletAPI
(*args)¶ Bases:
object
- An empty constructor of the fillet algorithm. Call a method Init() to initialize the algorithm before calling of a Perform() method.
Return type: None - A constructor of a fillet algorithm: accepts a wire consisting of two edges in a plane.
Parameters: - theWire (TopoDS_Wire &) –
- thePlane (gp_Pln) –
Return type: - A constructor of a fillet algorithm: accepts two edges in a plane.
Parameters: - theEdge1 (TopoDS_Edge &) –
- theEdge2 (TopoDS_Edge &) –
- thePlane (gp_Pln) –
Return type: -
Init
()¶ - Initializes a fillet algorithm: accepts a wire consisting of two edges in a plane.
Parameters: - theWire (TopoDS_Wire &) –
- thePlane (gp_Pln) –
Return type: - Initializes a fillet algorithm: accepts two edges in a plane.
Parameters: - theEdge1 (TopoDS_Edge &) –
- theEdge2 (TopoDS_Edge &) –
- thePlane (gp_Pln) –
Return type:
-
NbResults
()¶ - 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.
Parameters: thePoint (gp_Pnt) – Return type: int
-
Perform
()¶ - Constructs a fillet edge. Returns true if at least one result was found.
Parameters: theRadius (float) – Return type: bool
-
Result
()¶ - Returns result (fillet edge, modified edge1, modified edge2), nearest 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.
Parameters: Return type:
-
thisown
¶ The membership flag
-
class
ChFi2d_FilletAlgo
(*args)¶ Bases:
object
- An empty constructor of the fillet algorithm. Call a method Init() to initialize the algorithm before calling of a Perform() method.
Return type: None - A constructor of a fillet algorithm: accepts a wire consisting of two edges in a plane.
Parameters: - theWire (TopoDS_Wire &) –
- thePlane (gp_Pln) –
Return type: - A constructor of a fillet algorithm: accepts two edges in a plane.
Parameters: - theEdge1 (TopoDS_Edge &) –
- theEdge2 (TopoDS_Edge &) –
- thePlane (gp_Pln) –
Return type: -
Init
()¶ - Initializes a fillet algorithm: accepts a wire consisting of two edges in a plane.
Parameters: - theWire (TopoDS_Wire &) –
- thePlane (gp_Pln) –
Return type: - Initializes a fillet algorithm: accepts two edges in a plane.
Parameters: - theEdge1 (TopoDS_Edge &) –
- theEdge2 (TopoDS_Edge &) –
- thePlane (gp_Pln) –
Return type:
-
NbResults
()¶ - 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.
Parameters: thePoint (gp_Pnt) – Return type: int
-
Perform
()¶ - Constructs a fillet edge. Returns true, if at least one result was found
Parameters: theRadius (float) – Return type: bool
-
Result
()¶ - 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.
Parameters: Return type:
-
thisown
¶ The membership flag
-
class
SwigPyIterator
(*args, **kwargs)¶ Bases:
object
-
advance
()¶
-
copy
()¶
-
decr
()¶
-
distance
()¶
-
equal
()¶
-
incr
()¶
-
next
()¶
-
previous
()¶
-
thisown
¶ The membership flag
-
value
()¶
-
-
new_instancemethod
(func, inst, cls)¶
-
register_handle
(handle, base_object)¶ Inserts the handle into the base object to prevent memory corruption in certain cases