OCC.Standard module

class OCC.Standard.Handle_Standard_Transient(*args)

Bases: object

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

The membership flag

class OCC.Standard.Handle_Standard_Type(*args)

Bases: OCC.Standard.Handle_Standard_Transient

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

The membership flag

class OCC.Standard.Standard_ErrorHandler

Bases: object

Catches()
  • Returns ‘True’ if the caught exception has the same type or inherits from ‘aType’
Parameters:aType (Handle_Standard_Type &) –
Return type:bool
Destroy()
  • Unlinks and checks if there is a raised exception.
Return type:None
Error()
  • Returns the current Error.
Return type:Handle_Standard_Failure
static IsInTryBlock()
  • Test if the code is currently running in a try block
Return type:bool
Label()
  • Returns label for jump
Return type:Standard_JmpBuf
static LastCaughtError()
  • Returns the caught exception.
Return type:Handle_Standard_Failure
  • Removes handler from the handlers list
Return type:None
thisown

The membership flag

class OCC.Standard.Standard_ErrorHandlerCallback(*args, **kwargs)

Bases: object

DestroyCallback()
  • The callback function to perform necessary callback action. Called by the exception handler when it is being destroyed but still has this callback registered.
Return type:void
RegisterCallback()
  • Registers this callback object in the current error handler (if found).
Return type:None
UnregisterCallback()
  • Unregisters this callback object from the error handler.
Return type:None
thisown

The membership flag

OCC.Standard.Standard_ErrorHandler_IsInTryBlock()
  • Test if the code is currently running in a try block
Return type:bool
OCC.Standard.Standard_ErrorHandler_LastCaughtError()
  • Returns the caught exception.
Return type:Handle_Standard_Failure
class OCC.Standard.Standard_GUID(*args)

Bases: object

Assign()
Parameters:
  • uid (Standard_UUID &) –
  • uid
Return type:

None

Return type:

None

static CheckGUIDFormat(*args)
  • Check the format of a GUID string. It checks the size, the position of the ‘-‘ and the correct size of fields.
Parameters:aGuid (char *) –
Return type:bool
Hash()
  • Hash function for GUID.
Parameters:Upper (Standard_Integer) –
Return type:int
static HashCode(*args)
  • H method used by collections.
Parameters:
  • aguid (Standard_GUID &) –
  • Upper (Standard_Integer) –
Return type:

int

static IsEqual(*args)
  • Returns True when the two GUID are the same.
Parameters:
  • string1 (Standard_GUID &) –
  • string2 (Standard_GUID &) –
Return type:

bool

IsNotSame()
Parameters:uid (Standard_GUID &) –
Return type:bool
IsSame()
Parameters:uid (Standard_GUID &) –
Return type:bool
Set()
Parameters:
  • uid (Standard_UUID &) –
  • uid
Return type:

None

Return type:

None

ShallowDumpToString()

Standard_GUID_ShallowDumpToString(Standard_GUID self) -> std::string

ToCString()
  • translate the GUID into ascii string the aStrGuid is allocated by user. the guid have the following format: ‘00000000-0000-0000-0000-000000000000’
Parameters:aStrGuid (Standard_PCharacter) –
Return type:None
ToExtString()
  • translate the GUID into unicode string the aStrGuid is allocated by user. the guid have the following format: ‘00000000-0000-0000-0000-000000000000’
Parameters:aStrGuid (Standard_PExtCharacter) –
Return type:None
ToUUID()
Return type:Standard_UUID
thisown

The membership flag

OCC.Standard.Standard_GUID_CheckGUIDFormat(*args)
  • Check the format of a GUID string. It checks the size, the position of the ‘-‘ and the correct size of fields.
Parameters:aGuid (char *) –
Return type:bool
OCC.Standard.Standard_GUID_HashCode(*args)
  • H method used by collections.
Parameters:
  • aguid (Standard_GUID &) –
  • Upper (Standard_Integer) –
