OCC.Core.ShapeAnalysis module¶
ShapeAnalysis module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_shapeanalysis.html
-
class
ShapeAnalysis_BoxBndTree
(*args)¶ Bases:
object
-
Add
()¶
-
Allocator
()¶
-
Clear
()¶
-
IsEmpty
()¶
-
Root
()¶
-
Select
()¶
-
property
thisown
¶ The membership flag
-
-
class
ShapeAnalysis_CheckSmallFace
(*args)¶ Bases:
object
- Creates an empty tool Checks a Shape i.e. each of its faces, records checks as diagnostics in the <infos> //! If <infos> has not been set before, no check is done //! For faces which are in a Shell, topological data are recorded to allow recovering connectivities after fixing or removing the small faces or parts of faces Enchains various checks on a face inshellto compute more informations, relevant to topology
- rtype
None
-
CheckPin
()¶ - Checks if a Face has a pin, which can be edited No singularityno pin, returns 0 If there is a pin, checked topics, with returned value- 0nothing to do more - 1‘smooth’, i.e. not a really sharp pin -> diagnostic ‘SmoothPin’ - 2stretched pin, i.e. is possible to relimit the face by another vertex, so that this vertex still gives a pin -> diagnostic ‘StretchedPin’ with location of vertex (Pnt)
- param F
- type F
TopoDS_Face
- param whatrow
- type whatrow
int
- param sence
- type sence
int
- rtype
bool
-
CheckPinEdges
()¶ - Parameters
theFirstEdge –
- type theFirstEdge
TopoDS_Edge
- param theSecondEdge
- type theSecondEdge
TopoDS_Edge
- param coef1
- type coef1
float
- param coef2
- type coef2
float
- param toler
- type toler
float
- rtype
bool
-
CheckPinFace
()¶ - Parameters
F –
- type F
TopoDS_Face
- param mapEdges
- type mapEdges
TopTools_DataMapOfShapeShape
- param toler
default value is -1.0
- type toler
float
- rtype
bool
-
CheckSingleStrip
()¶ - Checks if a Face is a single strip, i.e. brings two great edges which are confused on their whole length, possible other edges are small or null length //! Returns 0 if not a strip support, 1 strip in U, 2 strip in V Records diagnostic in info if it is a single strip
- param F
- type F
TopoDS_Face
- param E1
- type E1
TopoDS_Edge
- param E2
- type E2
TopoDS_Edge
- param tol
default value is -1.0
- type tol
float
- rtype
bool
-
CheckSplittingVertices
()¶ - Checks if a Face brings vertices which split it, either confused with non adjacent vertices, or confused with their projection on non adjacent edges Returns the count of found splitting vertices Each vertex then brings a diagnostic ‘SplittingVertex’, with data‘Face’ for the face, ‘Edge’ for the split edge
- param F
- type F
TopoDS_Face
- param MapEdges
- type MapEdges
TopTools_DataMapOfShapeListOfShape
- param MapParam
- type MapParam
ShapeAnalysis_DataMapOfShapeListOfReal
- param theAllVert
- type theAllVert
TopoDS_Compound
- rtype
int
-
CheckSpotFace
()¶ - Acts as IsSpotFace, but records in <infos> a diagnostic ‘SpotFace’ with the Pnt as value (data ‘Location’)
- param F
- type F
TopoDS_Face
- param tol
default value is -1.0
- type tol
float
- rtype
bool
-
CheckStripEdges
()¶ - Checks if two edges define a strip, i.e. distance maxi below tolerance, given or some of those of E1 and E2
- param E1
- type E1
TopoDS_Edge
- param E2
- type E2
TopoDS_Edge
- param tol
- type tol
float
- param dmax
- type dmax
float
- rtype
bool
-
CheckStripFace
()¶ - Checks if a Face is as a Strip Returns 0 if not or non determined, 1 if in U, 2 if in V By default, considers the tolerance zone of its edges A given value <tol> may be given to check a strip of max this width //! If a Face is determined as a Strip, it is delinited by two lists of edges. These lists are recorded in diagnostic Diagnostic ‘StripFace’ brings data ‘Direction’ (U or V), ‘List1’ , ‘List2’ (if they could be computed)
- param F
- type F
TopoDS_Face
- param E1
- type E1
TopoDS_Edge
- param E2
- type E2
TopoDS_Edge
- param tol
default value is -1.0
- type tol
float
- rtype
bool
-
CheckTwisted
()¶ - Checks if a Face is twisted (apart from checking Pin, i.e. it does not give information on pin, only ‘it is twisted’)
- param F
- type F
TopoDS_Face
- param paramu
- type paramu
float
- param paramv
- type paramv
float
- rtype
bool
-
FindStripEdges
()¶ - Searchs for two and only two edges up tolerance Returns True if OK, false if not 2 edges If True, returns the two edges and their maximum distance
- param F
- type F
TopoDS_Face
- param E1
- type E1
TopoDS_Edge
- param E2
- type E2
TopoDS_Edge
- param tol
- type tol
float
- param dmax
- type dmax
float
- rtype
bool
-
IsSpotFace
()¶ - Checks if a Face is as a Spot Returns 0 if not, 1 if yes, 2 if yes and all vertices are the same By default, considers the tolerance zone of its vertices A given value <tol> may be given to check a spot of this size If a Face is a Spot, its location is returned in <spot>, and <spotol> returns an equivalent tolerance, which is computed as half of max dimension of min-max box of the face
- param F
- type F
TopoDS_Face
- param spot
- type spot
gp_Pnt
- param spotol
- type spotol
float
- param tol
default value is -1.0
- type tol
float
- rtype
int
-
IsStripSupport
()¶ - Checks if a Face lies on a Surface which is a strip So the Face is a strip. But a Face may be a strip elsewhere .. //! A given value <tol> may be given to check max width By default, considers the tolerance zone of its edges Returns 0 if not a strip support, 1 strip in U, 2 strip in V
- param F
- type F
TopoDS_Face
- param tol
default value is -1.0
- type tol
float
- rtype
bool
-
SetTolerance
()¶ - Sets a fixed Tolerance to check small face By default, local tolerance zone is considered Sets a fixed MaxTolerance to check small face Sets a fixed Tolerance to check small face By default, local tolerance zone is considered Unset fixed tolerance, comes back to local tolerance zones Unset fixed tolerance, comes back to local tolerance zones
- param tol
- type tol
float
- rtype
None
-
Status
()¶ - Returns the status of last call to Perform() ShapeExtend_OKface was OK, nothing done ShapeExtend_DONE1: some wires are fixed ShapeExtend_DONE2: orientation of wires fixed ShapeExtend_DONE3: missing seam added ShapeExtend_DONE4: small area wire removed ShapeExtend_DONE5: natural bounds added ShapeExtend_FAIL1: some fails during fixing wires ShapeExtend_FAIL2: cannot fix orientation of wires ShapeExtend_FAIL3: cannot add missing seam ShapeExtend_FAIL4: cannot remove small area wire
- param status
- type status
ShapeExtend_Status
- rtype
bool
-
StatusPin
()¶ - Parameters
status –
- type status
ShapeExtend_Status
- rtype
bool
-
StatusPinEdges
()¶ - Parameters
status –
- type status
ShapeExtend_Status
- rtype
bool
-
StatusPinFace
()¶ - Parameters
status –
- type status
ShapeExtend_Status
- rtype
bool
-
StatusSplitVert
()¶ - Parameters
status –
- type status
ShapeExtend_Status
- rtype
bool
-
StatusSpot
()¶ - Parameters
status –
- type status
ShapeExtend_Status
- rtype
bool
-
StatusStrip
()¶ - Parameters
status –
- type status
ShapeExtend_Status
- rtype
bool
-
StatusTwisted
()¶ - Parameters
status –
- type status
ShapeExtend_Status
- rtype
bool
-
Tolerance
()¶ - Returns the tolerance to check small faces, negative value if local tolerances zones are to be considered
- rtype
float
-
property
thisown
¶ The membership flag
-
class
ShapeAnalysis_Curve
¶ Bases:
object
-
FillBndBox
()¶ - Computes a boundary box on segment of curve C2d from First to Last. This is done by taking NPoints points from the curve and, if Exact is True, by searching for exact extrema. All these points are added to Box.
- param C2d
- type C2d
Geom2d_Curve
- param First
- type First
float
- param Last
- type Last
float
- param NPoints
- type NPoints
int
- param Exact
- type Exact
bool
- param Box
- type Box
Bnd_Box2d
- rtype
None
-
static
GetSamplePoints
()¶ - Returns sample points which will serve as linearisation of the2d curve in range (first, last) The distribution of sample points is consystent with what is used by BRepTopAdaptor_FClass2d
- param curve
- type curve
Geom2d_Curve
- param first
- type first
float
- param last
- type last
float
- param seq
- type seq
TColgp_SequenceOfPnt2d
- rtype
bool* Returns sample points which will serve as linearisation of the curve in range (first, last)
- param curve
- type curve
Geom_Curve
- param first
- type first
float
- param last
- type last
float
- param seq
- type seq
TColgp_SequenceOfPnt
- rtype
bool
-
static
IsClosed
()¶ - Tells if the Curve is closed with given precision. If <preci> < 0 then Precision::Confusion is used.
- param curve
- type curve
Geom_Curve
- param preci
default value is -1
- type preci
float
- rtype
bool
-
static
IsPeriodic
()¶ - This method was implemented as fix for changes in trimmed curve behaviour. For the moment trimmed curve returns false anyway. So it is necessary to adapt all Data exchange tools for this behaviour. Current implementation takes into account that curve may be offset.
- param curve
- type curve
Geom_Curve
- rtype
bool* The same as for Curve3d.
- param curve
- type curve
Geom2d_Curve
- rtype
bool
-
static
IsPlanar
()¶ - Checks if points are planar with given preci. If Normal has not zero modulus, checks with given normal
- param pnts
- type pnts
TColgp_Array1OfPnt
- param Normal
- type Normal
gp_XYZ
- param preci
default value is 0
- type preci
float
- rtype
bool* Checks if curve is planar with given preci. If Normal has not zero modulus, checks with given normal
- param curve
- type curve
Geom_Curve
- param Normal
- type Normal
gp_XYZ
- param preci
default value is 0
- type preci
float
- rtype
bool
-
NextProject
()¶ - Projects a Point on a Curve using Newton method. <paramPrev> is taken as the first approximation of solution. If Newton algorithm fails the method Project() is used. If AdjustToEnds is True, point will be adjusted to the end of the curve if distance is less than <preci>
- param paramPrev
- type paramPrev
float
- param C3D
- type C3D
Geom_Curve
- param P3D
- type P3D
gp_Pnt
- param preci
- type preci
float
- param proj
- type proj
gp_Pnt
- param param
- type param
float
- param cf
- type cf
float
- param cl
- type cl
float
- param AdjustToEnds
default value is Standard_True
- type AdjustToEnds
bool
- rtype
float* Projects a Point on a Curve using Newton method. <paramPrev> is taken as the first approximation of solution. If Newton algorithm fails the method Project() is used.
- param paramPrev
- type paramPrev
float
- param C3D
- type C3D
Adaptor3d_Curve
- param P3D
- type P3D
gp_Pnt
- param preci
- type preci
float
- param proj
- type proj
gp_Pnt
- param param
- type param
float
- rtype
float
-
Project
()¶ - Projects a Point on a Curve. Computes the projected point and its parameter on the curve. <preci> is used as 3d precision (hence, 0 will produce reject unless exact confusion). The number of iterations is limited. If AdjustToEnds is True, point will be adjusted to the end of the curve if distance is less than <preci> //! Returned value is the distance between the given point and computed one.
- param C3D
- type C3D
Geom_Curve
- param P3D
- type P3D
gp_Pnt
- param preci
- type preci
float
- param proj
- type proj
gp_Pnt
- param param
- type param
float
- param AdjustToEnds
default value is Standard_True
- type AdjustToEnds
bool
- rtype
float* Projects a Point on a Curve. Computes the projected point and its parameter on the curve. <preci> is used as 3d precision (hence, 0 will produce reject unless exact confusion). The number of iterations is limited. //! Returned value is the distance between the given point and computed one.
- param C3D
- type C3D
Adaptor3d_Curve
- param P3D
- type P3D
gp_Pnt
- param preci
- type preci
float
- param proj
- type proj
gp_Pnt
- param param
- type param
float
- param AdjustToEnds
default value is Standard_True
- type AdjustToEnds
bool
- rtype
float* Projects a Point on a Curve, but parameters are limited between <cf> and <cl>. The range [cf, cl] is extended with help of Adaptor3d on the basis of 3d precision <preci>. If AdjustToEnds is True, point will be adjusted to the end of the curve if distance is less than <preci>
- param C3D
- type C3D
Geom_Curve
- param P3D
- type P3D
gp_Pnt
- param preci
- type preci
float
- param proj
- type proj
gp_Pnt
- param param
- type param
float
- param cf
- type cf
float
- param cl
- type cl
float
- param AdjustToEnds
default value is Standard_True
- type AdjustToEnds
bool
- rtype
float
-
ProjectAct
()¶ - Parameters
C3D –
- type C3D
Adaptor3d_Curve
- param P3D
- type P3D
gp_Pnt
- param preci
- type preci
float
- param proj
- type proj
gp_Pnt
- param param
- type param
float
- rtype
float
-
SelectForwardSeam
()¶ - Defines which pcurve (C1 or C2) should be chosen for FORWARD seam edge.
- param C1
- type C1
Geom2d_Curve
- param C2
- type C2
Geom2d_Curve
- rtype
int
-
ValidateRange
()¶ - Validate parameters First and Last for the given curve in order to make them valid for creation of edge. This includes: - limiting range [First,Last] by range of curve - adjusting range [First,Last] for periodic (or closed) curve if Last < First Returns True if parameters are OK or are successfully corrected, or False if parameters cannot be corrected. In the latter case, parameters are reset to range of curve.
- param Crv
- type Crv
Geom_Curve
- param First
- type First
float
- param Last
- type Last
float
- param prec
- type prec
float
- rtype
bool
-
property
thisown
¶ The membership flag
-
-
class
ShapeAnalysis_DataMapOfShapeListOfReal
(*args)¶ Bases:
object
-
Assign
()¶
-
Bind
()¶
-
Bound
()¶
-
ChangeFind
()¶
-
ChangeSeek
()¶
-
Clear
()¶
-
Exchange
()¶
-
Find
()¶
-
IsBound
()¶
-
ReSize
()¶
-
Seek
()¶
-
Set
()¶
-
Size
()¶
-
UnBind
()¶
-
begin
()¶
-
cbegin
()¶
-
cend
()¶
-
end
()¶
-
property
thisown
¶ The membership flag
-
-
class
ShapeAnalysis_Edge
(*args)¶ Bases:
object
- Empty constructor; initialises Status to OK
- rtype
None
-
BoundUV
()¶ - Parameters
edge –
- type edge
TopoDS_Edge
- param face
- type face
TopoDS_Face
- param first
- type first
gp_Pnt2d
- param last
- type last
gp_Pnt2d
- rtype
bool* Returns the ends of pcurve Calls method PCurve with <orient> equal to True
- param edge
- type edge
TopoDS_Edge
- param surface
- type surface
Geom_Surface
- param location
- type location
TopLoc_Location
- param first
- type first
gp_Pnt2d
- param last
- type last
gp_Pnt2d
- rtype
bool
-
CheckCurve3dWithPCurve
()¶ - Parameters
edge –
- type edge
TopoDS_Edge
- param face
- type face
TopoDS_Face
- rtype
bool* Checks mutual orientation of 3d curve and pcurve on the analysis of curves bounding points
- param edge
- type edge
TopoDS_Edge
- param surface
- type surface
Geom_Surface
- param location
- type location
TopLoc_Location
- rtype
bool
-
CheckOverlapping
()¶ - Checks the first edge is overlapped with second edge. If distance between two edges is less then theTolOverlap edges is overlapped. theDomainDis - length of part of edges on wich edges is overlapped.
- param theEdge1
- type theEdge1
TopoDS_Edge
- param theEdge2
- type theEdge2
TopoDS_Edge
- param theTolOverlap
- type theTolOverlap
float
- param theDomainDist
default value is 0.0
- type theDomainDist
float
- rtype
bool
-
CheckPCurveRange
()¶ - Checks possibility for pcurve thePC to have range [theFirst, theLast] (edge range) having respect to real first, last parameters of thePC
- param theFirst
- type theFirst
float
- param theLast
- type theLast
float
- param thePC
- type thePC
Geom2d_Curve
- rtype
bool
-
CheckSameParameter
()¶ - Checks the edge to be SameParameter. Calculates the maximal deviation between 3d curve and each pcurve of the edge on <NbControl> equidistant points (the same algorithm as in BRepCheck; default value is 23 as in BRepCheck). This deviation is returned in <maxdev> parameter. If deviation is greater than tolerance of the edge (i.e. incorrect flag) returns False, else returns True.
- param edge
- type edge
TopoDS_Edge
- param maxdev
- type maxdev
float
- param NbControl
default value is 23
- type NbControl
int
- rtype
bool* Checks the edge to be SameParameter. Calculates the maximal deviation between 3d curve and each pcurve of the edge on <NbControl> equidistant points (the same algorithm as in BRepCheck; default value is 23 as in BRepCheck). This deviation is returned in <maxdev> parameter. If deviation is greater than tolerance of the edge (i.e. incorrect flag) returns False, else returns True.
- param theEdge
- type theEdge
TopoDS_Edge
- param theFace
- type theFace
TopoDS_Face
- param theMaxdev
- type theMaxdev
float
- param theNbControl
default value is 23
- type theNbControl
int
- rtype
bool
-
CheckVertexTolerance
()¶ - Parameters
edge –
- type edge
TopoDS_Edge
- param face
- type face
TopoDS_Face
- param toler1
- type toler1
float
- param toler2
- type toler2
float
- rtype
bool* Checks if it is necessary to increase tolerances of the edge vertices to comprise the ends of 3d curve and pcurve on the given face (first method) or all pcurves stored in an edge (second one) toler1 returns necessary tolerance for first vertex, toler2 returns necessary tolerance for last vertex.
- param edge
- type edge
TopoDS_Edge
- param toler1
- type toler1
float
- param toler2
- type toler2
float
- rtype
bool
-
CheckVerticesWithCurve3d
()¶ - Checks the start and/or end vertex of the edge for matching with 3d curve with the given precision. <vtx> = 1start vertex only <vtx> = 2end vertex only <vtx> = 0both (default) If preci < 0 the vertices are considered with their own tolerances, else with the given <preci>.
- param edge
- type edge
TopoDS_Edge
- param preci
default value is -1
- type preci
float
- param vtx
default value is 0
- type vtx
int
- rtype
bool
-
CheckVerticesWithPCurve
()¶ - Parameters
edge –
- type edge
TopoDS_Edge
- param face
- type face
TopoDS_Face
- param preci
default value is -1
- type preci
float
- param vtx
default value is 0
- type vtx
int
- rtype
bool* Checks the start and/or end vertex of the edge for matching with pcurve with the given precision. <vtx> = 1 : start vertex <vtx> = 2 : end vertex <vtx> = 0 : both If preci < 0 the vertices are considered with their own tolerances, else with the given <preci>.
- param edge
- type edge
TopoDS_Edge
- param surface
- type surface
Geom_Surface
- param location
- type location
TopLoc_Location
- param preci
default value is -1
- type preci
float
- param vtx
default value is 0
- type vtx
int
- rtype
bool
-
static
ComputeDeviation
()¶ - Computes the maximal deviation between the two curve representations. dev is an input/output parameter and contains the computed deviation (should be initialized with 0. for the first call). Used by CheckSameParameter().
- param CRef
- type CRef
Adaptor3d_Curve
- param Other
- type Other
Adaptor3d_Curve
- param SameParameter
- type SameParameter
bool
- param dev
- type dev
float
- param NCONTROL
- type NCONTROL
int
- rtype
bool
-
Curve3d
()¶ - Returns the 3d curve and bounding parameteres for the edge Returns False if no 3d curve. If <orient> is True (default), takes orientation into account: if the edge is reversed, cf and cl are toggled
- param edge
- type edge
TopoDS_Edge
- param C3d
- type C3d
Geom_Curve
- param cf
- type cf
float
- param cl
- type cl
float
- param orient
default value is Standard_True
- type orient
bool
- rtype
bool
-
FirstVertex
()¶ - Returns start vertex of the edge (taking edge orientation into account).
- param edge
- type edge
TopoDS_Edge
- rtype
TopoDS_Vertex
-
GetEndTangent2d
()¶ - Parameters
edge –
- type edge
TopoDS_Edge
- param face
- type face
TopoDS_Face
- param atEnd
- type atEnd
bool
- param pos
- type pos
gp_Pnt2d
- param tang
- type tang
gp_Vec2d
- param dparam
default value is 0.0
- type dparam
float
- rtype
bool* Returns tangent of the edge pcurve at its start (if atEnd is False) or end (if True), regarding the orientation of edge. If edge is REVERSED, tangent is reversed before return. Returns True if pcurve is available and tangent is computed and is not null, else False.
- param edge
- type edge
TopoDS_Edge
- param surface
- type surface
Geom_Surface
- param location
- type location
TopLoc_Location
- param atEnd
- type atEnd
bool
- param pos
- type pos
gp_Pnt2d
- param tang
- type tang
gp_Vec2d
- param dparam
default value is 0.0
- type dparam
float
- rtype
bool
-
HasCurve3d
()¶ - Tells if the edge has a 3d curve
- param edge
- type edge
TopoDS_Edge
- rtype
bool
-
HasPCurve
()¶ - Tells if the Edge has a pcurve on the face.
- param edge
- type edge
TopoDS_Edge
- param face
- type face
TopoDS_Face
- rtype
bool* Tells if the edge has a pcurve on the surface (with location).
- param edge
- type edge
TopoDS_Edge
- param surface
- type surface
Geom_Surface
- param location
- type location
TopLoc_Location
- rtype
bool
-
IsClosed3d
()¶ - Gives True if the edge has a 3d curve, this curve is closed, and the edge has the same vertex at start and end
- param edge
- type edge
TopoDS_Edge
- rtype
bool
-
IsSeam
()¶ - Parameters
edge –
- type edge
TopoDS_Edge
- param face
- type face
TopoDS_Face
- rtype
bool* Returns True if the edge has two pcurves on one surface
- param edge
- type edge
TopoDS_Edge
- param surface
- type surface
Geom_Surface
- param location
- type location
TopLoc_Location
- rtype
bool
-
LastVertex
()¶ - Returns end vertex of the edge (taking edge orientation into account).
- param edge
- type edge
TopoDS_Edge
- rtype
TopoDS_Vertex
-
PCurve
()¶ - Parameters
edge –
- type edge
TopoDS_Edge
- param face
- type face
TopoDS_Face
- param C2d
- type C2d
Geom2d_Curve
- param cf
- type cf
float
- param cl
- type cl
float
- param orient
default value is Standard_True
- type orient
bool
- rtype
bool* Returns the pcurve and bounding parameteres for the edge lying on the surface. Returns False if the edge has no pcurve on this surface. If <orient> is True (default), takes orientation into account: if the edge is reversed, cf and cl are toggled
- param edge
- type edge
TopoDS_Edge
- param surface
- type surface
Geom_Surface
- param location
- type location
TopLoc_Location
- param C2d
- type C2d
Geom2d_Curve
- param cf
- type cf
float
- param cl
- type cl
float
- param orient
default value is Standard_True
- type orient
bool
- rtype
bool
-
Status
()¶ - Returns the status (in the form of True/False) of last Check
- param status
- type status
ShapeExtend_Status
- rtype
bool
-
property
thisown
¶ The membership flag
-
class
ShapeAnalysis_FreeBoundData
(*args)¶ Bases:
OCC.Core.Standard.Standard_Transient
- Empty constructor
- rtype
None* Creates object with contour given in the form of TopoDS_Wire
- param freebound
- type freebound
TopoDS_Wire
- rtype
None
-
AddNotch
()¶ - Adds notch on the contour with its maximum width
- param notch
- type notch
TopoDS_Wire
- param width
- type width
float
- rtype
None
-
Area
()¶ - Returns area of the contour
- rtype
float
-
Clear
()¶ - Clears all properties of the contour. Contour bound itself is not cleared.
- rtype
None
-
static
DownCast
(t)¶
-
FreeBound
()¶ - Returns contour
- rtype
TopoDS_Wire
-
NbNotches
()¶ - Returns number of notches on the contour
- rtype
int
-
Notch
()¶ - Returns notch on the contour
- param index
- type index
int
- rtype
TopoDS_Wire
-
NotchWidth
()¶ - Returns maximum width of notch specified by its rank number on the contour
- param index
- type index
int
- rtype
float* Returns maximum width of notch specified as TopoDS_Wire on the contour
- param notch
- type notch
TopoDS_Wire
- rtype
float
-
Notches
()¶ - Returns sequence of notches on the contour
- rtype
opencascade::handle<TopTools_HSequenceOfShape>
-
Perimeter
()¶ - Returns perimeter of the contour
- rtype
float
-
Ratio
()¶ - Returns ratio of average length to average width of the contour
- rtype
float
-
SetArea
()¶ - Sets area of the contour
- param area
- type area
float
- rtype
None
-
SetFreeBound
()¶ - Sets contour
- param freebound
- type freebound
TopoDS_Wire
- rtype
None
-
SetPerimeter
()¶ - Sets perimeter of the contour
- param perimeter
- type perimeter
float
- rtype
None
-
SetRatio
()¶ - Sets ratio of average length to average width of the contour
- param ratio
- type ratio
float
- rtype
None
-
SetWidth
()¶ - Sets average width of the contour
- param width
- type width
float
- rtype
None
-
Width
()¶ - Returns average width of the contour
- rtype
float
-
property
thisown
¶ The membership flag
-
class
ShapeAnalysis_FreeBounds
(*args)¶ Bases:
object
- Empty constructor
- rtype
None* Builds forecasting free bounds of the <shape>. <shape> should be a compound of faces. This constructor is to be used for forecasting free edges with help of sewing analyzer BRepAlgo_Sewing which is called with tolerance <toler>. Free edges are connected into wires only when their ends are at distance less than <toler>. If <splitclosed> is True extracts closed sub-wires out of built closed wires. If <splitopen> is True extracts closed sub-wires out of built open wires.
- param shape
- type shape
TopoDS_Shape
- param toler
- type toler
float
- param splitclosed
default value is Standard_False
- type splitclosed
bool
- param splitopen
default value is Standard_True
- type splitopen
bool
- rtype
None* Builds actual free bounds of the <shape>. <shape> should be a compound of shells. This constructor is to be used for getting free edges (ones referenced by the only face) with help of analyzer ShapeAnalysis_Shell. Free edges are connected into wires only when they share the same vertex. If <splitclosed> is True extracts closed sub-wires out of built closed wires. If <splitopen> is True extracts closed sub-wires out of built open wires.
- param shape
- type shape
TopoDS_Shape
- param splitclosed
default value is Standard_False
- type splitclosed
bool
- param splitopen
default value is Standard_True
- type splitopen
bool
- param checkinternaledges
default value is Standard_False
- type checkinternaledges
bool
- rtype
None
-
static
ConnectEdgesToWires
()¶ - Builds sequnce of <wires> out of sequence of not sorted <edges>. Tries to build wires of maximum length. Building a wire is stopped when no edges can be connected to it at its head or at its tail. //! Orientation of the edge can change when connecting. If <shared> is True connection is performed only when adjacent edges share the same vertex. If <shared> is False connection is performed only when ends of adjacent edges are at distance less than <toler>.
- param edges
- type edges
TopTools_HSequenceOfShape
- param toler
- type toler
float
- param shared
- type shared
bool
- param wires
- type wires
TopTools_HSequenceOfShape
- rtype
void
-
static
ConnectWiresToWires
()¶ - Parameters
iwires –
- type iwires
TopTools_HSequenceOfShape
- param toler
- type toler
float
- param shared
- type shared
bool
- param owires
- type owires
TopTools_HSequenceOfShape
- rtype
void* Builds sequnce of <owires> out of sequence of not sorted <iwires>. Tries to build wires of maximum length. Building a wire is stopped when no wires can be connected to it at its head or at its tail. //! Orientation of the wire can change when connecting. If <shared> is True connection is performed only when adjacent wires share the same vertex. If <shared> is False connection is performed only when ends of adjacent wires are at distance less than <toler>. Map <vertices> stores the correspondence between original end vertices of the wires and new connecting vertices.
- param iwires
- type iwires
TopTools_HSequenceOfShape
- param toler
- type toler
float
- param shared
- type shared
bool
- param owires
- type owires
TopTools_HSequenceOfShape
- param vertices
- type vertices
TopTools_DataMapOfShapeShape
- rtype
void
-
static
DispatchWires
()¶ - Dispatches sequence of <wires> into two compounds <closed> for closed wires and <open> for open wires. If a compound is not empty wires are added into it.
- param wires
- type wires
TopTools_HSequenceOfShape
- param closed
- type closed
TopoDS_Compound
- param open
- type open
TopoDS_Compound
- rtype
void
-
GetClosedWires
()¶ - Returns compound of closed wires out of free edges.
- rtype
TopoDS_Compound
-
GetOpenWires
()¶ - Returns compound of open wires out of free edges.
- rtype
TopoDS_Compound
-
static
SplitWires
()¶ - Extracts closed sub-wires out of <wires> and adds them to <closed>, open wires remained after extraction are put into <open>. If <shared> is True extraction is performed only when edges share the same vertex. If <shared> is False connection is performed only when ends of the edges are at distance less than <toler>.
- param wires
- type wires
TopTools_HSequenceOfShape
- param toler
- type toler
float
- param shared
- type shared
bool
- param closed
- type closed
TopTools_HSequenceOfShape
- param open
- type open
TopTools_HSequenceOfShape
- rtype
void
-
property
thisown
¶ The membership flag
-
class
ShapeAnalysis_FreeBoundsProperties
(*args)¶ Bases:
object
- Empty constructor
- rtype
None* Creates the object and calls corresponding Init. <shape> should be a compound of faces.
- param shape
- type shape
TopoDS_Shape
- param tolerance
- type tolerance
float
- param splitclosed
default value is Standard_False
- type splitclosed
bool
- param splitopen
default value is Standard_False
- type splitopen
bool
- rtype
None* Creates the object and calls corresponding Init. <shape> should be a compound of shells.
- param shape
- type shape
TopoDS_Shape
- param splitclosed
default value is Standard_False
- type splitclosed
bool
- param splitopen
default value is Standard_False
- type splitopen
bool
- rtype
None
-
CheckContours
()¶ - Parameters
prec – default value is 0.0 :type prec: float :rtype: bool
-
CheckNotches
()¶ - Parameters
prec – default value is 0.0 :type prec: float :rtype: bool:param fbData: :type fbData: ShapeAnalysis_FreeBoundData :param prec: default value is 0.0 :type prec: float :rtype: bool:param freebound: :type freebound: TopoDS_Wire :param num: :type num: int :param notch: :type notch: TopoDS_Wire :param distMax: :type distMax: float :param prec: default value is 0.0 :type prec: float :rtype: bool
-
ClosedFreeBound
()¶ - Returns properties of closed free bound specified by its rank number
- param index
- type index
int
- rtype
opencascade::handle<ShapeAnalysis_FreeBoundData>
-
ClosedFreeBounds
()¶ - Returns all closed free bounds
- rtype
opencascade::handle<ShapeAnalysis_HSequenceOfFreeBounds>
-
FillProperties
()¶ - Parameters
fbData –
- type fbData
ShapeAnalysis_FreeBoundData
- param prec
default value is 0.0
- type prec
float
- rtype
bool
-
Init
()¶ - Initializes the object with given parameters. <shape> should be a compound of faces.
- param shape
- type shape
TopoDS_Shape
- param tolerance
- type tolerance
float
- param splitclosed
default value is Standard_False
- type splitclosed
bool
- param splitopen
default value is Standard_False
- type splitopen
bool
- rtype
None* Initializes the object with given parameters. <shape> should be a compound of shells.
- param shape
- type shape
TopoDS_Shape
- param splitclosed
default value is Standard_False
- type splitclosed
bool
- param splitopen
default value is Standard_False
- type splitopen
bool
- rtype
None
-
IsLoaded
()¶ - Returns True if shape is loaded
- rtype
bool
-
NbClosedFreeBounds
()¶ - Returns number of closed free bounds
- rtype
int
-
NbFreeBounds
()¶ - Returns number of free bounds
- rtype
int
-
NbOpenFreeBounds
()¶ - Returns number of open free bounds
- rtype
int
-
OpenFreeBound
()¶ - Returns properties of open free bound specified by its rank number
- param index
- type index
int
- rtype
opencascade::handle<ShapeAnalysis_FreeBoundData>
-
OpenFreeBounds
()¶ - Returns all open free bounds
- rtype
opencascade::handle<ShapeAnalysis_HSequenceOfFreeBounds>
-
Perform
()¶ - Builds and analyzes free bounds of the shape. First calls ShapeAnalysis_FreeBounds for building free bounds. Then on each free bound computes its properties: - area of the contour, - perimeter of the contour, - ratio of average length to average width of the contour, - average width of contour, - notches on the contour and for each notch - maximum width of the notch.
- rtype
bool
-
Shape
()¶ - Returns shape
- rtype
TopoDS_Shape
-
Tolerance
()¶ - Returns tolerance
- rtype
float
-
property
thisown
¶ The membership flag
-
class
ShapeAnalysis_Geom
¶ Bases:
object
-
static
NearestPlane
()¶ - Builds a plane out of a set of points in array Returns in <dmax> the maximal distance between the produced plane and given points
- param Pnts
- type Pnts
TColgp_Array1OfPnt
- param aPln
- type aPln
gp_Pln
- param Dmax
- type Dmax
float
- rtype
bool
-
static
PositionTrsf
()¶ - Builds transfromation object out of matrix. Matrix must be 3 x 4. Unit is used as multiplier.
- param coefs
- type coefs
TColStd_HArray2OfReal
- param trsf
- type trsf
gp_Trsf
- param unit
- type unit
float
- param prec
- type prec
float
- rtype
bool
-
property
thisown
¶ The membership flag
-
static
-
class
ShapeAnalysis_HSequenceOfFreeBounds
(*args)¶ Bases:
OCC.Core.ShapeAnalysis.ShapeAnalysis_SequenceOfFreeBounds
,OCC.Core.Standard.Standard_Transient
Empty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
Append
()¶
-
ChangeSequence
()¶
-
static
DownCast
(t)¶
-
Sequence
()¶
-
property
thisown
¶ The membership flag
-
class
ShapeAnalysis_SequenceOfFreeBounds
(*args)¶ Bases:
object
-
Append
()¶
-
Assign
()¶
-
ChangeFirst
()¶
-
ChangeLast
()¶
-
ChangeValue
()¶
-
Clear
()¶
-
Exchange
()¶
-
First
()¶
-
InsertAfter
()¶
-
InsertBefore
()¶
-
IsEmpty
()¶
-
Last
()¶
-
Length
()¶
-
Lower
()¶
-
Prepend
()¶
-
Remove
()¶
-
Reverse
()¶
-
Set
()¶
-
SetValue
()¶
-
Size
()¶
-
Split
()¶
-
Upper
()¶
-
Value
()¶
-
begin
()¶
-
cbegin
()¶
-
cend
()¶
-
static
delNode
()¶
-
end
()¶
-
property
thisown
¶ The membership flag
-
-
class
ShapeAnalysis_ShapeContents
(*args)¶ Bases:
object
- Initialize fields and call ClearFlags()
- rtype
None
-
BigSplineSec
()¶ - Return type
opencascade::handle<TopTools_HSequenceOfShape>
-
Clear
()¶ - Clears all accumulated statictics
- rtype
None
-
ClearFlags
()¶ - Clears all flags
- rtype
None
-
GetModifyBigSplineMode
(ShapeAnalysis_ShapeContents self) → Standard_Boolean¶
-
GetModifyIndirectMode
(ShapeAnalysis_ShapeContents self) → Standard_Boolean¶
-
GetModifyOffestSurfaceMode
(ShapeAnalysis_ShapeContents self) → Standard_Boolean¶
-
GetModifyOffsetCurveMode
(ShapeAnalysis_ShapeContents self) → Standard_Boolean¶
-
GetModifyTrimmed2dMode
(ShapeAnalysis_ShapeContents self) → Standard_Boolean¶
-
GetModifyTrimmed3dMode
(ShapeAnalysis_ShapeContents self) → Standard_Boolean¶
-
IndirectSec
()¶ - Return type
opencascade::handle<TopTools_HSequenceOfShape>
- Return type
- Return type
- Return type
- Return type
- Return type
- Return type
- Return type
- Return type
-
OffsetCurveSec
()¶ - Return type
opencascade::handle<TopTools_HSequenceOfShape>
-
OffsetSurfaceSec
()¶ - Return type
opencascade::handle<TopTools_HSequenceOfShape>
-
Perform
()¶ - Counts quantities of sun-shapes in shape and stores sub-shapes according to flags
- param shape
- type shape
TopoDS_Shape
- rtype
None
-
SetModifyBigSplineMode
(ShapeAnalysis_ShapeContents self, Standard_Boolean value)¶
-
SetModifyIndirectMode
(ShapeAnalysis_ShapeContents self, Standard_Boolean value)¶
-
SetModifyOffestSurfaceMode
(ShapeAnalysis_ShapeContents self, Standard_Boolean value)¶
-
SetModifyOffsetCurveMode
(ShapeAnalysis_ShapeContents self, Standard_Boolean value)¶
-
SetModifyTrimmed2dMode
(ShapeAnalysis_ShapeContents self, Standard_Boolean value)¶
-
SetModifyTrimmed3dMode
(ShapeAnalysis_ShapeContents self, Standard_Boolean value)¶
-
Trimmed2dSec
()¶ - Return type
opencascade::handle<TopTools_HSequenceOfShape>
-
Trimmed3dSec
()¶ - Return type
opencascade::handle<TopTools_HSequenceOfShape>
-
property
thisown
¶ The membership flag
-
class
ShapeAnalysis_ShapeTolerance
(*args)¶ Bases:
object
- Empty constructor
- rtype
None
-
AddTolerance
()¶ - Adds data on new Shape to compute Cumulated Tolerance (prepares three computationsmaximal, average, minimal)
- param shape
- type shape
TopoDS_Shape
- param type
default value is TopAbs_SHAPE
- type type
TopAbs_ShapeEnum
- rtype
None
-
GlobalTolerance
()¶ - Returns the computed tolerance according to the <mode> <mode> = 0average <mode> > 0maximal <mode> < 0minimal
- param mode
- type mode
int
- rtype
float
-
InTolerance
()¶ - Determines which shapes have a tolerance within a given interval <type> is interpreted as in the method Tolerance
- param shape
- type shape
TopoDS_Shape
- param valmin
- type valmin
float
- param valmax
- type valmax
float
- param type
default value is TopAbs_SHAPE
- type type
TopAbs_ShapeEnum
- rtype
opencascade::handle<TopTools_HSequenceOfShape>
-
InitTolerance
()¶ - Initializes computation of cumulated tolerance
- rtype
None
-
OverTolerance
()¶ - Determines which shapes have a tolerance over the given value <type> is interpreted as in the method Tolerance
- param shape
- type shape
TopoDS_Shape
- param value
- type value
float
- param type
default value is TopAbs_SHAPE
- type type
TopAbs_ShapeEnum
- rtype
opencascade::handle<TopTools_HSequenceOfShape>
-
Tolerance
()¶ - Determines a tolerance from the ones stored in a shape Remarkcalls InitTolerance and AddTolerance, hence, can be used to start a series for cumulating tolerance <mode> = 0returns the average value between sub-shapes, <mode> > 0returns the maximal found, <mode> < 0returns the minimal found. <type> defines what kinds of sub-shapes to consider: SHAPE (default)allVERTEX, EDGE, FACE, VERTEXonly vertices, EDGEonly edges, FACEonly faces, SHELLcombined SHELL + FACE, for each face (and containing shell), also checks EDGE and VERTEX
- param shape
- type shape
TopoDS_Shape
- param mode
- type mode
int
- param type
default value is TopAbs_SHAPE
- type type
TopAbs_ShapeEnum
- rtype
float
-
property
thisown
¶ The membership flag
-
class
ShapeAnalysis_Shell
¶ Bases:
object
-
BadEdges
()¶ - Returns the list of bad edges as a Compound It is empty (not null) if no edge are recorded as bad
- rtype
TopoDS_Compound
-
CheckOrientedShells
()¶ - Checks if shells fulfill orientation condition, i.e. if each edge is, either present once (free edge) or twice (connected edge) but with different orientations (FORWARD/REVERSED) Edges which do not fulfill these conditions are bad //! If <alsofree> is True free edges are considered. Free edges can be queried but are not bad
- param shape
- type shape
TopoDS_Shape
- param alsofree
default value is Standard_False
- type alsofree
bool
- param checkinternaledges
default value is Standard_False
- type checkinternaledges
bool
- rtype
bool
-
Clear
()¶ - Clears data about loaded shells and performed checks
- rtype
None
-
FreeEdges
()¶ - Returns the list of free (not connected) edges as a Compound It is empty (not null) if no edge are recorded as free
- rtype
TopoDS_Compound
-
HasBadEdges
()¶ - Tells if at least one edge is recorded as bad
- rtype
bool
-
HasConnectedEdges
()¶ - Tells if at least one edge is connected (shared twice or more)
- rtype
bool
-
HasFreeEdges
()¶ - Tells if at least one edge is recorded as free (not connected)
- rtype
bool
-
IsLoaded
()¶ - Tells if a shape is loaded (only shells are checked)
- param shape
- type shape
TopoDS_Shape
- rtype
bool
-
LoadShells
()¶ - Adds shells contained in the <shape> to the list of loaded shells
- param shape
- type shape
TopoDS_Shape
- rtype
None
-
Loaded
()¶ - Returns a loaded shape specified by its rank number. Returns null shape if <num> is out of range
- param num
- type num
int
- rtype
TopoDS_Shape
-
NbLoaded
()¶ - Returns the actual number of loaded shapes (i.e. shells)
- rtype
int
-
property
thisown
¶ The membership flag
-
-
class
ShapeAnalysis_Surface
(*args)¶ Bases:
OCC.Core.Standard.Standard_Transient
- Creates an analyzer object on the basis of existing surface
- param S
- type S
Geom_Surface
- rtype
None
-
Adaptor3d
()¶ - Returns the Adaptor. Creates it if not yet done.
- rtype
opencascade::handle<GeomAdaptor_HSurface>
-
Bounds
()¶ - Returns the bounds of the surface (from Bounds from Surface, but buffered)
- param ufirst
- type ufirst
float
- param ulast
- type ulast
float
- param vfirst
- type vfirst
float
- param vlast
- type vlast
float
- rtype
None
-
ComputeBoundIsos
()¶ - Computes bound isos (protected against exceptions)
- rtype
None
-
DegeneratedValues
()¶ - Returns True if there is at least one surface iso-line which is considered as degenerated with <preci> and distance between P3d and corresponding singular point is less than <preci> (like IsDegenerated). Returns characteristics of the first found boundary matching those criteria.
- param P3d
- type P3d
gp_Pnt
- param preci
- type preci
float
- param firstP2d
- type firstP2d
gp_Pnt2d
- param lastP2d
- type lastP2d
gp_Pnt2d
- param firstpar
- type firstpar
float
- param lastpar
- type lastpar
float
- param forward
default value is Standard_True
- type forward
bool
- rtype
bool
-
static
DownCast
(t)¶
-
Gap
()¶ - Returns 3D distance found by one of the following methods. IsDegenerated, DegeneratedValues, ProjectDegenerated (distance between 3D point and found or last (if not found) singularity), IsUClosed, IsVClosed (minimum value of precision to consider the surface to be closed), ValueOfUV (distance between 3D point and found solution).
- rtype
float
-
HasSingularities
()¶ - Returns True if the surface has singularities for the given precision (i.e. if there are surface singularities with sizes not greater than precision).
- param preci
- type preci
float
- rtype
bool
-
Init
()¶ - Loads existing surface
- param S
- type S
Geom_Surface
- rtype
None* Reads all the data from another Surface, without recomputing
- param other
- type other
ShapeAnalysis_Surface
- rtype
None
-
IsDegenerated
()¶ - Returns True if there is at least one surface boundary which is considered as degenerated with <preci> and distance between P3d and corresponding singular point is less than <preci>
- param P3d
- type P3d
gp_Pnt
- param preci
- type preci
float
- rtype
bool* Returns True if straight pcurve going from point p2d1 to p2d2 is degenerate, i.e. lies in the singularity of the surface. NOTE: it uses another method of detecting singularity than used by ComputeSingularities() et al.! For that, maximums of distances between points p2d1, p2d2 and 0.5*(p2d1+p2d2) and between corresponding 3d points are computed. The pcurve (p2d1, p2d2) is considered as degenerate if: - max distance in 3d is less than <tol> - max distance in 2d is at least <ratio> times greather than the Resolution computed from max distance in 3d (max3d < tol && max2d > ratio * Resolution(max3d)) NOTE: <ratio> should be >1 (e.g. 10)
- param p2d1
- type p2d1
gp_Pnt2d
- param p2d2
- type p2d2
gp_Pnt2d
- param tol
- type tol
float
- param ratio
- type ratio
float
- rtype
bool
-
IsUClosed
()¶ - Tells if the Surface is spatially closed in U with given precision. If <preci> < 0 then Precision::Confusion is used. If Geom_Surface says that the surface is U-closed, this method also says this. Otherwise additional analysis is performed, comparing given precision with the following distances: - periodic B-Splines are closed, - polinomial B-Spline with boundary multiplicities degree+1 and Bezier - maximum distance between poles, - rational B-Spline or one with boundary multiplicities not degree+1 - maximum distance computed at knots and their middles, - surface of extrusion - distance between ends of basis curve, - other (RectangularTrimmed and Offset) - maximum distance computed at 100 equi-distanted points.
- param preci
default value is -1
- type preci
float
- rtype
bool
-
IsVClosed
()¶ - Tells if the Surface is spatially closed in V with given precision. If <preci> < 0 then Precision::Confusion is used. If Geom_Surface says that the surface is V-closed, this method also says this. Otherwise additional analysis is performed, comparing given precision with the following distances: - periodic B-Splines are closed, - polinomial B-Spline with boundary multiplicities degree+1 and Bezier - maximum distance between poles, - rational B-Spline or one with boundary multiplicities not degree+1 - maximum distance computed at knots and their middles, - surface of revolution - distance between ends of basis curve, - other (RectangularTrimmed and Offset) - maximum distance computed at 100 equi-distanted points.
- param preci
default value is -1
- type preci
float
- rtype
bool
-
NbSingularities
()¶ - Returns the number of singularities for the given precision (i.e. number of surface singularities with sizes not greater than precision).
- param preci
- type preci
float
- rtype
int
-
NextValueOfUV
()¶ - Projects a point P3D on the surface. Does the same thing as ValueOfUV but tries to optimize computations by taking into account previous point <p2dPrev>: makes a step by UV and tries Newton algorithm. If <maxpreci> >0. and distance between solution and P3D is greater than <maxpreci>, that solution is considered as bad, and ValueOfUV() is used. If not succeded, calls ValueOfUV()
- param p2dPrev
- type p2dPrev
gp_Pnt2d
- param P3D
- type P3D
gp_Pnt
- param preci
- type preci
float
- param maxpreci
default value is -1.0
- type maxpreci
float
- rtype
gp_Pnt2d
-
ProjectDegenerated
()¶ - Projects a point <P3d> on a singularity by computing one of the coordinates of preliminary computed <result>. //! Finds the iso-line which is considered as degenerated with <preci> and a. distance between P3d and corresponding singular point is less than <preci> (like IsDegenerated) or b. difference between already computed <result>’s coordinate and iso-coordinate of the boundary is less than 2D resolution (computed from <preci> by Geom_Adaptor). Then sets not yet computed <result>’s coordinate taking it from <neighbour> and returns True.
- param P3d
- type P3d
gp_Pnt
- param preci
- type preci
float
- param neighbour
- type neighbour
gp_Pnt2d
- param result
- type result
gp_Pnt2d
- rtype
bool* Checks points at the beginning (direct is True) or end (direct is False) of array <points> to lie in singularity of surface, and if yes, adjusts the indeterminate 2d coordinate of these points by nearest point which is not in singularity. Returns True if some points were adjusted.
- param nbrPnt
- type nbrPnt
int
- param points
- type points
TColgp_SequenceOfPnt
- param pnt2d
- type pnt2d
TColgp_SequenceOfPnt2d
- param preci
- type preci
float
- param direct
- type direct
bool
- rtype
bool
-
SetDomain
()¶ - Parameters
U1 –
- type U1
float
- param U2
- type U2
float
- param V1
- type V1
float
- param V2
- type V2
float
- rtype
None
-
Singularity
()¶ - Returns the characteristics of the singularity specified by its rank number <num>. That means, that it is not neccessary for <num> to be in the range [1, NbSingularities] but must be not greater than possible (see ComputeSingularities). The returned characteristics are: preci: the smallest precision with which the iso-line is considered as degenerated, P3d: 3D point of singularity (middle point of the surface iso-line), firstP2d and lastP2d: first and last 2D points of the iso-line in parametrical surface, firstpar and lastpar: first and last parameters of the iso-line in parametrical surface, uisodeg: if the degenerated iso-line is U-iso (True) or V-iso (False). Returns False if <num> is out of range, else returns True.
- param num
- type num
int
- param preci
- type preci
float
- param P3d
- type P3d
gp_Pnt
- param firstP2d
- type firstP2d
gp_Pnt2d
- param lastP2d
- type lastP2d
gp_Pnt2d
- param firstpar
- type firstpar
float
- param lastpar
- type lastpar
float
- param uisodeg
- type uisodeg
bool
- rtype
bool
-
Surface
()¶ - Returns a surface being analyzed
- rtype
opencascade::handle<Geom_Surface>
-
TrueAdaptor3d
()¶ - Returns the Adaptor (may be Null if method Adaptor() was not called)
- rtype
opencascade::handle<GeomAdaptor_HSurface>
-
UCloseVal
()¶ - Returns minimum value to consider the surface as U-closed
- rtype
float
-
UIso
()¶ - Returns a U-Iso. Null if not possible or failed Remarkbound isos are buffered
- param U
- type U
float
- rtype
opencascade::handle<Geom_Curve>
-
UVFromIso
()¶ - Tries a refinement of an already computed couple (U,V) by using projecting 3D point on iso-lines: 1. boundaries of the surface, 2. iso-lines passing through (U,V) 3. iteratively received iso-lines passing through new U and new V (number of iterations is limited by 5 in each direction) Returns the best resulting distance between P3D and Value(U,V) in the case of success. Else, returns a very great value
- param P3D
- type P3D
gp_Pnt
- param preci
- type preci
float
- param U
- type U
float
- param V
- type V
float
- rtype
float
-
VCloseVal
()¶ - Returns minimum value to consider the surface as V-closed
- rtype
float
-
VIso
()¶ - Returns a V-Iso. Null if not possible or failed Remarkbound isos are buffered
- param V
- type V
float
- rtype
opencascade::handle<Geom_Curve>
-
Value
()¶ - Returns a 3D point specified by parameters in surface parametrical space
- param u
- type u
float
- param v
- type v
float
- rtype
gp_Pnt* Returns a 3d point specified by a point in surface parametrical space
- param p2d
- type p2d
gp_Pnt2d
- rtype
gp_Pnt
-
ValueOfUV
()¶ - Computes the parameters in the surface parametrical space of 3D point. The result is parameters of the point projected onto the surface. This method enhances functionality provided by the standard tool GeomAPI_ProjectPointOnSurface by treatment of cases when the projected point is near to the surface boundaries and when this standard tool fails.
- param P3D
- type P3D
gp_Pnt
- param preci
- type preci
float
- rtype
gp_Pnt2d
-
property
thisown
¶ The membership flag
-
class
ShapeAnalysis_TransferParameters
(*args)¶ Bases:
OCC.Core.Standard.Standard_Transient
- Creates empty tool with myShift = 0 and myScale = 1
- rtype
None* Creates a tool and initializes it with edge and face
- param E
- type E
TopoDS_Edge
- param F
- type F
TopoDS_Face
- rtype
None
-
static
DownCast
(t)¶
-
Init
()¶ - Initialize a tool with edge and face
- param E
- type E
TopoDS_Edge
- param F
- type F
TopoDS_Face
- rtype
void
-
IsSameRange
()¶ - Returns True if 3d curve of edge and pcurve are SameRange (in default implementation, if myScale == 1 and myShift == 0)
- rtype
bool
-
Perform
()¶ - Transfers parameters given by sequence Params from 3d curve to pcurve (if To2d is True) or back (if To2d is False)
- param Params
- type Params
TColStd_HSequenceOfReal
- param To2d
- type To2d
bool
- rtype
opencascade::handle<TColStd_HSequenceOfReal>* Transfers parameter given by sequence Params from 3d curve to pcurve (if To2d is True) or back (if To2d is False)
- param Param
- type Param
float
- param To2d
- type To2d
bool
- rtype
float
-
SetMaxTolerance
()¶ - Sets maximal tolerance to use linear recomputation of parameters.
- param maxtol
- type maxtol
float
- rtype
None
-
TransferRange
()¶ - Recomputes range of curves from NewEdge. If Is2d equals True parameters are recomputed by curve2d else by curve3d.
- param newEdge
- type newEdge
TopoDS_Edge
- param prevPar
- type prevPar
float
- param currPar
- type currPar
float
- param To2d
- type To2d
bool
- rtype
void
-
property
thisown
¶ The membership flag
-
class
ShapeAnalysis_TransferParametersProj
(*args)¶ Bases:
OCC.Core.ShapeAnalysis.ShapeAnalysis_TransferParameters
- Creats empty constructor.
- rtype
None:param E:
- type E
TopoDS_Edge
- param F
- type F
TopoDS_Face
- rtype
None
-
static
CopyNMVertex
()¶ - Make a copy of non-manifold vertex theVert (i.e. create new TVertex and replace PointRepresentations for this vertex from fromedge to toedge. Other representations were copied)
- param theVert
- type theVert
TopoDS_Vertex
- param toedge
- type toedge
TopoDS_Edge
- param fromedge
- type fromedge
TopoDS_Edge
- rtype
TopoDS_Vertex* Make a copy of non-manifold vertex theVert (i.e. create new TVertex and replace PointRepresentations for this vertex from fromFace to toFace. Other representations were copied)
- param theVert
- type theVert
TopoDS_Vertex
- param toFace
- type toFace
TopoDS_Face
- param fromFace
- type fromFace
TopoDS_Face
- rtype
TopoDS_Vertex
-
static
DownCast
(t)¶
-
GetForceProjection
(ShapeAnalysis_TransferParametersProj self) → Standard_Boolean¶
-
Perform
()¶ - Transfers parameters given by sequence Params from 3d curve to pcurve (if To2d is True) or back (if To2d is False)
- param Papams
- type Papams
TColStd_HSequenceOfReal
- param To2d
- type To2d
bool
- rtype
opencascade::handle<TColStd_HSequenceOfReal>* Transfers parameter given by Param from 3d curve to pcurve (if To2d is True) or back (if To2d is False)
- param Param
- type Param
float
- param To2d
- type To2d
bool
- rtype
float
-
SetForceProjection
(ShapeAnalysis_TransferParametersProj self, Standard_Boolean value)¶
-
property
thisown
¶ The membership flag
-
class
ShapeAnalysis_Wire
(*args)¶ Bases:
OCC.Core.Standard.Standard_Transient
- Empty constructor
- rtype
None* Creates object with standard TopoDS_Wire, face and precision
- param wire
- type wire
TopoDS_Wire
- param face
- type face
TopoDS_Face
- param precision
- type precision
float
- rtype
None* Creates the object with WireData object, face and precision
- param sbwd
- type sbwd
ShapeExtend_WireData
- param face
- type face
TopoDS_Face
- param precision
- type precision
float
- rtype
None
-
CheckClosed
()¶ - Checks if wire is closed, performs CheckConnected, CheckDegenerated and CheckLacking for the first and the last edges Returns: True if at least one check returned True Status: FAIL1 or DONE1: see CheckConnected FAIL2 or DONE2: see CheckDegenerated
- param prec
default value is 0.0
- type prec
float
- rtype
bool
-
CheckConnected
()¶ - Calls to CheckConnected for each edge Returns: True if at least one pair of disconnected edges (not sharing the same vertex) was detected
- param prec
default value is 0.0
- type prec
float
- rtype
bool* Checks connected edges (num-th and preceeding). Tests with starting preci from <SBWD> or with <prec> if it is greater. Considers Vertices. Returns: False if edges are connected by the common vertex, else True Status : OK : Vertices (end of num-1 th edge and start on num-th one) are already the same DONE1 : Absolutely confused (gp::Resolution) DONE2 : Confused at starting <preci> from <SBWD> DONE3 : Confused at <prec> but not <preci> FAIL1 : Not confused FAIL2 : Not confused but confused with <preci> if reverse num-th edge
- param num
- type num
int
- param prec
default value is 0.0
- type prec
float
- rtype
bool
-
CheckCurveGap
()¶ - Checks gap between points on 3D curve and points on surface generated by pcurve of the num-th edge. The distance can be queried by MinDistance3d. //! Returns: True if status is DONE Status: OKGap is less than myPrecision DONEGap is greater than myPrecision FAILNo 3d curve(s) on the edge(s)
- param num
default value is 0
- type num
int
- rtype
bool
-
CheckDegenerated
()¶ - Calls to CheckDegenerated for each edge Returns: True if at least one incorrect degenerated edge was detected
- rtype
bool* Checks for degenerated edge between two adjacent ones. Fills parameters dgnr1 and dgnr2 with points in paramterical space that correspond to the singularity (either gap that needs to be filled by degenerated edge or that already filled) Returns: False if no singularity or edge is already degenerated, otherwise True Status: OK : No surface singularity, or edge is already degenerated DONE1: Degenerated edge should be inserted (gap in 2D) DONE2: Edge <num> should be made degenerated (recompute pcurve and set the flag) FAIL1: One of edges neighbouring to degenerated one has no pcurve FAIL2: Edge marked as degenerated and has no pcurve but singularity is not detected
- param num
- type num
int
- param dgnr1
- type dgnr1
gp_Pnt2d
- param dgnr2
- type dgnr2
gp_Pnt2d
- rtype
bool* Checks for degenerated edge between two adjacent ones. Remark : Calls previous function Status : See the function above for details
- param num
- type num
int
- rtype
bool
-
CheckEdgeCurves
()¶ - Checks edges geometry (consitency of 2d and 3d senses, adjasment of curves to the vertices, etc.). The order of the checksCall ShapeAnalysis_Wire to check: ShapeAnalysis_Edge::CheckCurve3dWithPCurve (1), ShapeAnalysis_Edge::CheckVertcesWithPCurve (2), ShapeAnalysis_Edge::CheckVertcesWithCurve3d (3), CheckSeam (4) Additional: CheckGap3d (5), CheckGap2d (6), ShapeAnalysis_Edge::CheckSameParameter (7) Returns: True if at least one check returned True Remark: The numbers in brackets show with what DONEi or FAILi the status can be queried
- rtype
bool
-
CheckGap2d
()¶ - Checks gap between edges in 2D (pcurves). Checks the distance between ends of pcurves of the num-th and preceeding edge. The distance can be queried by MinDistance2d. //! Returns: True if status is DONE Status: OKGap is less than parametric precision out of myPrecision DONEGap is greater than parametric precision out of myPrecision FAILNo pcurve(s) on the edge(s)
- param num
default value is 0
- type num
int
- rtype
bool
-
CheckGap3d
()¶ - Checks gap between edges in 3D (3d curves). Checks the distance between ends of 3d curves of the num-th and preceeding edge. The distance can be queried by MinDistance3d. //! Returns: True if status is DONE Status: OKGap is less than myPrecision DONEGap is greater than myPrecision FAILNo 3d curve(s) on the edge(s)
- param num
default value is 0
- type num
int
- rtype
bool
-
CheckIntersectingEdges
()¶ - Checks two adjacent edges for intersecting. Intersection is reported only if intersection point is not enclosed by the common end vertex of the edges. Returns: True if intersection is found. If returns True it also fills the sequences of intersection points, corresponding 3d points, and errors for them (half-distances between intersection points in 3d calculated from one and from another edge) Status: FAIL1No pcurve FAIL2No vertices DONE1Self-intersection found
- param num
- type num
int
- param points2d
- type points2d
IntRes2d_SequenceOfIntersectionPoint
- param points3d
- type points3d
TColgp_SequenceOfPnt
- param errors
- type errors
TColStd_SequenceOfReal
- rtype
bool* Checks two adjacent edges for intersecting. Remark : Calls the previous method Status : See the function above for details
- param num
- type num
int
- rtype
bool* Checks i-th and j-th edges for intersecting. Remark : See the previous method for details
- param num1
- type num1
int
- param num2
- type num2
int
- param points2d
- type points2d
IntRes2d_SequenceOfIntersectionPoint
- param points3d
- type points3d
TColgp_SequenceOfPnt
- param errors
- type errors
TColStd_SequenceOfReal
- rtype
bool* Checks i-th and j-th edges for intersecting. Remark : Calls previous method. Status : See the function above for details
- param num1
- type num1
int
- param num2
- type num2
int
- rtype
bool
-
CheckLacking
()¶ - Calls to CheckLacking for each edge Returns: True if at least one lacking edge was detected
- rtype
bool* Checks if there is a gap in 2d between edges, not comprised by the tolerance of their common vertex. If <Tolerance> is greater than 0. and less than tolerance of the vertex, then this value is used for check. Returns: True if not closed gap was detected p2d1 and p2d2 are the endpoint of <num-1>th edge and start of the <num>th edge in 2d. Status: OK: No edge is lacking (3d and 2d connection) FAIL1: edges have no vertices (at least one of them) FAIL2: edges are neither connected by common vertex, nor have coincided vertices FAIL1: edges have no pcurves DONE1: the gap is detected which cannot be closed by the tolerance of the common vertex (or with value of <Tolerance>) DONE2: is set (together with DONE1) if gap is detected and the vector (p2d2 - p2d1) goes in direction opposite to the pcurves of the edges (if angle is more than 0.9*PI).
- param num
- type num
int
- param Tolerance
- type Tolerance
float
- param p2d1
- type p2d1
gp_Pnt2d
- param p2d2
- type p2d2
gp_Pnt2d
- rtype
bool* Checks if there is a gap in 2D between edges and not comprised by vertex tolerance The value of SBWD.thepreci is used. Returns: False if no edge should be inserted Status: OK : No edge is lacking (3d and 2d connection) DONE1 : The vertex tolerance should be increased only (2d gap is small) DONE2 : Edge can be inserted (3d and 2d gaps are large enough)
- param num
- type num
int
- param Tolerance
default value is 0.0
- type Tolerance
float
- rtype
bool
-
CheckLoop
()¶ - Checks existance of loop on wire and return vertices wich are loop vertices (vertices belonging to a few pairs of edges)
- param aMapLoopVertices
- type aMapLoopVertices
TopTools_IndexedMapOfShape
- param aMapVertexEdges
- type aMapVertexEdges
TopTools_DataMapOfShapeListOfShape
- param aMapSmallEdges
- type aMapSmallEdges
TopTools_MapOfShape
- param aMapSeemEdges
- type aMapSeemEdges
TopTools_MapOfShape
- rtype
bool
-
CheckNotchedEdges
()¶ - Detects a notch
- param num
- type num
int
- param shortNum
- type shortNum
int
- param param
- type param
float
- param Tolerance
default value is 0.0
- type Tolerance
float
- rtype
bool
-
CheckOrder
()¶ - Calls CheckOrder and returns False if wire is already ordered (tail-to-head), True otherwise Flag <isClosed> defines if the wire is closed or not Flag <mode3d> defines which mode is used (3d or 2d)
- param isClosed
default value is Standard_True
- type isClosed
bool
- param mode3d
default value is Standard_True
- type mode3d
bool
- rtype
bool* Analyzes the order of the edges in the wire, uses class WireOrder for that purpose. Flag <isClosed> defines if the wire is closed or not Flag <mode3d> defines which mode is used (3d or 2d) Returns False if wire is already ordered (tail-to-head), True otherwise. Use returned WireOrder object for deeper analysis. Status: OK : the same edges orientation, the same edges sequence DONE1: the same edges orientation, not the same edges sequence DONE2: as DONE1 and gaps more than myPrecision DONE3: not the same edges orientation (some need to be reversed) DONE4: as DONE3 and gaps more than myPrecision FAIL : algorithm failed (could not detect order)
- param sawo
- type sawo
ShapeAnalysis_WireOrder
- param isClosed
default value is Standard_True
- type isClosed
bool
- param mode3d
default value is Standard_True
- type mode3d
bool
- rtype
bool
-
CheckOuterBound
()¶ - Checks if wire defines an outer bound on the face Uses ShapeAnalysis::IsOuterBound for analysis If <APIMake> is True uses BRepAPI_MakeWire to build the wire, if False (to be used only when edges share common vertices) uses BRep_Builder to build the wire
- param APIMake
default value is Standard_True
- type APIMake
bool
- rtype
bool
-
CheckSeam
()¶ - Checks if a seam pcurves are correct oriented Returns: False (status OK) if given edge is not a seam or if it is OK C1 - current pcurve for FORWARD edge, C2 - current pcurve for REVERSED edge (if returns True they should be swapped for the seam), cf, cl - first and last parameters on curves Status: OKPcurves are correct or edge is not seam DONESeam pcurves should be swapped
- param num
- type num
int
- param C1
- type C1
Geom2d_Curve
- param C2
- type C2
Geom2d_Curve
- param cf
- type cf
float
- param cl
- type cl
float
- rtype
bool* Checks if a seam pcurves are correct oriented See previous functions for details
- param num
- type num
int
- rtype
bool
-
CheckSelfIntersectingEdge
()¶ - Checks if num-th edge is self-intersecting. Self-intersection is reported only if intersection point lies outside of both end vertices of the edge. Returns: True if edge is self-intersecting. If returns True it also fills the sequences of intersection points and corresponding 3d points (only that are not enclosed by a vertices) Status: FAIL1No pcurve FAIL2No vertices DONE1Self-intersection found
- param num
- type num
int
- param points2d
- type points2d
IntRes2d_SequenceOfIntersectionPoint
- param points3d
- type points3d
TColgp_SequenceOfPnt
- rtype
bool:param num:
- type num
int
- rtype
bool
-
CheckSelfIntersection
()¶ - Checks self-intersection of the wire (considering pcurves) Looks for self-intersecting edges and each pair of intersecting edges. Warning: It does not check each edge with any other one (only each two adjacent edges) The order of the checksCheckSelfIntersectingEdge, CheckIntersectingEdges Returns: True if at least one check returned True Status: FAIL1 or DONE1 - see CheckSelfIntersectingEdge FAIL2 or DONE2 - see CheckIntersectingEdges
- rtype
bool
-
CheckShapeConnect
()¶ - Checks with what orientation <shape> (wire or edge) can be connected to the wire. Tests distances with starting <preci> from <SBWD> (close confusion), but if given <prec> is greater, tests with <prec> (coarse confusion). The smallest found distance can be returned by MinDistance3d //! Returns: False if status is FAIL (see below) Status: DONE1If <shape> follows <SBWD>, direct sense (normal) DONE2If <shape> follows <SBWD>, but if reversed DONE3If <shape> preceeds <SBWD>, direct sense DONE4If <shape> preceeds <SBWD>, but if reversed FAIL1If <shape> is neither an edge nor a wire FAIL2If <shape> cannot be connected to <SBWD> //! DONE5To the tail of <SBWD> the <shape> is closer with direct sense DONE6To the head of <SBWD> the <shape> is closer with direct sense //! Remark: Statuses DONE1 - DONE4, FAIL1 - FAIL2 are basic and describe the nearest connection of the <shape> to <SBWD>. Statuses DONE5 and DONE6 are advanced and are to be used when analyzing with what sense (direct or reversed) the <shape> should be connected to <SBWD>: For tail of <SBWD> if DONE4 is True <shape> should be direct, otherwise reversed. For head of <SBWD> if DONE5 is True <shape> should be direct, otherwise reversed.
- param shape
- type shape
TopoDS_Shape
- param prec
default value is 0.0
- type prec
float
- rtype
bool* The same as previous CheckShapeConnect but is more advanced. It returns the distances between each end of <sbwd> and each end of <shape>. For example, <tailhead> stores distance between tail of <sbwd> and head of <shape> Remark: First method CheckShapeConnect calls this one
- param tailhead
- type tailhead
float
- param tailtail
- type tailtail
float
- param headtail
- type headtail
float
- param headhead
- type headhead
float
- param shape
- type shape
TopoDS_Shape
- param prec
default value is 0.0
- type prec
float
- rtype
bool
-
CheckSmall
()¶ - Calls to CheckSmall for each edge Returns: True if at least one small edge was detected
- param precsmall
default value is 0.0
- type precsmall
float
- rtype
bool* Checks if an edge has a length not greater than myPreci or precsmall (if it is smaller) Returns: False if its length is greater than precision Status: OK : edge is not small or degenerated DONE1: edge is small, vertices are the same DONE2: edge is small, vertices are not the same FAIL : no 3d curve and pcurve
- param num
- type num
int
- param precsmall
default value is 0.0
- type precsmall
float
- rtype
bool
-
CheckSmallArea
()¶ - Checks if wire has parametric area less than precision.
- param theWire
- type theWire
TopoDS_Wire
- rtype
bool
-
CheckTail
()¶ - Parameters
theEdge1 –
- type theEdge1
TopoDS_Edge
- param theEdge2
- type theEdge2
TopoDS_Edge
- param theMaxSine
- type theMaxSine
float
- param theMaxWidth
- type theMaxWidth
float
- param theMaxTolerance
- type theMaxTolerance
float
- param theEdge11
- type theEdge11
TopoDS_Edge
- param theEdge12
- type theEdge12
TopoDS_Edge
- param theEdge21
- type theEdge21
TopoDS_Edge
- param theEdge22
- type theEdge22
TopoDS_Edge
- rtype
bool
-
ClearStatuses
()¶ - Unsets all the status and distance fields wire, face and precision are not cleared
- rtype
None
-
static
DownCast
(t)¶
-
Face
()¶ - Returns the working face
- rtype
TopoDS_Face
-
Init
()¶ - Initializes the object with standard TopoDS_Wire, face and precision
- param wire
- type wire
TopoDS_Wire
- param face
- type face
TopoDS_Face
- param precision
- type precision
float
- rtype
None* Initializes the object with WireData object, face and precision
- param sbwd
- type sbwd
ShapeExtend_WireData
- param face
- type face
TopoDS_Face
- param precision
- type precision
float
- rtype
None
-
IsLoaded
()¶ - Returns True if wire is loaded and has number of edges >0
- rtype
bool
-
IsReady
()¶ - Returns True if IsLoaded and underlying face is not null
- rtype
bool
-
LastCheckStatus
()¶ - Querying the status of the LAST perfomed ‘Advanced’ checking procedure
- param Status
- type Status
ShapeExtend_Status
- rtype
bool
-
Load
()¶ - Loads the object with standard TopoDS_Wire
- param wire
- type wire
TopoDS_Wire
- rtype
None* Loads the object with WireData object
- param sbwd
- type sbwd
ShapeExtend_WireData
- rtype
None
-
MaxDistance2d
()¶ - Returns the last maximal distance in 2D-UV computed by CheckContinuity2d
- rtype
float
-
MaxDistance3d
()¶ - Returns the last maximal distance in 3D computed by CheckOrientation, CheckConnected, CheckContinuity3d, CheckVertex, CheckNewVertex, CheckSameParameter
- rtype
float
-
MinDistance2d
()¶ - Returns the last lowest distance in 2D-UV computed by CheckContinuity2d
- rtype
float
-
MinDistance3d
()¶ - Returns the last lowest distance in 3D computed by CheckOrientation, CheckConnected, CheckContinuity3d, CheckVertex, CheckNewVertex
- rtype
float
-
NbEdges
()¶ - Returns the number of edges in the wire, or 0 if it is not loaded
- rtype
int
-
Perform
()¶ - Performs all the checks in the following orderCheckOrder, CheckSmall, CheckConected, CheckEdgeCurves, CheckDegenerated, CheckSelfIntersection, CheckLacking, CheckClosed Returns: True if at least one method returned True; For deeper analysis use Status…(status) methods
- rtype
bool
-
Precision
()¶ - Returns the value of precision
- rtype
float
-
SetFace
()¶ - Loads the face the wire lies on
- param face
- type face
TopoDS_Face
- rtype
None
-
SetPrecision
()¶ - Parameters
precision –
- type precision
float
- rtype
None
-
SetSurface
()¶ - Loads the surface the wire lies on
- param surface
- type surface
Geom_Surface
- rtype
None* Loads the surface the wire lies on
- param surface
- type surface
Geom_Surface
- param location
- type location
TopLoc_Location
- rtype
None
-
StatusClosed
()¶ - Parameters
Status –
- type Status
ShapeExtend_Status
- rtype
bool
-
StatusConnected
()¶ - Parameters
Status –
- type Status
ShapeExtend_Status
- rtype
bool
-
StatusCurveGaps
()¶ - Parameters
Status –
- type Status
ShapeExtend_Status
- rtype
bool
-
StatusDegenerated
()¶ - Parameters
Status –
- type Status
ShapeExtend_Status
- rtype
bool
-
StatusEdgeCurves
()¶ - Parameters
Status –
- type Status
ShapeExtend_Status
- rtype
bool
-
StatusGaps2d
()¶ - Parameters
Status –
- type Status
ShapeExtend_Status
- rtype
bool
-
StatusGaps3d
()¶ - Parameters
Status –
- type Status
ShapeExtend_Status
- rtype
bool
-
StatusLacking
()¶ - Parameters
Status –
- type Status
ShapeExtend_Status
- rtype
bool
-
StatusLoop
()¶ - Parameters
Status –
- type Status
ShapeExtend_Status
- rtype
bool
-
StatusOrder
()¶ - Parameters
Status –
- type Status
ShapeExtend_Status
- rtype
bool
-
StatusSelfIntersection
()¶ - Parameters
Status –
- type Status
ShapeExtend_Status
- rtype
bool
-
StatusSmall
()¶ - Parameters
Status –
- type Status
ShapeExtend_Status
- rtype
bool
-
Surface
()¶ - Returns the working surface
- rtype
opencascade::handle<ShapeAnalysis_Surface>
-
WireData
()¶ - Returns wire object being analyzed
- rtype
opencascade::handle<ShapeExtend_WireData>
-
property
thisown
¶ The membership flag
-
class
ShapeAnalysis_WireOrder
(*args)¶ Bases:
object
- Empty constructor
- rtype
None* Creates a WireOrder in 3D (if mode3d is True) or 2D (if False) with a tolerance
- param mode3d
- type mode3d
bool
- param tol
- type tol
float
- rtype
None
-
Add
()¶ - Adds a couple of points 3D (start,end)
- param start3d
- type start3d
gp_XYZ
- param end3d
- type end3d
gp_XYZ
- rtype
None* Adds a couple of points 2D (start,end)
- param start2d
- type start2d
gp_XY
- param end2d
- type end2d
gp_XY
- rtype
None
-
Chain
()¶ - Returns, for the chain n0 num, starting and ending numbers of edges. In the list of ordered edges (see Ordered for originals)
- param num
- type num
int
- param n1
- type n1
int
- param n2
- type n2
int
- rtype
None
-
Clear
()¶ - Clears the list of edges, but not mode and tol
- rtype
None
-
Couple
()¶ - Returns, for the couple n0 num, the two implied edges In the list of ordered edges
- param num
- type num
int
- param n1
- type n1
int
- param n2
- type n2
int
- rtype
None
-
Gap
()¶ - Returns the gap between a couple and its preceeding <num> is considered ordered If <num> = 0 (D), returns the greatest gap found
- param num
default value is 0
- type num
int
- rtype
float
-
GetKeepLoopsMode
(ShapeAnalysis_WireOrder self) → Standard_Boolean¶
-
IsDone
()¶ - Tells if Perform has been done Else, the following methods returns original values
- rtype
bool
-
NbChains
()¶ - Returns the count of computed chains
- rtype
int
-
NbCouples
()¶ - Returns the count of computed couples
- rtype
int
-
NbEdges
()¶ - Returns the count of added couples of points (one per edges)
- rtype
int
-
Ordered
()¶ - Returns the number of original edge which correspond to the newly ordered number <n> Warningthe returned value is NEGATIVE if edge should be reversed
- param n
- type n
int
- rtype
int
-
Perform
()¶ - Computes the better order If <closed> is True (D) considers also closure Optimised if the couples were already in order The criterium istwo couples in order if distance between end-prec and start-cur is less then starting tolerance <tol> Else, the smallest distance is reached Gap corresponds to a smallest distance greater than <tol>
- param closed
default value is Standard_True
- type closed
bool
- rtype
None
-
SetChains
()¶ - Determines the chains inside which successive edges have a gap less than a given value. Queried by NbChains and Chain
- param gap
- type gap
float
- rtype
None
-
SetCouples
()¶ - Determines the couples of edges for which end and start fit inside a given gap. Queried by NbCouples and Couple
- param gap
- type gap
float
- rtype
None
-
SetKeepLoopsMode
(ShapeAnalysis_WireOrder self, Standard_Boolean value)¶
-
SetMode
()¶ - Sets new values. Clears the connexion list If <mode3d> changes, also clears the edge list (else, doesnt)
- param mode3d
- type mode3d
bool
- param tol
- type tol
float
- rtype
None
-
Status
()¶ - Returns the status of the order (0 if not done)0all edges are direct and in sequence 1all edges are direct but some are not in sequence 2in addition, unresolved gaps remain -1some edges are reversed, but no gap remain -2some edges are reversed and some gaps remain -10COULD NOT BE RESOLVED, Failure on Reorder gapregarding starting <tol>
- rtype
int
-
Tolerance
()¶ - Returns the working tolerance
- rtype
float
-
XY
()¶ - Returns the values of the couple <num>, as 2D values
- param num
- type num
int
- param start2d
- type start2d
gp_XY
- param end2d
- type end2d
gp_XY
- rtype
None
-
XYZ
()¶ - Returns the values of the couple <num>, as 3D values
- param num
- type num
int
- param start3d
- type start3d
gp_XYZ
- param end3d
- type end3d
gp_XYZ
- rtype
None
-
property
thisown
¶ The membership flag
-
class
ShapeAnalysis_WireVertex
(*args)¶ Bases:
object
- Empty constructor
- rtype
None
-
Data
()¶ - Returns the recorded status for a vertex With its recorded position and parameters on both edges These values are relevant regarding the status: Status Meaning Position Preceeding Following 0 Same no no no 1 SameCoord no no no 2 Close no no no 3 End yes no yes 4 Start yes yes no 5 Inters yes yes yes -1 Disjoined no no no
- param num
- type num
int
- param pos
- type pos
gp_XYZ
- param upre
- type upre
float
- param ufol
- type ufol
float
- rtype
int
-
Init
()¶ - Parameters
wire –
- type wire
TopoDS_Wire
- param preci
- type preci
float
- rtype
None:param swbd:
- type swbd
ShapeExtend_WireData
- param preci
- type preci
float
- rtype
None
-
IsDone
()¶ - Returns True if analysis was performed, else returns False
- rtype
bool
-
Load
()¶ - Parameters
wire –
- type wire
TopoDS_Wire
- rtype
None:param sbwd:
- type sbwd
ShapeExtend_WireData
- rtype
None
-
NbEdges
()¶ - Returns the number of edges in analyzed wire (i.e. the length of all arrays)
- rtype
int
-
NextCriter
()¶ - For a given criter, returns the rank of the vertex which follows <num> and has the same status. 0 if no more Acts as an iterator, starts on the first one Criters are: 0: same vertex (status 0) 1: a solution exists (status >= 0) 2: same coords (i.e. same params) (status 0 1 2) 3: same coods but not same vertex (status 1 2) 4: redefined coords (status 3 4 5) -1: no solution (status -1)
- param crit
- type crit
int
- param num
default value is 0
- type num
int
- rtype
int
-
NextStatus
()¶ - For a given status, returns the rank of the vertex which follows <num> and has the same status. 0 if no more Acts as an iterator, starts on the first one
- param stat
- type stat
int
- param num
default value is 0
- type num
int
- rtype
int
-
Position
()¶ - Parameters
num –
- type num
int
- rtype
gp_XYZ
-
Precision
()¶ - Returns precision value used in analysis
- rtype
float
-
SetClose
()¶ - Records status ‘Close Coords’ (at the Precision of <self>)
- param num
- type num
int
- rtype
None
-
SetDisjoined
()¶ - <num> cannot be said as same vertex
- param num
- type num
int
- rtype
None
-
SetEnd
()¶ - <num> is the End of preceeding Edge, and its projection on the following one lies on it at the Precision of <self> <ufol> gives the parameter on the following edge
- param num
- type num
int
- param pos
- type pos
gp_XYZ
- param ufol
- type ufol
float
- rtype
None
-
SetInters
()¶ - <num> is the Intersection of both Edges <upre> is the parameter on preceeding edge, <ufol> on following edge
- param num
- type num
int
- param pos
- type pos
gp_XYZ
- param upre
- type upre
float
- param ufol
- type ufol
float
- rtype
None
-
SetPrecision
()¶ - Sets the precision for work Analysing: for each Vertex, comparison between the end of the preceeding edge and the start of the following edge Each Vertex rank corresponds to the End Vertex of the Edge of same rank, in the ShapeExtend_WireData. I.E. for Vertex <num>, Edge <num> is the preceeding one, <num+1> is the following one
- param preci
- type preci
float
- rtype
None
-
SetSameCoords
()¶ - Records status ‘Same Coords’ (at the Vertices Tolerances)
- param num
- type num
int
- rtype
None
-
SetSameVertex
()¶ - Records status ‘Same Vertex’ (logically) on Vertex <num>
- param num
- type num
int
- rtype
None
-
SetStart
()¶ - <num> is the Start of following Edge, its projection on the preceeding one lies on it at the Precision of <self> <upre> gives the parameter on the preceeding edge
- param num
- type num
int
- param pos
- type pos
gp_XYZ
- param upre
- type upre
float
- rtype
None
-
Status
()¶ - Returns the recorded status for a vertex More detail by method Data
- param num
- type num
int
- rtype
int
-
UFollowing
()¶ - Parameters
num –
- type num
int
- rtype
float
-
UPrevious
()¶ - Parameters
num –
- type num
int
- rtype
float
-
WireData
()¶ - Returns analyzed wire
- rtype
opencascade::handle<ShapeExtend_WireData>
-
property
thisown
¶ The membership flag
-
class
SwigPyIterator
(*args, **kwargs)¶ Bases:
object
-
advance
()¶
-
copy
()¶
-
decr
()¶
-
distance
()¶
-
equal
()¶
-
incr
()¶
-
next
()¶
-
previous
()¶
-
property
thisown
¶ The membership flag
-
value
()¶
-
-
class
shapeanalysis
¶ Bases:
object
-
static
AdjustByPeriod
()¶ - Returns a shift required to move point <Val> to the range [ToVal-Period/2,ToVal+Period/2]. This shift will be the divisible by Period. Intended for adjusting parameters on periodic surfaces.
- param Val
- type Val
float
- param ToVal
- type ToVal
float
- param Period
- type Period
float
- rtype
float
-
static
AdjustToPeriod
()¶ - Returns a shift required to move point <Val> to the range [ValMin,ValMax]. This shift will be the divisible by Period with Period = ValMax - ValMin. Intended for adjusting parameters on periodic surfaces.
- param Val
- type Val
float
- param ValMin
- type ValMin
float
- param ValMax
- type ValMax
float
- rtype
float
-
static
ContourArea
()¶ - Returns a total area of 3d wire
- param theWire
- type theWire
TopoDS_Wire
- rtype
float
-
static
FindBounds
()¶ - Finds the start and end vertices of the shape Shape can be of the following type: vertex: V1 and V2 are the same and equal to <shape>, edgeV1 is start and V2 is end vertex (see ShapeAnalysis_Edge methods FirstVertex and LastVertex), wireV1 is start vertex of the first edge, V2 is end vertex of the last edge (also see ShapeAnalysis_Edge). If wire contains no edges V1 and V2 are nullified If none of the above V1 and V2 are nullified
- param shape
- type shape
TopoDS_Shape
- param V1
- type V1
TopoDS_Vertex
- param V2
- type V2
TopoDS_Vertex
- rtype
void
-
static
GetFaceUVBounds
()¶ - Computes exact UV bounds of all wires on the face
- param F
- type F
TopoDS_Face
- param Umin
- type Umin
float
- param Umax
- type Umax
float
- param Vmin
- type Vmin
float
- param Vmax
- type Vmax
float
- rtype
void
-
static
IsOuterBound
()¶ - Returns True if <F> has outer bound.
- param face
- type face
TopoDS_Face
- rtype
bool
-
static
OuterWire
()¶ - Returns the outer wire on the face <Face>. This is replacement of the method BRepTools::OuterWire until it works badly. Returns the first wire oriented as outer according to FClass2d_Classifier. If none, last wire is returned.
- param face
- type face
TopoDS_Face
- rtype
TopoDS_Wire
-
static
TotCross2D
()¶ - Returns a total area of 2d wire
- param sewd
- type sewd
ShapeExtend_WireData
- param aFace
- type aFace
TopoDS_Face
- rtype
float
-
property
thisown
¶ The membership flag
-
static