OCC.BRepCheck module

class OCC.BRepCheck.BRepCheck_Analyzer(*args)

Bases: object

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

  • <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 OCC.BRepCheck.BRepCheck_DataMapIteratorOfDataMapOfShapeListOfStatus(*args)

Bases: OCC.TCollection.TCollection_BasicMapIterator

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

The membership flag

class OCC.BRepCheck.BRepCheck_DataMapIteratorOfDataMapOfShapeResult(*args)

Bases: OCC.TCollection.TCollection_BasicMapIterator

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

The membership flag

class OCC.BRepCheck.BRepCheck_DataMapNodeOfDataMapOfShapeListOfStatus(*args)

Bases: OCC.TCollection.TCollection_MapNode

GetHandle()

BRepCheck_DataMapNodeOfDataMapOfShapeListOfStatus_GetHandle(BRepCheck_DataMapNodeOfDataMapOfShapeListOfStatus self) -> Handle_BRepCheck_DataMapNodeOfDataMapOfShapeListOfStatus

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

The membership flag

class OCC.BRepCheck.BRepCheck_DataMapNodeOfDataMapOfShapeResult(*args)

Bases: OCC.TCollection.TCollection_MapNode

GetHandle()

BRepCheck_DataMapNodeOfDataMapOfShapeResult_GetHandle(BRepCheck_DataMapNodeOfDataMapOfShapeResult self) -> Handle_BRepCheck_DataMapNodeOfDataMapOfShapeResult

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

The membership flag

class OCC.BRepCheck.BRepCheck_DataMapOfShapeListOfStatus(NbBuckets=1)

Bases: OCC.TCollection.TCollection_BasicMap

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 (Standard_Integer) –
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 OCC.BRepCheck.BRepCheck_DataMapOfShapeResult(NbBuckets=1)

Bases: OCC.TCollection.TCollection_BasicMap

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 (Standard_Integer) –
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 OCC.BRepCheck.BRepCheck_Edge(*args)

Bases: OCC.BRepCheck.BRepCheck_Result

GeometricControls()
Return type:bool
Parameters:B (bool) –
Return type:None
GetHandle()

BRepCheck_Edge_GetHandle(BRepCheck_Edge self) -> Handle_BRepCheck_Edge

Tolerance()
Return type:float
thisown

The membership flag

class OCC.BRepCheck.BRepCheck_Face(*args)

Bases: OCC.BRepCheck.BRepCheck_Result

ClassifyWires()
Parameters:
  • Update (bool) – default value is Standard_False
  • Update – default value is Standard_False
Return type:

BRepCheck_Status

Return type:

BRepCheck_Status

GeometricControls()
Return type:bool
Parameters:B (bool) –
Return type:None
GetHandle()

BRepCheck_Face_GetHandle(BRepCheck_Face self) -> Handle_BRepCheck_Face

IntersectWires()
Parameters:
  • Update (bool) – default value is Standard_False
  • Update – default value is Standard_False
Return type:

BRepCheck_Status

Return type:

BRepCheck_Status

IsUnorientable()
Return type:bool
OrientationOfWires()
Parameters:
  • Update (bool) – default value is Standard_False
  • Update – default value is Standard_False
Return type:

BRepCheck_Status

Return type:

BRepCheck_Status

SetUnorientable()
Return type:None
thisown

The membership flag

class OCC.BRepCheck.BRepCheck_ListIteratorOfListOfStatus(*args)

Bases: object

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 OCC.BRepCheck.BRepCheck_ListNodeOfListOfStatus(*args)

Bases: OCC.TCollection.TCollection_MapNode

GetHandle()

BRepCheck_ListNodeOfListOfStatus_GetHandle(BRepCheck_ListNodeOfListOfStatus self) -> Handle_BRepCheck_ListNodeOfListOfStatus

Value()
Return type:BRepCheck_Status
thisown

The membership flag

class OCC.BRepCheck.BRepCheck_ListOfStatus

Bases: object

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 OCC.BRepCheck.BRepCheck_Result(*args, **kwargs)

Bases: OCC.MMgt.MMgt_TShared

Blind()
Return type:void
ContextualShape()
Return type:TopoDS_Shape
GetHandle()

BRepCheck_Result_GetHandle(BRepCheck_Result self) -> Handle_BRepCheck_Result

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 OCC.BRepCheck.BRepCheck_Shell(*args)

Bases: OCC.BRepCheck.BRepCheck_Result

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
  • 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()

BRepCheck_Shell_GetHandle(BRepCheck_Shell self) -> Handle_BRepCheck_Shell

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
  • 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 OCC.BRepCheck.BRepCheck_Vertex(*args)

Bases: OCC.BRepCheck.BRepCheck_Result

GetHandle()

BRepCheck_Vertex_GetHandle(BRepCheck_Vertex self) -> Handle_BRepCheck_Vertex

Tolerance()
Return type:float
thisown

The membership flag

class OCC.BRepCheck.BRepCheck_Wire(*args)

Bases: OCC.BRepCheck.BRepCheck_Result

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
  • 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

  • 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()

BRepCheck_Wire_GetHandle(BRepCheck_Wire self) -> Handle_BRepCheck_Wire

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

  • 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

  • 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

thisown

The membership flag

class OCC.BRepCheck.Handle_BRepCheck_DataMapNodeOfDataMapOfShapeListOfStatus(*args)

Bases: OCC.TCollection.Handle_TCollection_MapNode

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

The membership flag

class OCC.BRepCheck.Handle_BRepCheck_DataMapNodeOfDataMapOfShapeResult(*args)

Bases: OCC.TCollection.Handle_TCollection_MapNode

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

The membership flag

class OCC.BRepCheck.Handle_BRepCheck_Edge(*args)

Bases: OCC.BRepCheck.Handle_BRepCheck_Result

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

The membership flag

class OCC.BRepCheck.Handle_BRepCheck_Face(*args)

Bases: OCC.BRepCheck.Handle_BRepCheck_Result

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

The membership flag

class OCC.BRepCheck.Handle_BRepCheck_ListNodeOfListOfStatus(*args)

Bases: OCC.TCollection.Handle_TCollection_MapNode

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

The membership flag

class OCC.BRepCheck.Handle_BRepCheck_Result(*args)

Bases: OCC.MMgt.Handle_MMgt_TShared

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

The membership flag

class OCC.BRepCheck.Handle_BRepCheck_Shell(*args)

Bases: OCC.BRepCheck.Handle_BRepCheck_Result

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

The membership flag

class OCC.BRepCheck.Handle_BRepCheck_Vertex(*args)

Bases: OCC.BRepCheck.Handle_BRepCheck_Result

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

The membership flag

class OCC.BRepCheck.Handle_BRepCheck_Wire(*args)

Bases: OCC.BRepCheck.Handle_BRepCheck_Result

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

The membership flag

class OCC.BRepCheck.SwigPyIterator(*args, **kwargs)

Bases: object

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

The membership flag

value()
class OCC.BRepCheck.brepcheck(*args, **kwargs)

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

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

void

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

void

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

bool