Return type:

int

OCC.Standard.Standard_GUID_IsEqual(*args)
  • Returns True when the two GUID are the same.
Parameters:
  • string1 (Standard_GUID &) –
  • string2 (Standard_GUID &) –
Return type:

bool

class OCC.Standard.Standard_MMgrOpt(*args)

Bases: OCC.Standard.Standard_MMgrRoot

thisown

The membership flag

class OCC.Standard.Standard_MMgrRaw(*args)

Bases: OCC.Standard.Standard_MMgrRoot

thisown

The membership flag

class OCC.Standard.Standard_MMgrRoot(*args, **kwargs)

Bases: object

Allocate()
  • Allocate specified number of bytes. The actually allocated space should be rounded up to double word size (4 bytes), as this is expected by implementation of some classes in OCC (e.g. TCollection_AsciiString)
Parameters:theSize (Standard_Size) –
Return type:Standard_Address
Free()
  • Frees previously allocated memory at specified address.
Parameters:thePtr (Standard_Address) –
Return type:void
Purge()
  • Purge internally cached unused memory blocks (if any) by releasing them to the operating system. Must return non-zero if some memory has been actually released, or zero otherwise. If option isDestroyed is True, this means that memory manager is not expected to be used any more; note however that in general case it is still possible to have calls to that instance of memory manager after this (e.g. to free memory of static objects in OCC). Thus this option should command the memory manager to release any cached memory to the system and not cache any more, but still remain operable... //! Default implementation does nothing and returns 0.
Parameters:isDestroyed (bool) – default value is Standard_False
Return type:int
  • Purge internally cached unused memory blocks (if any) by releasing them to the operating system. Must return non-zero if some memory has been actually released, or zero otherwise. If option isDestroyed is True, this means that memory manager is not expected to be used any more; note however that in general case it is still possible to have calls to that instance of memory manager after this (e.g. to free memory of static objects in OCC). Thus this option should command the memory manager to release any cached memory to the system and not cache any more, but still remain operable... //! Default implementation does nothing and returns 0.
Parameters:isDestroyed (bool) – default value is Standard_False
Return type:int
Reallocate()
  • Reallocate previously allocated memory to contain at least theSize bytes. In case of success, new pointer is returned.
Parameters:
  • thePtr (Standard_Address) –
  • theSize (Standard_Size) –
Return type:

Standard_Address

thisown

The membership flag

class OCC.Standard.Standard_MMgrTBBalloc(*args)

Bases: OCC.Standard.Standard_MMgrRoot

thisown

The membership flag

class OCC.Standard.Standard_Mutex

Bases: OCC.Standard.Standard_ErrorHandlerCallback

Lock()
  • Method to lock the mutex; waits until the mutex is released by other threads, locks it and then returns
Return type:None
TryLock()
  • Method to test the mutex; if the mutex is not hold by other thread, locks it and returns True; otherwise returns False without waiting mutex to be released.
Return type:bool
Unlock()
  • Method to unlock the mutex; releases it to other users
Return type:None
thisown

The membership flag

class OCC.Standard.Standard_Storable(*args, **kwargs)

Bases: object

Delete()
Return type:void
HashCode()
  • Returns a hashed value denoting <self>. This value is in the range 1..<Upper>.
Parameters:Upper (Standard_Integer) –
Return type:int
IsEqual()
  • Returns true if the direct contents of <self> and <Other> are memberwise equal.
Parameters:Other (Standard_Storable &) –
Return type:bool
IsSimilar()
  • Returns true if the Deep contents of <self> and <Other> are memberwise equal.
Parameters:Other (Standard_Storable &) –
Return type:bool
ShallowDumpToString()

Standard_Storable_ShallowDumpToString(Standard_Storable self) -> std::string

thisown

The membership flag

class OCC.Standard.Standard_Transient(*args)

Bases: object

Delete()
  • Memory deallocator for transient classes
