OCC.BRepCheck module

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 Vertex : BRepCheck_InvalidToleranceValue NYI For an Edge : BRepCheck_InvalidCurveOnClosedSurface, BRepCheck_InvalidCurveOnSurface, BRepCheck_InvalidSameParameterFlag, BRepCheck_InvalidToleranceValue NYI For a face : BRepCheck_UnorientableShape, BRepCheck_IntersectingWires, BRepCheck_InvalidToleranceValue NYI For a wire : BRepCheck_SelfIntersectingWire
Parameters:
  • S (TopoDS_Shape &) –
  • GeomControls (bool) – default value is Standard_True
Return type:

None

Init()
  • <S> is the shape to control. <GeomControls> If False only topological informaions are checked. The geometricals controls are For a Vertex : BRepCheck_InvalidTolerance NYI For an Edge : BRepCheck_InvalidCurveOnClosedSurface, BRepCheck_InvalidCurveOnSurface, BRepCheck_InvalidSameParameterFlag, BRepCheck_InvalidTolerance NYI For a face : BRepCheck_UnorientableShape, BRepCheck_IntersectingWires, BRepCheck_InvalidTolerance NYI For a wire : BRepCheck_SelfIntersectingWire
Parameters:
  • S (TopoDS_Shape &) –
  • GeomControls (bool) – default value is Standard_True
Return type:

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.
Parameters:S (TopoDS_Shape &) –
Return type: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.
Return type:bool
Result()
Parameters:SubS (TopoDS_Shape &) –
Return type:Handle_BRepCheck_Result
thisown

The membership flag

class BRepCheck_DataMapIteratorOfDataMapOfShapeListOfStatus(*args)

Bases: OCC.TCollection.TCollection_BasicMapIterator

Return type:None
Parameters:aMap (BRepCheck_DataMapOfShapeListOfStatus &) –
Return type:None
Initialize()
Parameters:aMap (BRepCheck_DataMapOfShapeListOfStatus &) –
Return type:None
Key()
Return type:TopoDS_Shape
Value()
Return type:BRepCheck_ListOfStatus
thisown

The membership flag

class BRepCheck_DataMapIteratorOfDataMapOfShapeResult(*args)

Bases: OCC.TCollection.TCollection_BasicMapIterator

Return type:None
Parameters:aMap (BRepCheck_DataMapOfShapeResult &) –
Return type:None
Initialize()
Parameters:aMap (BRepCheck_DataMapOfShapeResult &) –
Return type:None
Key()
Return type:TopoDS_Shape
Value()
Return type:Handle_BRepCheck_Result
thisown

The membership flag

class BRepCheck_DataMapNodeOfDataMapOfShapeListOfStatus(*args)

Bases: OCC.TCollection.TCollection_MapNode

Parameters:
  • K (TopoDS_Shape &) –
  • I (BRepCheck_ListOfStatus &) –
  • n (TCollection_MapNodePtr &) –
Return type:

None

GetHandle()
Key()
Return type:TopoDS_Shape
Value()
Return type:BRepCheck_ListOfStatus
thisown

The membership flag

class BRepCheck_DataMapNodeOfDataMapOfShapeResult(*args)

Bases: OCC.TCollection.TCollection_MapNode

Parameters:
  • K (TopoDS_Shape &) –
  • I (Handle_BRepCheck_Result &) –
  • n (TCollection_MapNodePtr &) –
Return type:

None

GetHandle()
Key()
Return type:TopoDS_Shape
Value()
Return type:Handle_BRepCheck_Result
thisown

The membership flag

class BRepCheck_DataMapOfShapeListOfStatus(*args)

Bases: OCC.TCollection.TCollection_BasicMap

Parameters:NbBuckets (int) – default value is 1
Return type:None
Assign()
Parameters:Other (BRepCheck_DataMapOfShapeListOfStatus &) –
Return type:BRepCheck_DataMapOfShapeListOfStatus
Bind()
Parameters:
  • K (TopoDS_Shape &) –
  • I (BRepCheck_ListOfStatus &) –
