# OCC.BRepFilletAPI module

class `BRepFilletAPI_LocalOperation`(*args, **kwargs)

  Bases: `OCC.BRepBuilderAPI.BRepBuilderAPI_MakeShape`

  `Abscissa`()
    - returns the abscissa of the vertex V on the contour of index IC.

    Parameters: | IC (int) – V (TopoDS_Vertex &) –
    Return type: | float

  `Add`()
    - Adds a contour in the builder (builds a contour of tangent edges).

    Parameters: | E (TopoDS_Edge &) –
    Return type: | void

  `Closed`()
    - returns true if the contour of index IC is closed

    Parameters: | IC (int) –
    Return type: | bool

  `ClosedAndTangent`()
    - returns true if the contour of index IC is closed an tangent.

    Parameters: | IC (int) –
    Return type: | bool

  `Contour`()
    - Returns the index of the contour containing the edge E, returns 0 if E doesn’t belong to any contour.

    Parameters: | E (TopoDS_Edge &) –
    Return type: | int

  `Edge`()
    - Returns the Edge J in the contour I.

    Parameters: | I (int) – J (int) –
    Return type: | TopoDS_Edge

  `FirstVertex`()
    - Returns the first Vertex of the contour of index IC.

    Parameters: | IC (int) –
    Return type: | TopoDS_Vertex

  `LastVertex`()
    - Returns the last Vertex of the contour of index IC.

    Parameters: | IC (int) –
    Return type: | TopoDS_Vertex

  `Length`()
    - returns the length the contour of index IC.

    Parameters: | IC (int) –
    Return type: | float

  `NbContours`()
    - Number of contours.

    Return type: | int

  `NbEdges`()
    - Number of Edges in the contour I.

    Parameters: | I (int) –
    Return type: | int

  `NbSurf`()

    Parameters: | IC (int) –
    Return type: | int

  `RelativeAbscissa`()
    - returns the relative abscissa([0.,1.]) of the vertex V on the contour of index IC.

    Parameters: | IC (int) – V (TopoDS_Vertex &) –
    Return type: | float

  `Remove`()
    - remove the contour containing the Edge E.

    Parameters: | E (TopoDS_Edge &) –
    Return type: | void

  `Reset`()
    - Reset all the fields updated by Build operation and leave the algorithm in the same state than before build call. It allows contours and radius modifications to build the result another time.

    Return type: | void

  `ResetContour`()
    - Reset the contour of index IC, there is nomore information in the contour.

    Parameters: | IC (int) –
    Return type: | void

  `Sect`()

    Parameters: | IC (int) – IS (int) –
    Return type: | Handle_ChFiDS_SecHArray1

  `Simulate`()

    Parameters: | IC (int) –
    Return type: | void

  `thisown`

    The membership flag

