OCC.Core.TransferBRep module

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

class SwigPyIterator(*args, **kwargs)

Bases: object

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

The membership flag

value()
class TransferBRep_BinderOfShape(*args)

Bases: OCC.Core.Transfer.Transfer_Binder

  • normal standard constructor, creates an empty BinderOfShape
    rtype

    None* constructor which in the same time defines the result Returns True if a starting object is bound with SEVERAL results : Here, returns allways False But it can have next results

    param res

    type res

    TopoDS_Shape

    rtype

    None

CResult()
  • Returns the defined Result, if there is one, and allows to change it (avoids Result + SetResult). Admits that Result can be not yet defined Warninga call to CResult causes Result to be known as defined
    rtype

    TopoDS_Shape

static DownCast(t)
Result()
  • Returns the defined Result, if there is one
    rtype

    TopoDS_Shape

SetResult()
  • Defines the Result
    param res

    type res

    TopoDS_Shape

    rtype

    None

property thisown

The membership flag

class TransferBRep_HSequenceOfTransferResultInfo(*args)

Bases: OCC.Core.TransferBRep.TransferBRep_SequenceOfTransferResultInfo, OCC.Core.Standard.Standard_Transient

  • Empty constructor

Return type

None* Copy constructor – does nothing

Parameters

& (Standard_Transient) –

Return type

None

Append()
ChangeSequence()
static DownCast(t)
Sequence()
property thisown

The membership flag

class TransferBRep_OrientedShapeMapper(*args)

Bases: OCC.Core.Transfer.Transfer_Finder

  • Creates a Mapper with a Value. This Value can then not be changed. It is used by the Hasher to compute the HashCode, which will then be stored for an immediate reading.
    param akey

    type akey

    TopoDS_Shape

    rtype

    None

static DownCast(t)
Value()
  • Returns the contained value
    rtype

    TopoDS_Shape

property thisown

The membership flag

class TransferBRep_Reader(*args)

Bases: object

  • Initializes a non-specialised Reader. Typically, for each norm or protocol, is will be required to define a specific Create to load a file and transfer it
    rtype

    None

Actor()
  • Returns the recorded Actor
    rtype

    opencascade::handle<Transfer_ActorOfTransientProcess>

BeginTransfer()
  • Initializes the Reader for a Transfer (one,roots, or list) Also calls PrepareTransfer Returns True when done, False if could not be done
    rtype

    bool

CheckListModel()
  • Checks the Model (completesyntax + semantic) and returns the produced Check List
    rtype

    Interface_CheckIterator

CheckListResult()
  • Checks the Result of last Transfer (individual or roots, no cumulation on several transfers) and returns the produced list
    rtype

    Interface_CheckIterator

CheckStatusModel()
  • Checks the Model. Returns True if there is NO FAIL at all (regardless Warnings) If <withprint> is True, also sends Checks on standard output
    param withprint

    type withprint

    bool

    rtype

    bool

CheckStatusResult()
  • Checks the Result of last Transfer (individual or roots, no cumulation on several transfers). Returns True if NO fail occured during Transfer (queries the TransientProcess)
    param withprints

    type withprints

    bool

    rtype

    bool

Clear()
  • clears the result and Done status. But not the Model.
    rtype

    None

EndTransfer()
  • Ebds a Transfer (one, roots or list) by recording its result
    rtype

    None

FileNotFound()
  • Returns True if FileStatus is for FileNotFound
    rtype

    bool

FileStatus()
  • Returns the File Status
    rtype

    int

GetModeNewTransfer(TransferBRep_Reader self) → Standard_Boolean
IsDone()
  • Returns True if the LAST Transfer/TransferRoots was a success
    rtype

    bool

Model()
  • Returns the Model to be worked on
    rtype

    opencascade::handle<Interface_InterfaceModel>

NbShapes()
  • Returns the count of produced Shapes (roots)
    rtype

    int

NbTransients()
  • Returns the count of produced Transient Results (roots)
    rtype

    int

OneShape()
  • Returns a unique Shape for the result- a void Shape (type = SHAPE) if result is empty - a simple Shape if result has only onereturns this one - a Compound if result has more than one Shape
    rtype

    TopoDS_Shape

PrepareTransfer()
  • Prepares the Transfer. Also can act on the Actor or change the TransientProcess if required. Should not set the Actor into the TransientProcess, it is done by caller. The provided default does nothing.
    rtype

    void

Protocol()
  • Returns the recorded Protocol
    rtype

    opencascade::handle<Interface_Protocol>