Return type:

bool

ChangeFind()
Parameters:K (TopoDS_Shape &) –
Return type:BRepCheck_ListOfStatus
ChangeFind1()
Parameters:K (TopoDS_Shape &) –
Return type:Standard_Address
Clear()
Return type:None
Find()
Parameters:K (TopoDS_Shape &) –
Return type:BRepCheck_ListOfStatus
Find1()
Parameters:K (TopoDS_Shape &) –
Return type:Standard_Address
IsBound()
Parameters:K (TopoDS_Shape &) –
Return type:bool
ReSize()
Parameters:NbBuckets (int) –
Return type:None
Set()
Parameters:Other (BRepCheck_DataMapOfShapeListOfStatus &) –
Return type:BRepCheck_DataMapOfShapeListOfStatus
UnBind()
Parameters:K (TopoDS_Shape &) –
Return type:bool
thisown

The membership flag

class BRepCheck_DataMapOfShapeResult(*args)

Bases: OCC.TCollection.TCollection_BasicMap

Parameters:NbBuckets (int) – default value is 1
Return type:None
Assign()
Parameters:Other (BRepCheck_DataMapOfShapeResult &) –
Return type:BRepCheck_DataMapOfShapeResult
Bind()
Parameters:
  • K (TopoDS_Shape &) –
  • I (Handle_BRepCheck_Result &) –
Return type:

bool

ChangeFind()
Parameters:K (TopoDS_Shape &) –
Return type:Handle_BRepCheck_Result
ChangeFind1()
Parameters:K (TopoDS_Shape &) –
Return type:Standard_Address
Clear()
Return type:None
Find()
Parameters:K (TopoDS_Shape &) –
Return type:Handle_BRepCheck_Result
Find1()
Parameters:K (TopoDS_Shape &) –
Return type:Standard_Address
IsBound()
Parameters:K (TopoDS_Shape &) –
Return type:bool
ReSize()
Parameters:NbBuckets (int) –
Return type:None
Set()
Parameters:Other (BRepCheck_DataMapOfShapeResult &) –
Return type:BRepCheck_DataMapOfShapeResult
UnBind()
Parameters:K (TopoDS_Shape &) –
Return type:bool
thisown

The membership flag

class BRepCheck_Edge(*args)

Bases: OCC.BRepCheck.BRepCheck_Result

Parameters:E (TopoDS_Edge &) –
Return type:None
CheckPolygonOnTriangulation()
  • Checks, if polygon on triangulation of heEdge is out of 3D-curve of this edge.
Parameters:theEdge (TopoDS_Edge &) –
Return type:BRepCheck_Status
GeometricControls()
Return type:bool
Parameters:B (bool) –
Return type:None
GetHandle()
SetStatus()
  • Sets status of Edge;
Parameters:theStatus (BRepCheck_Status) –
Return type:None
Tolerance()
Return type:float
thisown

The membership flag

class BRepCheck_Face(*args)

Bases: OCC.BRepCheck.BRepCheck_Result

Parameters:F (TopoDS_Face &) –
Return type:None
ClassifyWires()
Parameters:Update (bool) – default value is Standard_False
Return type:BRepCheck_Status
GeometricControls()
Return type:bool
Parameters:B (bool) –
Return type:None
GetHandle()
IntersectWires()
Parameters:Update (bool) – default value is Standard_False
Return type:BRepCheck_Status
IsUnorientable()
Return type:bool
OrientationOfWires()
Parameters:Update (bool) – default value is Standard_False
Return type:BRepCheck_Status
SetStatus()
  • Sets status of Face;
Parameters:theStatus (BRepCheck_Status) –
Return type:None
SetUnorientable()
Return type:None
thisown

The membership flag