class `BRepFilletAPI_MakeChamfer`(*args)

  Bases: `OCC.BRepFilletAPI.BRepFilletAPI_LocalOperation`

  - Initializes an algorithm for computing chamfers on the shape S. The edges on which chamfers are built are defined using the Add function.

  Parameters: | S (TopoDS_Shape &) –
  Return type: | None

  `Add`()
    - Adds edge E to the table of edges used by this algorithm to build chamfers, where the parameters of the chamfer must be set after the

    Parameters: | E (TopoDS_Edge &) –
    Return type: | None

    - Adds edge E to the table of edges used by this algorithm to build chamfers, where the parameters of the chamfer are given by the two distances Dis1 and Dis2; the face F identifies the side where Dis1 is measured. The Add function results in a contour being built by propagation from the edge E (i.e. the contour contains at least this edge). This contour is composed of edges of the shape which are tangential to one another and which delimit two series of tangential faces, with one series of faces being located on either side of the contour. Warning Nothing is done if edge E or the face F does not belong to the initial shape.

    Parameters: | Dis (float) – E (TopoDS_Edge &) – F (TopoDS_Face &) –
    Return type: | None

    - Adds a fillet contour in the builder (builds a contour of tangent edges to <E> and sets the two distances <Dis1> and <Dis2> ( parameters of the chamfer ) ).

    Parameters: | Dis1 (float) – Dis2 (float) – E (TopoDS_Edge &) – F (TopoDS_Face &) –
    Return type: | None

  `AddDA`()
    - Adds a fillet contour in the builder (builds a contour of tangent edges to <E> and sets the distance <Dis1> and angle <Angle> ( parameters of the chamfer ) ).

    Parameters: | Dis (float) – Angle (float) – E (TopoDS_Edge &) – F (TopoDS_Face &) –
    Return type: | None

  `Builder`()
    - Returns the internal filleting algorithm.

    Return type: | Handle_TopOpeBRepBuild_HBuilder

  `Dists`()
    - Returns the distances Dis1 and Dis2 which give the parameters of the chamfer along the contour of index IC in the internal data structure of this algorithm. Warning -1. is returned if IC is outside the bounds of the table of contours.

    Parameters: | IC (int) – Dis1 (float &) – Dis2 (float &) –
    Return type: | None

  `GetDist`()

    Parameters: | IC (int) – Dis (float &) –
    Return type: | None

  `GetDistAngle`()
    - gives the distances <Dis> and <Angle> of the fillet contour of index <IC> in the DS

    Parameters: | IC (int) – Dis (float &) – Angle (float &) – DisOnFace1 (bool) –
    Return type: | None

  `IsDistanceAngle`()
    - return True if chamfer is made with distance and angle false else.

    Parameters: | IC (int) –
    Return type: | bool

  `IsSymetric`()
    - return True if chamfer symetric false else.

    Parameters: | IC (int) –
    Return type: | bool

  `IsTwoDistances`()
    - return True if chamfer is made with two distances false else.

    Parameters: | IC (int) –
    Return type: | bool

  `SetDist`()
    - Sets the distances Dis1 and Dis2 which give the parameters of the chamfer along the contour of index IC generated using the Add function in the internal data structure of this algorithm. The face F identifies the side where Dis1 is measured. Warning Nothing is done if either the edge E or the face F does not belong to the initial shape.

    Parameters: | Dis (float) – IC (int) – F (TopoDS_Face &) –
    Return type: | None

  `SetDistAngle`()
    - set the distance <Dis> and <Angle> of the fillet contour of index <IC> in the DS with <Dis> on <F>. if the face <F> is not one of common faces of an edge of the contour <IC>

    Parameters: | Dis (float) – Angle (float) – IC (int) – F (TopoDS_Face &) –
    Return type: | None

  `SetDists`()
    - Sets the distances Dis1 and Dis2 which give the parameters of the chamfer along the contour of index IC generated using the Add function in the internal data structure of this algorithm. The face F identifies the side where Dis1 is measured. Warning Nothing is done if either the edge E or the face F does not belong to the initial shape.

    Parameters: | Dis1 (float) – Dis2 (float) – IC (int) – F (TopoDS_Face &) –
    Return type: | None

  `thisown`

    The membership flag