Return type:void
DynamicType()
  • Returns a type information object about this object.
Return type:Handle_Standard_Type
GetHandle()

Standard_Transient_GetHandle(Standard_Transient self) -> Handle_Standard_Transient

GetRefCount()
  • Get the reference counter of this object.
Return type:int
IsInstance()
  • Returns a true value if this is an instance of Type.
Parameters:theType (Handle_Standard_Type &) –
Return type:bool
  • Returns a true value if this is an instance of TypeName.
Parameters:theTypeName (char *) –
Return type:bool
IsKind()
  • Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
Parameters:theType (Handle_Standard_Type &) –
Return type:bool
  • Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
Parameters:theTypeName (char *) –
Return type:bool
Set()
  • Assignment operator, needed to avoid copying reference counter
Parameters:& (Standard_Transient) –
Return type:Standard_Transient
ShallowDumpToString()

Standard_Transient_ShallowDumpToString(Standard_Transient self) -> std::string

This()
  • Returns a Handle which references this object. Must never be called to objects created in stack.
Return type:Handle_Standard_Transient
thisown

The membership flag

class OCC.Standard.Standard_Type(*args)

Bases: OCC.Standard.Standard_Transient

GetHandle()

Standard_Type_GetHandle(Standard_Type self) -> Handle_Standard_Type

IsClass()
  • Returns ‘True’, if the type is a ‘Class’.
Return type:bool
IsEnumeration()
  • Returns ‘True’, if the type is an ‘Enumeration’.
Return type:bool
IsImported()
  • Returns ‘True’, if the type is imported.
Return type:bool
IsPrimitive()
  • Returns ‘True’, if the type is a primitive.
Return type:bool
Name()
  • Returns the type name of <self>.
Return type:char *
NumberOfAncestor()
  • Returns the number of ancestors of the class.
Return type:int
NumberOfParent()
  • Returns the number of direct parents of the class.
Return type:int
PrintToString()

Standard_Type_PrintToString(Standard_Type self) -> std::string

ShallowDump()
  • Prints the Information about type.
Return type:None
ShallowDumpToString()

Standard_Type_ShallowDumpToString(Standard_Type self) -> std::string

Size()
  • Returns the size of <self> in bytes.
Return type:int
SubType()
  • Returns ‘True’, if <self> is the same as <aOther>, or inherits from <aOther>. Note that multiple inheritance is not supported.
Parameters:aOther (Handle_Standard_Type &) –
Return type:bool
  • Returns ‘True’, if <self> or one of its ancestors has the name equal to theName. Note that multiple inheritance is not supported.
Parameters:theName (char *) –
Return type:bool
thisown

The membership flag

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

Bases: object

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

The membership flag

value()
class OCC.Standard.standard(*args, **kwargs)

Bases: object

static Allocate(*args)
  • Allocates memory blocks aSize - bytes to allocate
Parameters:aSize (Standard_Size) –
Return type:Standard_Address
static Purge()
  • Deallocates the storage retained on the free list and clears the list. Returns non-zero if some memory has been actually freed.
Return type:int
static Reallocate(*args)
  • Reallocates memory blocks aStorage - previously allocated memory block aNewSize - new size in bytes
Parameters:
  • aStorage (Standard_Address) –
  • aNewSize (Standard_Size) –
Return type:

Standard_Address

thisown

The membership flag

OCC.Standard.standard_Allocate(*args)
  • Allocates memory blocks aSize - bytes to allocate
Parameters:aSize (Standard_Size) –
Return type:Standard_Address
OCC.Standard.standard_Purge()
  • Deallocates the storage retained on the free list and clears the list. Returns non-zero if some memory has been actually freed.
Return type:int
OCC.Standard.standard_Reallocate(*args)
  • Reallocates memory blocks aStorage - previously allocated memory block aNewSize - new size in bytes
Parameters:
  • aStorage (Standard_Address) –
  • aNewSize (Standard_Size) –
Return type:

Standard_Address