class BRepCheck_ListIteratorOfListOfStatus(*args)

Bases: object

Return type:None
Parameters:L (BRepCheck_ListOfStatus &) –
Return type:None
Initialize()
Parameters:L (BRepCheck_ListOfStatus &) –
Return type:None
More()
Return type:bool
Next()
Return type:None
Value()
Return type:BRepCheck_Status
thisown

The membership flag

class BRepCheck_ListNodeOfListOfStatus(*args)

Bases: OCC.TCollection.TCollection_MapNode

Parameters:
  • I (BRepCheck_Status &) –
  • n (TCollection_MapNodePtr &) –
Return type:

None

GetHandle()
Value()
Return type:BRepCheck_Status
thisown

The membership flag

class BRepCheck_ListOfStatus(*args)

Bases: object

Return type:None
Parameters:Other (BRepCheck_ListOfStatus &) –
Return type:None
Append()
Parameters:
  • I (BRepCheck_Status &) –
  • I
  • theIt (BRepCheck_ListIteratorOfListOfStatus &) –
  • Other (BRepCheck_ListOfStatus &) –
Return type:

None

Return type:

None

Return type:

None

Assign()
Parameters:Other (BRepCheck_ListOfStatus &) –
Return type:None
Clear()
Return type:None
Extent()
Return type:int
First()
Return type:BRepCheck_Status
InsertAfter()
Parameters:
  • I (BRepCheck_Status &) –
  • It (BRepCheck_ListIteratorOfListOfStatus &) –
  • Other (BRepCheck_ListOfStatus &) –
  • It
Return type:

None

Return type:

None

InsertBefore()
Parameters:
  • I (BRepCheck_Status &) –
  • It (BRepCheck_ListIteratorOfListOfStatus &) –
  • Other (BRepCheck_ListOfStatus &) –
  • It
Return type:

None

Return type:

None

IsEmpty()
Return type:bool
Last()
Return type:BRepCheck_Status
Prepend()
Parameters:
  • I (BRepCheck_Status &) –
  • I
  • theIt (BRepCheck_ListIteratorOfListOfStatus &) –
  • Other (BRepCheck_ListOfStatus &) –
Return type:

None

Return type:

None

Return type:

None

Remove()
Parameters:It (BRepCheck_ListIteratorOfListOfStatus &) –
Return type:None
RemoveFirst()
Return type:None
Set()
Parameters:Other (BRepCheck_ListOfStatus &) –
Return type:None
thisown

The membership flag

class BRepCheck_Result(*args, **kwargs)

Bases: OCC.MMgt.MMgt_TShared

Blind()
Return type:void
ContextualShape()
Return type:TopoDS_Shape
GetHandle()
InContext()
Parameters:ContextShape (TopoDS_Shape &) –
Return type:void
Init()
Parameters:S (TopoDS_Shape &) –
Return type: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 (TopoDS_Shape &) –
Return type:None
Status()
Return type:BRepCheck_ListOfStatus
StatusOnShape()
  • If not already done, performs the InContext control and returns the list of status.
Parameters:S (TopoDS_Shape &) –
Return type:BRepCheck_ListOfStatus
Return type:BRepCheck_ListOfStatus
thisown

The membership flag

class BRepCheck_Shell(*args)

Bases: OCC.BRepCheck.BRepCheck_Result

Parameters:S (TopoDS_Shell &) –
Return type: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.
Parameters:Update (bool) – default value is Standard_False
Return type:BRepCheck_Status
GetHandle()
IsUnorientable()
Return type:bool
NbConnectedSet()
Parameters:theSets (TopTools_ListOfShape &) –
Return type: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.
Parameters:Update (bool) – default value is Standard_False
Return type:BRepCheck_Status
SetUnorientable()
Return type:None
thisown

The membership flag

class BRepCheck_Vertex(*args)

Bases: OCC.BRepCheck.BRepCheck_Result