SetActor()
  • Records the actor to be used for transfers
    param actor

    type actor

    Transfer_ActorOfTransientProcess

    rtype

    None

SetFileStatus()
  • Sets File Status to be interpreted as follows= 0 OK < 0 file not found > 0 read error, no Model could be created
    param status

    type status

    int

    rtype

    None

SetModeNewTransfer(TransferBRep_Reader self, Standard_Boolean value)
SetModel()
  • Specifies a Model to work on Also clears the result and Done status
    param model

    type model

    Interface_InterfaceModel

    rtype

    None

SetProtocol()
  • Records the protocol to be used for read and transfer roots
    param protocol

    type protocol

    Interface_Protocol

    rtype

    None

Shape()
  • Returns a Shape given its rank, by default the first one
    param num

    default value is 1

    type num

    int

    rtype

    TopoDS_Shape

ShapeResult()
  • Returns a Shape produced from a given entity (if it was individually transferred or if an intermediate result is known). If no Shape is bound with <ent>, returns a Null Shape WarningRuns on the last call to Transfer,TransferRoots,TransferList
    param ent

    type ent

    Standard_Transient

    rtype

    TopoDS_Shape

Shapes()
  • Returns the complete list of produced Shapes
    rtype

    opencascade::handle<TopTools_HSequenceOfShape>

SyntaxError()
  • Returns True if FileStatus is for Error during read (major error; for local error, see CheckModel)
    rtype

    bool

Transfer()
  • Transfers an Entity given its rank in the Model (Root or not) Returns True if it is recognized as Geom-Topol. (But it can have failedsee IsDone)
    param num

    type num

    int

    rtype

    bool

TransferList()
  • Transfers a list of Entities (only the ones also in the Model) Remarkformer result is cleared
    param list

    type list

    TColStd_HSequenceOfTransient

    rtype

    void

TransferRoots()
  • Transfers all Root Entities which are recognized as Geom-Topol The result will be a list of Shapes. This method calls user redefinable PrepareTransfer Remarkformer result is cleared
    rtype

    void

Transient()
  • Returns a Transient Root Result, given its rank (by default the first one)
    param num

    default value is 1

    type num

    int

    rtype

    opencascade::handle<Standard_Transient>

TransientProcess()
  • Returns the TransientProcess. It records informations about the very last transfer done. Null if no transfer yet done. Can be used for queries more accurate than the default ones.
    rtype

    opencascade::handle<Transfer_TransientProcess>

Transients()
  • Returns the complete list of produced Transient Results
    rtype

    opencascade::handle<TColStd_HSequenceOfTransient>

property thisown

The membership flag

