OCC.BRepExtrema module¶
-
class
BRepExtrema_DistShapeShape(*args)¶ Bases:
object- create empty tool
Return type: None - computation of the minimum distance (value and pair of points) using default deflection Default value is Precision::Confusion().
Parameters: - Shape1 (TopoDS_Shape &) –
- Shape2 (TopoDS_Shape &) –
- F (Extrema_ExtFlag) – default value is Extrema_ExtFlag_MINMAX
- A (Extrema_ExtAlgo) – default value is Extrema_ExtAlgo_Grad
Return type: - create tool and load both shapes into it
Parameters: - Shape1 (TopoDS_Shape &) –
- Shape2 (TopoDS_Shape &) –
- theDeflection (float) –
- F (Extrema_ExtFlag) – default value is Extrema_ExtFlag_MINMAX
- A (Extrema_ExtAlgo) – default value is Extrema_ExtAlgo_Grad
Return type: -
DumpToString()¶ BRepExtrema_DistShapeShape_DumpToString(BRepExtrema_DistShapeShape self) -> std::string
-
InnerSolution()¶ - True if one of the shapes is a solid and the other shape is completely or partially inside the solid.
Return type: bool
-
ParOnEdgeS1()¶ - gives the corresponding parameter t if the Nth solution is situated on an Egde of the first shape
Parameters: - N (int) –
- t (float &) –
Return type:
-
ParOnEdgeS2()¶ - gives the corresponding parameter t if the Nth solution is situated on an Egde of the first shape
Parameters: - N (int) –
- t (float &) –
Return type:
-
ParOnFaceS1()¶ - gives the corresponding parameters (U,V) if the Nth solution is situated on an face of the first shape
Parameters: - N (int) –
- u (float &) –
- v (float &) –
Return type:
-
ParOnFaceS2()¶ - gives the corresponding parameters (U,V) if the Nth solution is situated on an Face of the second shape
Parameters: - N (int) –
- u (float &) –
- v (float &) –
Return type:
-
Perform()¶ - computation of the minimum distance (value and couple of points). Parameter theDeflection is used to specify a maximum deviation of extreme distances from the minimum one. Returns IsDone status.
Return type: bool
-
PointOnShape1()¶ - Returns the Point corresponding to the <N>th solution on the first Shape
Parameters: N (int) – Return type: gp_Pnt
-
PointOnShape2()¶ - Returns the Point corresponding to the <N>th solution on the second Shape
Parameters: N (int) – Return type: gp_Pnt
-
SupportOnShape1()¶ - gives the support where the Nth solution on the first shape is situated. This support can be a Vertex, an Edge or a Face.
Parameters: N (int) – Return type: TopoDS_Shape
-
SupportOnShape2()¶ - gives the support where the Nth solution on the second shape is situated. This support can be a Vertex, an Edge or a Face.
Parameters: N (int) – Return type: TopoDS_Shape
-
SupportTypeShape1()¶ - gives the type of the support where the Nth solution on the first shape is situated: IsVertex => the Nth solution on the first shape is a Vertex IsOnEdge => the Nth soluion on the first shape is on a Edge IsInFace => the Nth solution on the first shape is inside a face the corresponding support is obtained by the method SupportOnShape1
Parameters: N (int) – Return type: BRepExtrema_SupportType
-
SupportTypeShape2()¶ - gives the type of the support where the Nth solution on the second shape is situated: IsVertex => the Nth solution on the second shape is a Vertex IsOnEdge => the Nth soluion on the secondt shape is on a Edge IsInFace => the Nth solution on the second shape is inside a face the corresponding support is obtained by the method SupportOnShape2
Parameters: N (int) – Return type: BRepExtrema_SupportType
-
thisown¶ The membership flag
-
class
BRepExtrema_DistanceSS(*args)¶ Bases:
object- computes the distance between two Shapes ( face edge vertex).
Parameters: - S1 (TopoDS_Shape &) –
- S2 (TopoDS_Shape &) –
- B1 (Bnd_Box &) –
- B2 (Bnd_Box &) –
- DstRef (float) –
- F (Extrema_ExtFlag) – default value is Extrema_ExtFlag_MINMAX
- A (Extrema_ExtAlgo) – default value is Extrema_ExtAlgo_Grad
Return type: - computes the distance between two Shapes ( face edge vertex). Parameter theDeflection is used to specify a maximum deviation of extreme distances from the minimum one. Default value is Precision::Confusion().
Parameters: Return type: -
Seq1Value()¶ - returns the list of solutions on the first shape
Return type: BRepExtrema_SeqOfSolution
-
Seq2Value()¶ - returns the list of solutions on the second shape
Return type: BRepExtrema_SeqOfSolution
-
SetFlag()¶ - sets the flag controlling minimum and maximum search
Parameters: F (Extrema_ExtFlag) – Return type: None
-
thisown¶ The membership flag
-
class
BRepExtrema_ExtCC(*args)¶ Bases:
objectReturn type: None - It calculates all the distances.
Parameters: - E1 (TopoDS_Edge &) –
- E2 (TopoDS_Edge &) –
Return type: -
ParameterOnE1()¶ - Returns the parameter on the first edge of the <N>th extremum distance.
Parameters: N (int) – Return type: float
-
ParameterOnE2()¶ - Returns the parameter on the second edge of the <N>th extremum distance.
Parameters: N (int) – Return type: float
-
Perform()¶ - An exception is raised if the fields have not been initialized.
Parameters: E1 (TopoDS_Edge &) – Return type: None
-
PointOnE1()¶ - Returns the Point of the <N>th extremum distance on the edge E1.
Parameters: N (int) – Return type: gp_Pnt
-
PointOnE2()¶ - Returns the Point of the <N>th extremum distance on the edge E2.
Parameters: N (int) – Return type: gp_Pnt
-
SquareDistance()¶ - Returns the value of the <N>th extremum square distance.
Parameters: N (int) – Return type: float
-
TrimmedSquareDistances()¶ - if the edges is a trimmed curve, dist11 is a square distance between the point on E1 of parameter FirstParameter and the point of parameter FirstParameter on E2.
Parameters: Return type:
-
thisown¶ The membership flag
-
class
BRepExtrema_ExtCF(*args)¶ Bases:
objectReturn type: None - It calculates all the distances.
Parameters: - E (TopoDS_Edge &) –
- F (TopoDS_Face &) –
Return type: -
ParameterOnEdge()¶ - Returns the parameters on the Edge of the <N>th extremum distance.
Parameters: N (int) – Return type: float
-
ParameterOnFace()¶ - Returns the parameters on the Face of the <N>th extremum distance.
Parameters: - N (int) –
- U (float &) –
- V (float &) –
Return type:
-
Perform()¶ - An exception is raised if the fields have not been initialized. Be careful: this method uses the Face only for classify not for the fields.
Parameters: - E (TopoDS_Edge &) –
- F (TopoDS_Face &) –
Return type:
-
PointOnEdge()¶ - Returns the Point of the <N>th extremum distance.
Parameters: N (int) – Return type: gp_Pnt
-
PointOnFace()¶ - Returns the Point of the <N>th extremum distance.
Parameters: N (int) – Return type: gp_Pnt
-
SquareDistance()¶ - Returns the value of the <N>th extremum square distance.
Parameters: N (int) – Return type: float
-
thisown¶ The membership flag
-
class
BRepExtrema_ExtFF(*args)¶ Bases:
objectReturn type: None - It calculates all the distances.
Parameters: - F1 (TopoDS_Face &) –
- F2 (TopoDS_Face &) –
Return type: -
ParameterOnFace1()¶ - Returns the parameters on the Face F1 of the <N>th extremum distance.
Parameters: - N (int) –
- U (float &) –
- V (float &) –
Return type:
-
ParameterOnFace2()¶ - Returns the parameters on the Face F2 of the <N>th extremum distance.
Parameters: - N (int) –
- U (float &) –
- V (float &) –
Return type:
-
Perform()¶ - An exception is raised if the fields have not been initialized. Be careful: this method uses the Face F2 only for classify, not for the fields.
Parameters: - F1 (TopoDS_Face &) –
- F2 (TopoDS_Face &) –
Return type:
-
PointOnFace1()¶ - Returns the Point of the <N>th extremum distance.
Parameters: N (int) – Return type: gp_Pnt
-
PointOnFace2()¶ - Returns the Point of the <N>th extremum distance.
Parameters: N (int) – Return type: gp_Pnt
-
SquareDistance()¶ - Returns the value of the <N>th extremum square distance.
Parameters: N (int) – Return type: float
-
thisown¶ The membership flag
-
class
BRepExtrema_ExtPC(*args)¶ Bases:
objectReturn type: None - It calculates all the distances.
Parameters: - V (TopoDS_Vertex &) –
- E (TopoDS_Edge &) –
Return type: -
IsMin()¶ - Returns True if the <N>th extremum distance is a minimum.
Parameters: N (int) – Return type: bool
-
Parameter()¶ - Returns the parameter on the edge of the <N>th extremum distance.
Parameters: N (int) – Return type: float
-
Perform()¶ - An exception is raised if the fields have not been initialized.
Parameters: V (TopoDS_Vertex &) – Return type: None
-
SquareDistance()¶ - Returns the value of the <N>th extremum square distance.
Parameters: N (int) – Return type: float
-
TrimmedSquareDistances()¶ - if the curve is a trimmed curve, dist1 is a square distance between <P> and the point of parameter FirstParameter <pnt1> and dist2 is a square distance between <P> and the point of parameter LastParameter <pnt2>.
Parameters: Return type:
-
thisown¶ The membership flag
-
class
BRepExtrema_ExtPF(*args)¶ Bases:
objectReturn type: None - It calculates all the distances.
Parameters: - TheVertex (TopoDS_Vertex &) –
- TheFace (TopoDS_Face &) –
- TheFlag (Extrema_ExtFlag) – default value is Extrema_ExtFlag_MINMAX
- TheAlgo (Extrema_ExtAlgo) – default value is Extrema_ExtAlgo_Grad
Return type: -
Initialize()¶ Parameters: - TheFace (TopoDS_Face &) –
- TheFlag (Extrema_ExtFlag) – default value is Extrema_ExtFlag_MINMAX
- TheAlgo (Extrema_ExtAlgo) – default value is Extrema_ExtAlgo_Grad
Return type:
-
Parameter()¶ - Returns the parameters on the Face of the <N>th extremum distance.
Parameters: - N (int) –
- U (float &) –
- V (float &) –
Return type:
-
Perform()¶ - An exception is raised if the fields have not been initialized. Be careful: this method uses the Face only for classify not for the fields.
Parameters: - TheVertex (TopoDS_Vertex &) –
- TheFace (TopoDS_Face &) –
Return type:
-
SquareDistance()¶ - Returns the value of the <N>th extremum square distance.
Parameters: N (int) – Return type: float
-
thisown¶ The membership flag
-
class
BRepExtrema_Poly(*args, **kwargs)¶ Bases:
object-
static
Distance(*args)¶ - returns Standard_True if OK.
Parameters: Return type:
-
thisown¶ The membership flag
-
static
-
BRepExtrema_Poly_Distance(*args)¶ - returns Standard_True if OK.
Parameters: Return type:
-
class
BRepExtrema_SolutionElem(*args)¶ Bases:
object- Empty constructor
Return type: None - This constructor is used when the solution of a distance is a Vertex. The different initialized fields are: @param theDist the distance @param thePoint the solution point @param theSolType the type of solution @param theVertex and the Vertex
Parameters: Return type: - This constructor is used when the solution of distance is on an Edge. The different initialized fields are: @param theDist the distance @param thePoint the solution point @param theSolType the type of solution @param theEdge the Edge @param theParam the parameter to locate the solution
Parameters: Return type: - This constructor is used when the solution of distance is in a Face. The different initialized fields are: @param theDist the distance @param thePoint the solution point @param theSolType the type of solution @param theFace the Face @param theU U parameter to locate the solution @param theV V parameter to locate the solution
Parameters: Return type: -
Edge()¶ - Returns the vertex if the solution is an Edge.
Return type: TopoDS_Edge
-
EdgeParameter()¶ - Returns the parameter value if the solution is on Edge.
Parameters: theParam (float &) – Return type: None
-
Face()¶ - Returns the vertex if the solution is an Face.
Return type: TopoDS_Face
-
FaceParameter()¶ - Returns the parameters U and V if the solution is in a Face.
Parameters: - theU (float &) –
- theV (float &) –
Return type:
-
SupportKind()¶ - Returns the Support type: IsVertex => The solution is a vertex. IsOnEdge => The solution belongs to an Edge. IsInFace => The solution is inside a Face.
Return type: BRepExtrema_SupportType
-
Vertex()¶ - Returns the vertex if the solution is a Vertex.
Return type: TopoDS_Vertex
-
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