Parameters:V (TopoDS_Vertex &) –
Return type:None
GetHandle()
Tolerance()
Return type:float
thisown

The membership flag

class BRepCheck_Wire(*args)

Bases: OCC.BRepCheck.BRepCheck_Result

Parameters:W (TopoDS_Wire &) –
Return type:None
Closed()
  • Checks if the oriented edges of the wire give a closed wire. If the wire is closed, returns BRepCheck_NoError. Warning : if 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
Parameters:Update (bool) – default value is Standard_False
Return type: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.
Parameters:
  • F (TopoDS_Face &) –
  • Update (bool) – default value is Standard_False
Return type:

BRepCheck_Status

GeometricControls()
  • report SelfIntersect() check would be (is) done
Return type:bool
  • set SelfIntersect() to be checked
Parameters:B (bool) –
Return type:None
GetHandle()
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
Parameters:
  • F (TopoDS_Face &) –
  • Update (bool) – default value is Standard_False
Return type:

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
Parameters:
  • F (TopoDS_Face &) –
  • E1 (TopoDS_Edge &) –
  • E2 (TopoDS_Edge &) –
  • Update (bool) – default value is Standard_False
Return type:

BRepCheck_Status

SetStatus()
  • Sets status of Wire;
Parameters:theStatus (BRepCheck_Status) –
Return type:None
thisown

The membership flag

class Handle_BRepCheck_DataMapNodeOfDataMapOfShapeListOfStatus(*args)

Bases: OCC.TCollection.Handle_TCollection_MapNode

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class Handle_BRepCheck_DataMapNodeOfDataMapOfShapeResult(*args)

Bases: OCC.TCollection.Handle_TCollection_MapNode

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class Handle_BRepCheck_Edge(*args)

Bases: OCC.BRepCheck.Handle_BRepCheck_Result

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class Handle_BRepCheck_Face(*args)

Bases: OCC.BRepCheck.Handle_BRepCheck_Result

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class Handle_BRepCheck_ListNodeOfListOfStatus(*args)

Bases: OCC.TCollection.Handle_TCollection_MapNode

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class Handle_BRepCheck_Result(*args)

Bases: OCC.MMgt.Handle_MMgt_TShared

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class Handle_BRepCheck_Shell(*args)

Bases: OCC.BRepCheck.Handle_BRepCheck_Result

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class Handle_BRepCheck_Vertex(*args)

Bases: OCC.BRepCheck.Handle_BRepCheck_Result

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class Handle_BRepCheck_Wire(*args)

Bases: OCC.BRepCheck.Handle_BRepCheck_Result

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class SwigPyIterator(*args, **kwargs)

Bases: object

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

The membership flag

value()
class brepcheck

Bases: object

static Add(*args)
Parameters:
  • List (BRepCheck_ListOfStatus &) –
  • Stat (BRepCheck_Status) –
Return type:

void

static Print(*args)
Parameters:
  • Stat (BRepCheck_Status) –
  • OS (Standard_OStream &) –
Return type:

void

static SelfIntersection(*args)
Parameters:
  • W (TopoDS_Wire &) –
  • F (TopoDS_Face &) –
  • E1 (TopoDS_Edge &) –
  • E2 (TopoDS_Edge &) –
Return type:

bool

thisown

The membership flag

brepcheck_Add(*args)
Parameters:
  • List (BRepCheck_ListOfStatus &) –
  • Stat (BRepCheck_Status) –
Return type:

void

brepcheck_Print(*args)
Parameters:
  • Stat (BRepCheck_Status) –
  • OS (Standard_OStream &) –
Return type:

void

brepcheck_SelfIntersection(*args)
Parameters:
  • W (TopoDS_Wire &) –
  • F (TopoDS_Face &) –
  • E1 (TopoDS_Edge &) –
  • E2 (TopoDS_Edge &) –
Return type:

bool

register_handle(handle, base_object)

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