class TransferBRep_SequenceOfTransferResultInfo(*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 TransferBRep_ShapeBinder(*args)

Bases: OCC.Core.TransferBRep.TransferBRep_BinderOfShape

  • Creates an empty ShapeBinder
    rtype

    None* Creates a ShapeBinder with a result

    param res

    type res

    TopoDS_Shape

    rtype

    None

CompSolid()
Return type

TopoDS_CompSolid

Compound()
Return type

TopoDS_Compound

static DownCast(t)
Edge()
Return type

TopoDS_Edge

Face()
Return type

TopoDS_Face

ShapeType()
  • Returns the Type of the Shape Result (under TopAbs form)
    rtype

    TopAbs_ShapeEnum

Shell()
Return type

TopoDS_Shell

Solid()
Return type

TopoDS_Solid

Vertex()
Return type

TopoDS_Vertex

Wire()
Return type

TopoDS_Wire

property thisown

The membership flag

class TransferBRep_ShapeInfo

Bases: object

static Type()
  • Returns the Type attached to an object Here, TShape (Shape has no Dynamic Type)
    param ent

    type ent

    TopoDS_Shape

    rtype

    opencascade::handle<Standard_Type>

static TypeName()
  • Returns Type Name (string) Here, the true name of the Type of a Shape
    param ent

    type ent

    TopoDS_Shape

    rtype

    char *

property thisown

The membership flag

class TransferBRep_ShapeListBinder(*args)

Bases: OCC.Core.Transfer.Transfer_Binder

Return type

None:param list: :type list: TopTools_HSequenceOfShape :rtype: None

AddResult()
  • Adds an item to the result list
    param res

    type res

    TopoDS_Shape

    rtype

    None

CompSolid()
Parameters

num

type num

int

rtype

TopoDS_CompSolid

Compound()
Parameters

num

type num

int

rtype

TopoDS_Compound

static DownCast(t)
Edge()
Parameters

num

type num

int

rtype

TopoDS_Edge

Face()
Parameters

num

type num

int

rtype

TopoDS_Face

NbShapes()
Return type

int

Result()
Return type

opencascade::handle<TopTools_HSequenceOfShape>

SetResult()
  • Changes an already defined sub-result
    param num

    type num

    int

    param res

    type res

    TopoDS_Shape

    rtype

    None

Shape()
Parameters

num

type num

int

rtype

TopoDS_Shape

ShapeType()
Parameters

num

type num

int

rtype

TopAbs_ShapeEnum

Shell()
Parameters

num

type num

int

rtype

TopoDS_Shell

Solid()
Parameters

num

type num

int

rtype

TopoDS_Solid

Vertex()
Parameters

num

type num

int

rtype

TopoDS_Vertex

Wire()
Parameters

num

type num

int

rtype

TopoDS_Wire

property thisown

The membership flag

class TransferBRep_ShapeMapper(*args)

Bases: OCC.Core.Transfer.Transfer_Finder

  • Creates a Mapper with a Value. This Value can then not be changed. It is used by the Hasher to compute the HashCode, which will then be stored for an immediate reading.
    param akey

    type akey

    TopoDS_Shape

    rtype

    None

static DownCast(t)
Value()
  • Returns the contained value
    rtype

    TopoDS_Shape

property thisown

The membership flag

class TransferBRep_TransferResultInfo(*args)

Bases: OCC.Core.Standard.Standard_Transient

  • Creates object with all fields nullified.
    rtype

    None

Clear()
  • Resets all the fields.
    rtype

    None

static DownCast(t)
GetNoResult(TransferBRep_TransferResultInfo self) → Standard_Integer
GetNoResultFail(TransferBRep_TransferResultInfo self) → Standard_Integer
GetNoResultWarning(TransferBRep_TransferResultInfo self) → Standard_Integer
GetNoResultWarningFail(TransferBRep_TransferResultInfo self) → Standard_Integer
GetResult(TransferBRep_TransferResultInfo self) → Standard_Integer
GetResultFail(TransferBRep_TransferResultInfo self) → Standard_Integer
GetResultWarning(TransferBRep_TransferResultInfo self) → Standard_Integer
GetResultWarningFail(TransferBRep_TransferResultInfo self) → Standard_Integer
SetNoResult(TransferBRep_TransferResultInfo self, Standard_Integer value)
SetNoResultFail(TransferBRep_TransferResultInfo self, Standard_Integer value)
SetNoResultWarning(TransferBRep_TransferResultInfo self, Standard_Integer value)
SetNoResultWarningFail(TransferBRep_TransferResultInfo self, Standard_Integer value)
SetResult(TransferBRep_TransferResultInfo self, Standard_Integer value)
SetResultFail(TransferBRep_TransferResultInfo self, Standard_Integer value)
SetResultWarning(TransferBRep_TransferResultInfo self, Standard_Integer value)
SetResultWarningFail(TransferBRep_TransferResultInfo self, Standard_Integer value)
property thisown

The membership flag

class transferbrep

Bases: object

static CheckObject()
  • Returns the check-list bound to a given object, generally none (if OK) or one check. <obj> can be, either a true Transient object or entity, or a ShapeMapper, in that case the Shape is considered
    param chl

    type chl

    Interface_CheckIterator

    param obj

    type obj

    Standard_Transient

    rtype

    Interface_CheckIterator

static Checked()
  • Returns the list of objects to which a non-empty Check is bound in a check-list. Objects are transients, they can then be either Imagine objects entities for an Interface Norm. <alsoshapes> commands Shapes to be returned too (as ShapeMapper), see also CheckedShapes
    param chl

    type chl

    Interface_CheckIterator

    param alsoshapes

    default value is Standard_False

    type alsoshapes

    bool

    rtype

    opencascade::handle<TColStd_HSequenceOfTransient>

static CheckedShapes()
  • Returns the list of shapes to which a non-empty Check is bound in a check-list
    param chl

    type chl

    Interface_CheckIterator

    rtype

    opencascade::handle<TopTools_HSequenceOfShape>

static PrintResultInfo()
  • Prints the results of transfer to given priner with given header.
    param Printer

    type Printer

    Message_Printer

    param Header

    type Header

    Message_Msg

    param ResultInfo

    type ResultInfo

    TransferBRep_TransferResultInfo

    param printEmpty

    default value is Standard_True

    type printEmpty

    bool

    rtype

    void

static ResultCheckList()
  • Takes a starting CheckIterator which brings checks bound with starting objects (Shapes, Transient from an Imagine appli …) and converts it to a CheckIterator in which checks are bound with results in an InterfaceModel Mapping is recorded in the FinderProcess Starting objects for which no individual result is recorded remain in their state
    param chl

    type chl

    Interface_CheckIterator

    param FP

    type FP

    Transfer_FinderProcess

    param model

    type model

    Interface_InterfaceModel

    rtype

    Interface_CheckIterator

static ResultFromShape()
  • Returns the result (as a Binder) attached to a given Shape Null if none
    param FP

    type FP

    Transfer_FinderProcess

    param shape

    type shape

    TopoDS_Shape

    rtype

    opencascade::handle<Transfer_Binder>

static SetShapeResult()
  • Sets a Shape as a result for a starting entity <ent> (reverse of ShapeResult) It simply creates a ShapeBinder then binds it to the entity
    param TP

    type TP

    Transfer_TransientProcess

    param ent

    type ent

    Standard_Transient

    param result

    type result

    TopoDS_Shape

    rtype

    void

static SetTransientFromShape()
  • Binds a Transient Result to a Shape in a FinderProcess (as first result if multipledoes not add it to existing one)
    param FP

    type FP

    Transfer_FinderProcess

    param shape

    type shape

    TopoDS_Shape

    param result

    type result

    Standard_Transient

    rtype

    void

static ShapeMapper()
  • Returns a ShapeMapper for a given Shape (location included) Either <shape> is already mapped, then its Mapper is returned Or it is not, then a new one is created then returned, BUT it is not mapped here (use Bind or FindElseBind to do this)
    param FP

    type FP

    Transfer_FinderProcess

    param shape

    type shape

    TopoDS_Shape

    rtype

    opencascade::handle<TransferBRep_ShapeMapper>

static ShapeResult()
  • Get the Shape recorded in a Binder If the Binder brings a multiple result, search for the Shape
    param binder

    type binder

    Transfer_Binder

    rtype

    TopoDS_Shape* Get the Shape recorded in a TransientProcess as result of the Transfer of an entity. I.E. in the binder bound to that Entity If no result or result not a single Shape, returns a Null Shape

    param TP

    type TP

    Transfer_TransientProcess

    param ent

    type ent

    Standard_Transient

    rtype

    TopoDS_Shape

static ShapeState()
  • Returns a Status regarding a Shape in a FinderProcess - FORWARD means bound with SAME Orientation - REVERSED means bound with REVERSE Orientation - EXTERNAL means NOT BOUND - INTERNAL is not used
    param FP

    type FP

    Transfer_FinderProcess

    param shape

    type shape

    TopoDS_Shape

    rtype

    TopAbs_Orientation

static Shapes()
  • Gets the Shapes recorded in a TransientProcess as result of a Transfer, considers roots only or all results according <rootsonly>, returns them as a HSequence
    param TP

    type TP

    Transfer_TransientProcess

    param rootsonly

    default value is Standard_True

    type rootsonly

    bool

    rtype

    opencascade::handle<TopTools_HSequenceOfShape>* Gets the Shapes recorded in a TransientProcess as result of a Transfer, for a given list of starting entities, returns the shapes as a HSequence

    param TP

    type TP

    Transfer_TransientProcess

    param list

    type list

    TColStd_HSequenceOfTransient

    rtype

    opencascade::handle<TopTools_HSequenceOfShape>

static TransferResultInfo()
  • Fills sequence of TransferResultInfo for each type of entity given in the EntityTypes (entity are given as objects). Method IsKind applied to the entities in TP is used to compare with entities in EntityTypes. TopAbs_ShapeEnum).
    param TP

    type TP

    Transfer_TransientProcess

    param EntityTypes

    type EntityTypes

    TColStd_HSequenceOfTransient

    param InfoSeq

    type InfoSeq

    TransferBRep_HSequenceOfTransferResultInfo

    rtype

    void* Fills sequence of TransferResultInfo for each type of shape given in the ShapeTypes (which are in fact considered as TopAbs_ShapeEnum). The Finders in the FP are considered as ShapeMappers.

    param FP

    type FP

    Transfer_FinderProcess

    param ShapeTypes

    type ShapeTypes

    TColStd_HSequenceOfInteger

    param InfoSeq

    type InfoSeq

    TransferBRep_HSequenceOfTransferResultInfo

    rtype

    void

static TransientFromShape()
  • Returns the result as pure Transient attached to a Shape first one if multiple result
    param FP

    type FP

    Transfer_FinderProcess

    param shape

    type shape

    TopoDS_Shape

    rtype

    opencascade::handle<Standard_Transient>

property thisown

The membership flag