OCC.Core.BRepCheck module

BRepCheck module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_brepcheck.html

class BRepCheck_Analyzer(*args)

Bases: object

  • Constructs a shape validation object defined by the shape S. <S> is the shape to control. <GeomControls> If False only topological informaions are checked. The geometricals controls are For a VertexBRepCheck_InvalidToleranceValue NYI For an EdgeBRepCheck_InvalidCurveOnClosedSurface, BRepCheck_InvalidCurveOnSurface, BRepCheck_InvalidSameParameterFlag, BRepCheck_InvalidToleranceValue NYI For a faceBRepCheck_UnorientableShape, BRepCheck_IntersectingWires, BRepCheck_InvalidToleranceValue NYI For a wireBRepCheck_SelfIntersectingWire
    param S

    type S

    TopoDS_Shape

    param GeomControls

    default value is Standard_True

    type GeomControls

    bool

    rtype

    None

Init()
  • <S> is the shape to control. <GeomControls> If False only topological informaions are checked. The geometricals controls are For a VertexBRepCheck_InvalidTolerance NYI For an EdgeBRepCheck_InvalidCurveOnClosedSurface, BRepCheck_InvalidCurveOnSurface, BRepCheck_InvalidSameParameterFlag, BRepCheck_InvalidTolerance NYI For a faceBRepCheck_UnorientableShape, BRepCheck_IntersectingWires, BRepCheck_InvalidTolerance NYI For a wireBRepCheck_SelfIntersectingWire
    param S

    type S

    TopoDS_Shape

    param GeomControls

    default value is Standard_True

    type GeomControls

    bool

    rtype

    None

IsValid()
  • <S> is a subshape of the original shape. Returns <STandard_True> if no default has been detected on <S> and any of its subshape.
    param S

    type S

    TopoDS_Shape

    rtype

    bool* Returns true if no defect is detected on the shape S or any of its subshapes. Returns true if the shape S is valid. This function checks whether a given shape is valid by checking that: - the topology is correct - parameterization of edges in particular is correct. For the topology to be correct, the following conditions must be satisfied: - edges should have at least two vertices if they are not degenerate edges. The vertices should be within the range of the bounding edges at the tolerance specified in the vertex, - edges should share at least one face. The representation of the edges should be within the tolerance criterion assigned to them. - wires defining a face should not self-intersect and should be closed, - there should be one wire which contains all other wires inside a face, - wires should be correctly oriented with respect to each of the edges, - faces should be correctly oriented, in particular with respect to adjacent faces if these faces define a solid, - shells defining a solid should be closed. There should be one enclosing shell if the shape is a solid; To check parameterization of edge, there are 2 approaches depending on the edge?s contextual situation. - if the edge is either single, or it is in the context of a wire or a compound, its parameterization is defined by the parameterization of its 3D curve and is considered as valid. - If the edge is in the context of a face, it should have SameParameter and SameRange flags set to Standard_True. To check these flags, you should call the function BRep_Tool::SameParameter and BRep_Tool::SameRange for an edge. If at least one of these flags is set to Standard_False, the edge is considered as invalid without any additional check. If the edge is contained by a face, and it has SameParameter and SameRange flags set to Standard_True, IsValid checks whether representation of the edge on face, in context of which the edge is considered, has the same parameterization up to the tolerance value coded on the edge. For a given parameter t on the edge having C as a 3D curve and one PCurve P on a surface S (base surface of the reference face), this checks that |C(t) - S(P(t))| is less than or equal to tolerance, where tolerance is the tolerance value coded on the edge.

    rtype

    bool

Result()
Parameters

SubS

type SubS

TopoDS_Shape

rtype

opencascade::handle<BRepCheck_Result>

property thisown

The membership flag