class `BRepFilletAPI_MakeFillet`(*args)

  Bases: `OCC.BRepFilletAPI.BRepFilletAPI_LocalOperation`

  - Initializes the computation of the fillets. <FShape> sets the type of fillet surface. The default value is ChFi3d_Rational (classical nurbs representation of circles). ChFi3d_QuasiAngular corresponds to a nurbs representation of circles which parameterisation matches the circle one. ChFi3d_Polynomial corresponds to a polynomial representation of circles.

  Parameters: | S (TopoDS_Shape &) – FShape (ChFi3d_FilletShape) – default value is ChFi3d_Rational
  Return type: | None

  `Add`()
    - Adds a fillet contour in the builder (builds a contour of tangent edges). The Radius must be set after.

    Parameters: | E (TopoDS_Edge &) –
    Return type: | None

    - Adds a fillet description in the builder - builds a contour of tangent edges, - sets the radius.

    Parameters: | Radius (float) – E (TopoDS_Edge &) –
    Return type: | None

    - Adds a fillet description in the builder - builds a contour of tangent edges, - sets a linear radius evolution law between the first and last vertex of the spine.

    Parameters: | R1 (float) – R2 (float) – E (TopoDS_Edge &) –
    Return type: | None

    - Adds a fillet description in the builder - builds a contour of tangent edges, - sest the radius evolution law.

    Parameters: | L (Handle_Law_Function &) – E (TopoDS_Edge &) –
    Return type: | None

    - Adds a fillet description in the builder - builds a contour of tangent edges, - sets the radius evolution law interpolating the values given in the array UandR : //! p2d.X() = relative parameter on the spine [0,1] p2d.Y() = value of the radius.

    Parameters: | UandR (TColgp_Array1OfPnt2d) – E (TopoDS_Edge &) –
    Return type: | None

  `BadShape`()
    - if (HasResult()) returns the partial result

    Return type: | TopoDS_Shape

  `Builder`()
    - Returns the internal topology building algorithm.

    Return type: | Handle_TopOpeBRepBuild_HBuilder

  `ComputedSurface`()
    - returns the surface number IS concerning the contour IC

    Parameters: | IC (int) – IS (int) –
    Return type: | Handle_Geom_Surface

  `FaultyContour`()
    - for each I in [1.. NbFaultyContours] returns the index IC of the contour where the computation of the fillet failed. the method NbEdges(IC) gives the number of edges in the contour IC the method Edge(IC,ie) gives the edge number ie of the contour IC

    Parameters: | I (int) –
    Return type: | int

  `FaultyVertex`()
    - returns the vertex where the computation failed

    Parameters: | IV (int) –
    Return type: | TopoDS_Vertex

  `GetBounds`()

    Parameters: | IC (int) – E (TopoDS_Edge &) – F (float &) – L (float &) –
    Return type: | bool

  `GetFilletShape`()
    - Returns the type of fillet shape built by this algorithm.

    Return type: | ChFi3d_FilletShape

  `GetLaw`()

    Parameters: | IC (int) – E (TopoDS_Edge &) –
    Return type: | Handle_Law_Function

  `HasResult`()
    - returns true if a part of the result has been computed if the filling in a corner failed a shape with a hole is returned

    Return type: | bool

  `IsConstant`()
    - Returns true if the radius of the fillet along the contour of index IC in the internal data structure of this algorithm is constant, Warning False is returned if IC is outside the bounds of the table of contours or if E does not belong to the contour of index IC.

    Parameters: | IC (int) –
    Return type: | bool

    - Returns true if the radius of the fillet along the edge E of the contour of index IC in the internal data structure of this algorithm is constant. Warning False is returned if IC is outside the bounds of the table of contours or if E does not belong to the contour of index IC.

    Parameters: | IC (int) – E (TopoDS_Edge &) –
    Return type: | bool

  `NbComputedSurfaces`()
    - returns the number of surfaces which have been computed on the contour IC

    Parameters: | IC (int) –
    Return type: | int

  `NbFaultyContours`()
    - Returns the number of contours where the computation of the fillet failed

    Return type: | int

  `NbFaultyVertices`()
    - returns the number of vertices where the computation failed

    Return type: | int

  `NbSurfaces`()
    - returns the number of surfaces after the shape creation.

    Return type: | int

  `NewFaces`()
    - Return the faces created for surface <I>.

    Parameters: | I (int) –
    Return type: | TopTools_ListOfShape

  `Radius`()
    - Returns the radius of the fillet along the contour of index IC in the internal data structure of this algorithm Warning - Use this function only if the radius is constant. - -1. is returned if IC is outside the bounds of the table of contours or if E does not belong to the contour of index IC.

    Parameters: | IC (int) –
    Return type: | float

    - Returns the radius of the fillet along the edge E of the contour of index IC in the internal data structure of this algorithm. Warning - Use this function only if the radius is constant. - -1 is returned if IC is outside the bounds of the table of contours or if E does not belong to the contour of index IC.

    Parameters: | IC (int) – E (TopoDS_Edge &) –
    Return type: | float

  `SetContinuity`()
    - Changes the parameters of continiuity InternalContinuity to produce fillet’surfaces with an continuity Ci (i=0,1 or 2). By defaultInternalContinuity = GeomAbs_C1. AngularTolerance is the G1 tolerance between fillet and support’faces.

    Parameters: | InternalContinuity (GeomAbs_Shape) – AngularTolerance (float) –
    Return type: | None

  `SetFilletShape`()
    - Assigns FShape as the type of fillet shape built by this algorithm.

    Parameters: | FShape (ChFi3d_FilletShape) –
    Return type: | None

  `SetLaw`()

    Parameters: | IC (int) – E (TopoDS_Edge &) – L (Handle_Law_Function &) –
    Return type: | None

  `SetParams`()

    Parameters: | Tang (float) – Tesp (float) – T2d (float) – TApp3d (float) – TolApp2d (float) – Fleche (float) –
    Return type: | None

  `SetRadius`()
    - Sets the parameters of the fillet along the contour of index IC generated using the Add function in the internal data structure of this algorithm, where Radius is the radius of the fillet.

    Parameters: | Radius (float) – IC (int) – IinC (int) –
    Return type: | None

    - Sets the parameters of the fillet along the contour of index IC generated using the Add function in the internal data structure of this algorithm, where the radius of the fillet evolves according to a linear evolution law defined from R1 to R2, between the first and last vertices of the contour of index IC.

    Parameters: | R1 (float) – R2 (float) – IC (int) – IinC (int) –
    Return type: | None

    - Sets the parameters of the fillet along the contour of index IC generated using the Add function in the internal data structure of this algorithm, where the radius of the fillet evolves according to the evolution law L, between the first and last vertices of the contour of index IC.

    Parameters: | L (Handle_Law_Function &) – IC (int) – IinC (int) –
    Return type: | None

    - Sets the parameters of the fillet along the contour of index IC generated using the Add function in the internal data structure of this algorithm, where the radius of the fillet evolves according to the evolution law which interpolates the set of parameter and radius pairs given in the array UandR as follows: - the X coordinate of a point in UandR defines a relative parameter on the contour (i.e. a parameter between 0 and 1), - the Y coordinate of a point in UandR gives the corresponding value of the radius, and the radius evolves between the first and last vertices of the contour of index IC.

    Parameters: | UandR (TColgp_Array1OfPnt2d) – IC (int) – IinC (int) –
    Return type: | None

    - Assigns Radius as the radius of the fillet on the edge E

    Parameters: | Radius (float) – IC (int) – E (TopoDS_Edge &) – Radius – IC – V (TopoDS_Vertex &) –
    Return type: | None
    Return type: | None

  `StripeStatus`()
    - returns the status concerning the contour IC in case of error ChFiDS_Ok : the computation is Ok ChFiDS_StartsolFailure : the computation can’t start, perhaps the the radius is too big ChFiDS_TwistedSurface : the computation failed because of a twisted surface ChFiDS_WalkingFailure : there is a problem in the walking ChFiDS_Error: other error different from above

    Parameters: | IC (int) –
    Return type: | ChFiDS_ErrorStatus

  `thisown`

    The membership flag

