OCC.BRepExtrema module¶
This package gives tools to compute extrema betweenShapes from BRep.
-
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_ElementFilter
(*args, **kwargs)¶ Bases:
object
-
DoCheck
= 2¶
-
NoCheck
= 0¶
-
Overlap
= 1¶
-
PreCheckElements
()¶ - Checks if two mesh elements should be tested for overlapping/intersection (used for detection correct/incorrect cases of shared edges and vertices).
Parameters: - Standard_Integer –
- Standard_Integer –
Return type: FilterResult
-
thisown
¶ The membership flag
-
-
class
BRepExtrema_ExtCC
(*args)¶ Bases:
object
Return 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:
object
Return 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:
object
Return 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:
object
Return 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:
object
Return 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
()¶ - returns Standard_True if OK.
Parameters: Return type:
-
thisown
¶ The membership flag
-
static
-
BRepExtrema_Poly_Distance
()¶ - returns Standard_True if OK.
Parameters: Return type:
-
class
BRepExtrema_SelfIntersection
(*args)¶ Bases:
OCC.BRepExtrema.BRepExtrema_ElementFilter
- Creates unitialized self-intersection tool.
Parameters: theTolerance (float) – default value is 0.0 Return type: None - Creates self-intersection tool for the given shape.
Parameters: - theShape (TopoDS_Shape &) –
- theTolerance (float) – default value is 0.0
Return type: -
ElementSet
()¶ - Returns set of all the face triangles of the shape.
Return type: Handle_BRepExtrema_TriangleSet
-
GetSubShape
()¶ - Returns sub-shape from the shape for the given index (started from 0).
Parameters: theID (int) – Return type: TopoDS_Face
-
LoadShape
()¶ - Loads shape for detection of self-intersections.
Parameters: theShape (TopoDS_Shape &) – Return type: bool
-
OverlapElements
()¶ - Returns set of IDs of overlapped sub-shapes (started from 0).
Return type: BRepExtrema_MapOfIntegerPackedMapOfInteger
-
SetTolerance
()¶ - Sets tolerance value used for self-intersection test.
Parameters: theTolerance (float) – Return type: None
-
thisown
¶ The membership flag
-
class
BRepExtrema_ShapeProximity
(*args)¶ Bases:
object
- Creates empty proximity tool.
Parameters: theTolerance (float) – default value is 0.0 Return type: None - Creates proximity tool for the given two shapes.
Parameters: - theShape1 (TopoDS_Shape &) –
- theShape2 (TopoDS_Shape &) –
- theTolerance (float) – default value is 0.0
Return type: -
ElementSet1
()¶ - Returns set of all the face triangles of the 1st shape.
Return type: Handle_BRepExtrema_TriangleSet
-
ElementSet2
()¶ - Returns set of all the face triangles of the 2nd shape.
Return type: Handle_BRepExtrema_TriangleSet
-
GetSubShape1
()¶ - Returns sub-shape from 1st shape with the given index (started from 0).
Parameters: theID (int) – Return type: TopoDS_Face
-
GetSubShape2
()¶ - Returns sub-shape from 1st shape with the given index (started from 0).
Parameters: theID (int) – Return type: TopoDS_Face
-
LoadShape1
()¶ - Loads 1st shape into proximity tool.
Parameters: theShape1 (TopoDS_Shape &) – Return type: bool
-
LoadShape2
()¶ - Loads 2nd shape into proximity tool.
Parameters: theShape2 (TopoDS_Shape &) – Return type: bool
-
OverlapSubShapes1
()¶ - Returns set of IDs of overlapped faces of 1st shape (started from 0).
Return type: BRepExtrema_MapOfIntegerPackedMapOfInteger
-
OverlapSubShapes2
()¶ - Returns set of IDs of overlapped faces of 2nd shape (started from 0).
Return type: BRepExtrema_MapOfIntegerPackedMapOfInteger
-
SetTolerance
()¶ - Sets tolerance value for overlap test (distance between shapes).
Parameters: theTolerance (float) – Return type: None
-
thisown
¶ The membership flag
-
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
()¶
-
-
new_instancemethod
(func, inst, cls)¶
-
register_handle
(handle, base_object)¶ Inserts the handle into the base object to prevent memory corruption in certain cases