class BRepCheck_DataMapOfShapeListOfStatus(*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 BRepCheck_DataMapOfShapeResult(*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 BRepCheck_Edge(*args)

Bases: OCC.Core.BRepCheck.BRepCheck_Result

Parameters

E

type E

TopoDS_Edge

rtype

None

CheckPolygonOnTriangulation()
  • Checks, if polygon on triangulation of heEdge is out of 3D-curve of this edge.
    param theEdge

    type theEdge

    TopoDS_Edge

    rtype

    BRepCheck_Status

static DownCast(t)
GeometricControls()
Return type

bool:param B: :type B: bool :rtype: None

SetStatus()
  • Sets status of Edge;
    param theStatus

    type theStatus

    BRepCheck_Status

    rtype

    None

Tolerance()
Return type

float

property thisown

The membership flag

class BRepCheck_Face(*args)

Bases: OCC.Core.BRepCheck.BRepCheck_Result

Parameters

F

type F

TopoDS_Face

rtype

None

ClassifyWires()
Parameters

Update – default value is Standard_False :type Update: bool :rtype: BRepCheck_Status

static DownCast(t)
GeometricControls()
Return type

bool:param B: :type B: bool :rtype: None

IntersectWires()
Parameters

Update – default value is Standard_False :type Update: bool :rtype: BRepCheck_Status

IsUnorientable()
Return type

bool

OrientationOfWires()
Parameters

Update – default value is Standard_False :type Update: bool :rtype: BRepCheck_Status

SetStatus()
  • Sets status of Face;
    param theStatus

    type theStatus

    BRepCheck_Status

    rtype

    None

SetUnorientable()
Return type

None

property thisown

The membership flag

class BRepCheck_ListIteratorOfListOfStatus(*args)

Bases: object

ChangeValue()
More()
Next()
Value()
property thisown

The membership flag

class BRepCheck_ListOfStatus(*args)

Bases: object

Append()
Assign()
Clear()
First()
InsertAfter()
InsertBefore()
Last()
Prepend()
Remove()
RemoveFirst()
Reverse()
Set()
Size()
begin()
cbegin()
cend()
end()
property thisown

The membership flag

class BRepCheck_Result(*args, **kwargs)

Bases: OCC.Core.Standard.Standard_Transient

  • Empty constructor

Return type

None* Copy constructor – does nothing

Parameters

& (Standard_Transient) –

Return type

None

Blind()
Return type

void

ContextualShape()
Return type

TopoDS_Shape

static DownCast(t)
InContext()
Parameters

ContextShape

type ContextShape

TopoDS_Shape

rtype

void

Init()
Parameters

S

type S

TopoDS_Shape

rtype

None

InitContextIterator()
Return type

None

IsBlind()
Return type

bool

IsMinimum()
Return type

bool

Minimum()
Return type

void

MoreShapeInContext()
Return type

bool

NextShapeInContext()
Return type

None

SetFailStatus()
Parameters

S

type S

TopoDS_Shape

rtype

None

Status()
Return type

BRepCheck_ListOfStatus

StatusOnShape()
  • If not already done, performs the InContext control and returns the list of status.
    param S

    type S

    TopoDS_Shape

    rtype

    BRepCheck_ListOfStatus:rtype: BRepCheck_ListOfStatus

property thisown

The membership flag

class BRepCheck_Shell(*args)

Bases: OCC.Core.BRepCheck.BRepCheck_Result

Parameters

S

type S

TopoDS_Shell

rtype

None

Closed()
  • Checks if the oriented faces of the shell give a closed shell. If the wire is closed, returns BRepCheck_NoError.If <Update> is set to Standard_True, registers the status in the list.
    param Update

    default value is Standard_False

    type Update

    bool

    rtype

    BRepCheck_Status

static DownCast(t)
IsUnorientable()
Return type

bool

NbConnectedSet()
Parameters

theSets

type theSets

TopTools_ListOfShape

rtype

int

Orientation()
  • Checks if the oriented faces of the shell are correctly oriented. An internal call is made to the method Closed. If <Update> is set to Standard_True, registers the status in the list.
    param Update

    default value is Standard_False

    type Update

    bool

    rtype

    BRepCheck_Status

SetUnorientable()
Return type

None

property thisown

The membership flag

class BRepCheck_Solid(*args)

Bases: OCC.Core.BRepCheck.BRepCheck_Result

  • Constructor <theS> is the solid to check
    param theS

    type theS

    TopoDS_Solid

    rtype

    None

static DownCast(t)
property thisown

The membership flag

class BRepCheck_Vertex(*args)

Bases: OCC.Core.BRepCheck.BRepCheck_Result

Parameters

V

type V

TopoDS_Vertex

rtype

None

static DownCast(t)
Tolerance()
Return type

float

property thisown

The membership flag

class BRepCheck_Wire(*args)

Bases: OCC.Core.BRepCheck.BRepCheck_Result

Parameters

W

type W

TopoDS_Wire

rtype

None

Closed()
  • Checks if the oriented edges of the wire give a closed wire. If the wire is closed, returns BRepCheck_NoError. Warningif the first and last edge are infinite, the wire will be considered as a closed one. If <Update> is set to Standard_True, registers the status in the list. May return (and registers): **BRepCheck_NotConnected, if wire is not topologically closed **BRepCheck_RedundantEdge, if an edge is in wire more than 3 times or in case of 2 occurences if not with FORWARD and REVERSED orientation. **BRepCheck_NoError
    param Update

    default value is Standard_False

    type Update

    bool

    rtype

    BRepCheck_Status

Closed2d()
  • Checks if edges of the wire give a wire closed in 2d space. Returns BRepCheck_NoError, or BRepCheck_NotClosed If <Update> is set to Standard_True, registers the status in the list.
    param F

    type F

    TopoDS_Face

    param Update

    default value is Standard_False

    type Update

    bool

    rtype

    BRepCheck_Status

static DownCast(t)
GeometricControls()
  • report SelfIntersect() check would be (is) done
    rtype

    bool* set SelfIntersect() to be checked

    param B

    type B

    bool

    rtype

    None

Orientation()
  • Checks if the oriented edges of the wire are correctly oriented. An internal call is made to the method Closed. If no face exists, call the method with a null face (TopoDS_face()). If <Update> is set to Standard_True, registers the status in the list. May return (and registers): BRepCheck_InvalidDegeneratedFlag, BRepCheck_BadOrientationOfSubshape, BRepCheck_NotClosed, BRepCheck_NoError
    param F

    type F

    TopoDS_Face

    param Update

    default value is Standard_False

    type Update

    bool

    rtype

    BRepCheck_Status

SelfIntersect()
  • Checks if the wire intersect itself on the face <F>. <E1> and <E2> are the first intersecting edges found. <E2> may be a null edge when a self-intersecting edge is found.If <Update> is set to Standard_True, registers the status in the list. May return (and register): BRepCheck_EmptyWire, BRepCheck_SelfIntersectingWire, BRepCheck_NoCurveOnSurface, BRepCheck_NoError
    param F

    type F

    TopoDS_Face

    param E1

    type E1

    TopoDS_Edge

    param E2

    type E2

    TopoDS_Edge

    param Update

    default value is Standard_False

    type Update

    bool

    rtype

    BRepCheck_Status

SetStatus()
  • Sets status of Wire;
    param theStatus

    type theStatus

    BRepCheck_Status

    rtype

    None

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 brepcheck

Bases: object

static Add()
Parameters

List

type List

BRepCheck_ListOfStatus

param Stat

type Stat

BRepCheck_Status

rtype

void

static PrecCurve()
  • Returns the resolution on the 3d curve
    param aAC3D

    type aAC3D

    Adaptor3d_Curve

    rtype

    float

static PrecSurface()
  • Returns the resolution on the surface
    param aAHSurf

    type aAHSurf

    Adaptor3d_HSurface

    rtype

    float

static Print()
Parameters

Stat

type Stat

BRepCheck_Status

param OS

type OS

Standard_OStream

rtype

void

static SelfIntersection()
Parameters

W

type W

TopoDS_Wire

param F

type F

TopoDS_Face

param E1

type E1

TopoDS_Edge

param E2

type E2

TopoDS_Edge

rtype

bool

property thisown

The membership flag