class `BRepFilletAPI_MakeFillet2d`(*args)

  Bases: `OCC.BRepBuilderAPI.BRepBuilderAPI_MakeShape`

  - Initializes an empty algorithm for computing fillets and chamfers. The face on which the fillets and chamfers are built is defined using the Init function. The vertices on which fillets or chamfers are built are defined using the AddFillet or AddChamfer function. Warning The status of the initialization, as given by the Status function, can be one of the following: - ChFi2d_Ready if the initialization is correct, - ChFi2d_NotPlanar if F is not planar, - ChFi2d_NoFace if F is a null face.

  Return type: | None

  - Initializes an algorithm for computing fillets and chamfers on the face F. The vertices on which fillets or chamfers are built are defined using the AddFillet or AddChamfer function. Warning The status of the initialization, as given by the Status function, can be one of the following: - ChFi2d_Ready if the initialization is correct, - ChFi2d_NotPlanar if F is not planar, - ChFi2d_NoFace if F is a null face.

  Parameters: | F (TopoDS_Face &) –
  Return type: | None

  `AddChamfer`()
    - Adds a chamfer on the face modified by this algorithm between the two adjacent edges E1 and E2, where the extremities of the chamfer are on E1 and E2 at distances D1 and D2 respectively In cases where the edges are not rectilinear, distances are measured using the curvilinear abscissa of the edges and the angle is measured with respect to the tangent at the corresponding point. The angle Ang is given in radians. This function returns the chamfer and builds the resulting face.

    Parameters: | E1 (TopoDS_Edge &) – E2 (TopoDS_Edge &) – D1 (float) – D2 (float) –
    Return type: | TopoDS_Edge

    - Adds a chamfer on the face modified by this algorithm between the two edges connected by the vertex V, where E is one of the two edges. The chamfer makes an angle Ang with E and one of its extremities is on E at distance D from V. In cases where the edges are not rectilinear, distances are measured using the curvilinear abscissa of the edges and the angle is measured with respect to the tangent at the corresponding point. The angle Ang is given in radians. This function returns the chamfer and builds the resulting face. Warning The status of the construction, as given by the Status function, can be one of the following: - ChFi2d_IsDone if the chamfer is built, - ChFi2d_ParametersError if D1, D2, D or Ang is less than or equal to zero, - ChFi2d_ConnexionError if: - the edge E, E1 or E2 does not belong to the initial face, or - the edges E1 and E2 are not adjacent, or - the vertex V is not one of the limit points of the edge E, - ChFi2d_ComputationError if the parameters of the chamfer are too large to build a chamfer between the two adjacent edges, - ChFi2d_NotAuthorized if: - the edge E1, E2 or one of the two edges connected to V is a fillet or chamfer, or - a curve other than a straight line or an arc of a circle is used as E, E1 or E2. Do not use the returned chamfer if the status of the construction is not ChFi2d_IsDone.

    Parameters: | E (TopoDS_Edge &) – V (TopoDS_Vertex &) – D (float) – Ang (float) –
    Return type: | TopoDS_Edge

  `AddFillet`()
    - Adds a fillet of radius Radius between the two edges adjacent to the vertex V on the face modified by this algorithm. The two edges do not need to be rectilinear. This function returns the fillet and builds the resulting face. Warning The status of the construction, as given by the Status function, can be one of the following: - ChFi2d_IsDone if the fillet is built, - ChFi2d_ConnexionError if V does not belong to the initial face, - ChFi2d_ComputationError if Radius is too large to build a fillet between the two adjacent edges, - ChFi2d_NotAuthorized - if one of the two edges connected to V is a fillet or chamfer, or - if a curve other than a straight line or an arc of a circle is used as E, E1 or E2. Do not use the returned fillet if the status of the construction is not ChFi2d_IsDone. Exceptions Standard_NegativeValue if Radius is less than or equal to zero.

    Parameters: | V (TopoDS_Vertex &) – Radius (float) –
    Return type: | TopoDS_Edge

  `BasisEdge`()
    - Returns the basis edge on the face modified by this algorithm from which the chamfered or filleted edge E is built. If E has not been modified, this function returns E. Warning E is returned if it does not belong to the initial face.

    Parameters: | E (TopoDS_Edge &) –
    Return type: | TopoDS_Edge

  `ChamferEdges`()
    - Returns the table of chamfers on the face modified by this algorithm.

    Return type: | TopTools_SequenceOfShape

  `DescendantEdge`()
    - Returns the chamfered or filleted edge built from the edge E on the face modified by this algorithm. If E has not been modified, this function returns E. Exceptions Standard_NoSuchObject if the edge E does not belong to the initial face.

    Parameters: | E (TopoDS_Edge &) –
    Return type: | TopoDS_Edge

  `FilletEdges`()
    - Returns the table of fillets on the face modified by this algorithm.

    Return type: | TopTools_SequenceOfShape

  `HasDescendant`()

    Parameters: | E (TopoDS_Edge &) –
    Return type: | bool

  `Init`()
    - Initializes this algorithm for constructing fillets or chamfers with the face F. Warning The status of the initialization, as given by the Status function, can be one of the following: - ChFi2d_Ready if the initialization is correct, - ChFi2d_NotPlanar if F is not planar, - ChFi2d_NoFace if F is a null face.

    Parameters: | F (TopoDS_Face &) –
    Return type: | None

    - This initialize method allow to init the builder from a face <RefFace> and another face <ModFace> which derive from <RefFace>. This is usefull to modify a fillet or a chamfer already created on <ModFace> .

    Parameters: | RefFace (TopoDS_Face &) – ModFace (TopoDS_Face &) –
    Return type: | None

  `IsModified`()
    - Returns true if the edge E on the face modified by this algorithm is chamfered or filleted. Warning Returns false if E does not belong to the face modified by this algorithm.

    Parameters: | E (TopoDS_Edge &) –
    Return type: | bool

  `ModifyChamfer`()
    - Modifies the chamfer Chamfer on the face modified by this algorithm, where: E1 and E2 are the two adjacent edges on which Chamfer is already built; the extremities of the new chamfer are on E1 and E2 at distances D1 and D2 respectively.

    Parameters: | Chamfer (TopoDS_Edge &) – E1 (TopoDS_Edge &) – E2 (TopoDS_Edge &) – D1 (float) – D2 (float) –
    Return type: | TopoDS_Edge

    - Modifies the chamfer Chamfer on the face modified by this algorithm, where: E is one of the two adjacent edges on which Chamfer is already built; the new chamfer makes an angle Ang with E and one of its extremities is on E at distance D from the vertex on which the chamfer is built. In cases where the edges are not rectilinear, the distances are measured using the curvilinear abscissa of the edges and the angle is measured with respect to the tangent at the corresponding point. The angle Ang is given in radians. This function returns the new chamfer and modifies the existing face. Warning The status of the construction, as given by the Status function, can be one of the following: - ChFi2d_IsDone if the chamfer is built, - ChFi2d_ParametersError if D1, D2, D or Ang is less than or equal to zero, - ChFi2d_ConnexionError if: - the edge E, E1, E2 or Chamfer does not belong to the existing face, or - the edges E1 and E2 are not adjacent, - ChFi2d_ComputationError if the parameters of the chamfer are too large to build a chamfer between the two adjacent edges, - ChFi2d_NotAuthorized if E1 or E2 is a fillet or chamfer. Do not use the returned chamfer if the status of the construction is not ChFi2d_IsDone.

    Parameters: | Chamfer (TopoDS_Edge &) – E (TopoDS_Edge &) – D (float) – Ang (float) –
    Return type: | TopoDS_Edge

  `ModifyFillet`()
    - Assigns the radius Radius to the fillet Fillet already built on the face modified by this algorithm. This function returns the new fillet and modifies the existing face. Warning The status of the construction, as given by the Status function, can be one of the following: - ChFi2d_IsDone if the new fillet is built, - ChFi2d_ConnexionError if Fillet does not belong to the existing face, - ChFi2d_ComputationError if Radius is too large to build a fillet between the two adjacent edges. Do not use the returned fillet if the status of the construction is not ChFi2d_IsDone. Exceptions Standard_NegativeValue if Radius is less than or equal to zero.

    Parameters: | Fillet (TopoDS_Edge &) – Radius (float) –
    Return type: | TopoDS_Edge

  `NbChamfer`()
    - Returns the number of chamfers on the face modified by this algorithm.

    Return type: | int

  `NbCurves`()
    - returns the number of new curves after the shape creation.

    Return type: | int

  `NbFillet`()
    - Returns the number of fillets on the face modified by this algorithm.

    Return type: | int

  `NewEdges`()
    - Return the Edges created for curve I.

    Parameters: | I (int) –
    Return type: | TopTools_ListOfShape

  `RemoveChamfer`()
    - Removes the chamfer Chamfer already built on the face modified by this algorithm. This function returns the vertex connecting the two adjacent edges of Chamfer and modifies the existing face. Warning - The returned vertex is only valid if the Status function returns ChFi2d_IsDone. - A null vertex is returned if the edge Chamfer does not belong to the initial face.

    Parameters: | Chamfer (TopoDS_Edge &) –
    Return type: | TopoDS_Vertex

  `RemoveFillet`()
    - Removes the fillet Fillet already built on the face modified by this algorithm. This function returns the vertex connecting the two adjacent edges of Fillet and modifies the existing face. Warning - The returned vertex is only valid if the Status function returns ChFi2d_IsDone. - A null vertex is returned if the edge Fillet does not belong to the initial face.

    Parameters: | Fillet (TopoDS_Edge &) –
    Return type: | TopoDS_Vertex

  `Status`()

    Return type: | ChFi2d_ConstructionError

  `thisown`

    The membership flag

class `SwigPyIterator`(*args, **kwargs)

  Bases: `object`

  `advance`()
  `copy`()
  `decr`()
  `distance`()
  `equal`()
  `incr`()
  `next`()
  `previous`()
  `thisown`

    The membership flag

  `value`()

`register_handle`(handle, base_object)

  Inserts the handle into the base object to prevent memory corruption in certain cases