OCC.CDF module

class CDF_Application(*args, **kwargs)

Bases: OCC.CDM.CDM_Application

CanClose()
Parameters:aDocument (Handle_CDM_Document &) –
Return type:CDM_CanCloseStatus
CanRetrieve()
Parameters:
  • aFolder (TCollection_ExtendedString &) –
  • aName (TCollection_ExtendedString &) –
  • aFolder
  • aName
  • aVersion (TCollection_ExtendedString &) –
Return type:

PCDM_ReaderStatus

Return type:

PCDM_ReaderStatus

Close()
  • removes the document of the current session directory and closes the document;
Parameters:aDocument (Handle_CDM_Document &) –
Return type:None
DefaultExtension()
Return type:Standard_ExtString
DefaultFolder()
Return type:Standard_ExtString
FindReader()
Parameters:aFileName (TCollection_ExtendedString &) –
Return type:bool
FindReaderFromFormat()
Parameters:aFormat (TCollection_ExtendedString &) –
Return type:bool
Format()
  • try to retrieve a Format directly in the file or in application resource by using extension. returns True if found;
Parameters:
  • aFileName (TCollection_ExtendedString &) –
  • theFormat (TCollection_ExtendedString &) –
Return type:

bool

Formats()
Parameters:Formats (TColStd_SequenceOfExtendedString &) –
Return type:void
GetHandle()
GetRetrieveStatus()
  • Checks status after Retrieve
Return type:PCDM_ReaderStatus
static Load(*args) → OCC.CDF.Handle_CDF_Application
  • plugs an application. //! Open is used - for opening a Document that has been created in an application - for opening a Document from the database - for opening a Document from a file. The Open methods always add the document in the session directory and calls the virtual Activate method. The document is considered to be opened until Close is used. To be storable, a document must be opened by an application since the application resources are needed to store it.
Parameters:aGUID (Standard_GUID &) –
Return type:Handle_CDF_Application
Open()
  • puts the document in the current session directory and calls the virtual method Activate on it.
Parameters:aDocument (Handle_CDM_Document &) –
Return type:None
Reader()
Parameters:aFileName (TCollection_ExtendedString &) –
Return type:Handle_PCDM_Reader
ReaderFromFormat()
Parameters:aFormat (TCollection_ExtendedString &) –
Return type:Handle_PCDM_Reader
Retrieve()
  • This method retrieves a document from the database. If the Document references other documents which have been updated, the latest version of these documents will be used if {UseStorageConfiguration} is Standard_True. The content of {aFolder}, {aName} and {aVersion} depends on the Database Manager system. If the DBMS is only based on the OS, {aFolder} is a directory and {aName} is the name of a file. In this case the use of the syntax with {aVersion} has no sense. For example: //! Handle_CDM_Document theDocument=myApplication->Retrieve(‘/home/cascade’,’box.dsg’); If the DBMS is EUCLID/Design Manager, {aFolder}, {aName} have the form they have in EUCLID/Design Manager. For example: //! Handle_CDM_Document theDocument=myApplication->Retrieve(‘|user|cascade’,’box’); //! Since the version is not specified in this syntax, the latest wil be used. A link is kept with the database through an instance of CDM_MetaData
Parameters:
  • aFolder (TCollection_ExtendedString &) –
  • aName (TCollection_ExtendedString &) –
  • UseStorageConfiguration (bool) – default value is Standard_True
Return type:

Handle_CDM_Document

  • This method retrieves a document from the database. If the Document references other documents which have been updated, the latest version of these documents will be used if {UseStorageConfiguration} is Standard_True. – If the DBMS is only based on the OS, this syntax should not be used. //! If the DBMS is EUCLID/Design Manager, {aFolder}, {aName} and {aVersion} have the form they have in EUCLID/Design Manager. For example: //! Handle_CDM_Document theDocument=myApplication->Retrieve(‘|user|cascade’,’box’,‘2’); A link is kept with the database through an instance of CDM_MetaData
Parameters:
  • aFolder (TCollection_ExtendedString &) –
  • aName (TCollection_ExtendedString &) –
  • aVersion (TCollection_ExtendedString &) –
  • UseStorageConfiguration (bool) – default value is Standard_True
Return type:

Handle_CDM_Document

SetDefaultFolder()
Parameters:aFolder (Standard_ExtString) –
Return type:bool
thisown

The membership flag

CDF_Application_Load(*args) → OCC.CDF.Handle_CDF_Application
  • plugs an application. //! Open is used - for opening a Document that has been created in an application - for opening a Document from the database - for opening a Document from a file. The Open methods always add the document in the session directory and calls the virtual Activate method. The document is considered to be opened until Close is used. To be storable, a document must be opened by an application since the application resources are needed to store it.
Parameters:aGUID (Standard_GUID &) –
Return type:Handle_CDF_Application
class CDF_Directory(*args)

Bases: OCC.Standard.Standard_Transient

  • Creates an empty directory.
Return type:None
Add()
  • adds a document into the directory.
Parameters:aDocument (Handle_CDM_Document &) –
Return type:None
Contains()
  • Returns true if the document aDocument is in the directory
Parameters:aDocument (Handle_CDM_Document &) –
Return type:bool
GetHandle()
IsEmpty()
  • returns true if the directory is empty.
Return type:bool
Last()
  • returns the last document (if any) which has been added in the directory.
Return type:Handle_CDM_Document
Length()
  • returns the number of documents of the directory.
Return type:int
Remove()
  • removes the document.
Parameters:aDocument (Handle_CDM_Document &) –
Return type:None
thisown

The membership flag

class CDF_DirectoryIterator(*args)

Bases: object

  • creates an Iterator with the directory of the current CDF.
Return type:None
Parameters:aDirectory (Handle_CDF_Directory &) –
Return type:None
Document()
  • Returns item value of current entry
Return type:Handle_CDM_Document
MoreDocument()
  • Returns True if there are more entries to return
Return type:bool
NextDocument()
  • Go to the next entry (if there is not, Value will raise an exception)
Return type:None
thisown

The membership flag

class CDF_FWOSDriver(*args)

Bases: OCC.CDF.CDF_MetaDataDriver

  • initializes the MetaDatadriver with its specific name.
Return type:None
GetHandle()
thisown

The membership flag

class CDF_MetaDataDriver(*args, **kwargs)

Bases: OCC.Standard.Standard_Transient

BuildFileName()
Parameters:aDocument (Handle_CDM_Document &) –
Return type:TCollection_ExtendedString
CreateDependsOn()
  • Creates a ‘Depends On’ relation between two Datas. By default does nothing
Parameters:
  • aFirstData (Handle_CDM_MetaData &) –
  • aSecondData (Handle_CDM_MetaData &) –
Return type:

void

CreateMetaData()
  • should create meta-data corresponding to aData and maintaining a meta-link between these meta-data and aFileName CreateMetaData is called by CreateData If the metadata-driver has version capabilities, version must be set in the returned Data.
Parameters:
  • aDocument (Handle_CDM_Document &) –
  • aFileName (TCollection_ExtendedString &) –
Return type:

Handle_CDM_MetaData

CreateReference()
Parameters:
  • aFrom (Handle_CDM_MetaData &) –
  • aTo (Handle_CDM_MetaData &) –
  • aReferenceIdentifier (int) –
  • aToDocumentVersion (int) –
Return type:

void

DefaultFolder()
Return type:TCollection_ExtendedString
Find()
  • should indicate whether meta-data exist in the DBMS corresponding to the Data. aVersion may be NULL;
Parameters:
  • aFolder (TCollection_ExtendedString &) –
  • aName (TCollection_ExtendedString &) –
  • aVersion (TCollection_ExtendedString &) –
Return type:

bool

  • calls Find with an empty version
Parameters:
  • aFolder (TCollection_ExtendedString &) –
  • aName (TCollection_ExtendedString &) –
Return type:

bool

FindFolder()
Parameters:aFolder (TCollection_ExtendedString &) –
Return type:bool
GetHandle()
HasReadPermission()
Parameters:
  • aFolder (TCollection_ExtendedString &) –
  • aName (TCollection_ExtendedString &) –
  • aVersion (TCollection_ExtendedString &) –
Return type:

bool

HasVersion()
  • by default return Standard_True.
Parameters:
  • aFolder (TCollection_ExtendedString &) –
  • aName (TCollection_ExtendedString &) –
Return type:

bool

HasVersionCapability()
  • returns true if the MetaDataDriver can manage different versions of a Data. By default, returns Standard_False.
Return type:bool
LastVersion()
  • by default returns aMetaDATA should return the MetaData stored in the DBMS with the meta-data corresponding to the path. If the MetaDataDriver has version management capabilities the version has to be set in the returned MetaData. MetaData is called by GetMetaData If the version is not included in the path , MetaData should return the last version of the metadata is deferred;
Parameters:aMetaData (Handle_CDM_MetaData &) –
Return type:Handle_CDM_MetaData
MetaData()
  • should return the MetaData stored in the DBMS with the meta-data corresponding to the Data. If the MetaDataDriver has version management capabilities the version has to be set in the returned MetaData. aVersion may be NULL MetaData is called by GetMetaData If the version is set to NULL, MetaData should return the last version of the metadata
Parameters:
  • aFolder (TCollection_ExtendedString &) –
  • aName (TCollection_ExtendedString &) –
  • aVersion (TCollection_ExtendedString &) –
Return type:

Handle_CDM_MetaData

  • calls MetaData with an empty version
Parameters:
  • aFolder (TCollection_ExtendedString &) –
  • aName (TCollection_ExtendedString &) –
Return type:

Handle_CDM_MetaData

ReferenceIterator()
Return type:Handle_PCDM_ReferenceIterator
SetName()
  • this methods is usefull if the name of an object – depends on the metadatadriver. For example a Driver – based on the operating system can choose to add the extension of file to create to the object.
Parameters:
  • aDocument (Handle_CDM_Document &) –
  • aName (TCollection_ExtendedString &) –
Return type:

TCollection_ExtendedString

thisown

The membership flag

class CDF_MetaDataDriverFactory(*args, **kwargs)

Bases: OCC.Standard.Standard_Transient

Build()
Return type:Handle_CDF_MetaDataDriver
GetHandle()
thisown

The membership flag

class CDF_Session(*args)

Bases: OCC.Standard.Standard_Transient

Return type:None
CurrentApplication()
Return type:Handle_CDF_Application
static CurrentSession(*args) → OCC.CDF.Handle_CDF_Session
  • returns the only one instance of Session that has been created.
Return type:Handle_CDF_Session
Directory()
  • returns the directory of the session;
Return type:Handle_CDF_Directory
static Exists()
  • returns true if a session has been created.
Return type:bool
GetHandle()
HasCurrentApplication()
Return type:bool
LoadDriver()
Return type:None
MetaDataDriver()
Return type:Handle_CDF_MetaDataDriver
SetCurrentApplication()
Parameters:anApplication (Handle_CDF_Application &) –
Return type:None
UnsetCurrentApplication()
Return type:None
thisown

The membership flag

CDF_Session_CurrentSession(*args) → OCC.CDF.Handle_CDF_Session
  • returns the only one instance of Session that has been created.
Return type:Handle_CDF_Session
CDF_Session_Exists()
  • returns true if a session has been created.
Return type:bool
class CDF_Store(*args)

Bases: object

  • creates a store list from the document of the current selection.
Parameters:aDocument (Handle_CDM_Document &) –
Return type:None
AssociatedStatusText()
Return type:Standard_ExtString
Check()
  • Checks will make the following control. Check must be used before using Create method. Check will not be done twice by Create. //! 1) controls whether there is one document in the current selection. 2) controls whether there is a storage driver for the document. 3) controls whether the applicationdatatype associated with the driver exists as metadata in the metadata manager (Design Manager for example). 4) controls whether there is a storage driver for each subcomponents of the document if there are. If the control fails for a subcomponent, the control stops and name and type of this subcomponent can be get with LastName method 5) controls whether the applicationdatatype associated with the driver of each subcomponent exists as metadata in the metadata manager (Design Manager for example). If the control fails for a subcomponent, the control stops and name and type of this subcomponent can be get with LastName method
Return type:CDF_TryStoreStatus
Comment()
Return type:Standard_ExtString
Component()
  • Returns item value of current entry
Return type:Standard_ExtString
CurrentIsConsistent()
Return type:bool
Description()
  • returns the description of the format of the main object.
Return type:Standard_ExtString
Folder()
  • returns the folder in which the current document will be stored.
Return type:Standard_ExtString
HasAPreviousVersion()
Return type:bool
HasSubComponents()
Return type:bool
InitComponent()
  • Allows to Start a new Iteration from beginning
Return type:None
IsConsistent()
Return type:bool
IsMainDocument()
  • returns true if the currentdocument is the main one, ie the document of the current selection.
Return type:bool
IsModified()
Return type:bool
IsStored()
  • returns true if the current document is already stored
Return type:bool
LastName()
  • in the case of a subcomponent for which no storage driver exists, returns the name of the subcomponent if there is one.
Return type:Standard_ExtString
MetaDataPath()
  • returns the path of the previous store is the object is already stored, otherwise an empty string;
Return type:Standard_ExtString
MoreComponent()
  • Returns True if there are more entries to return
Return type:bool
Name()
  • returns the name under which the current document will be stored
Return type:Standard_ExtString
NextComponent()
  • Go to the next entry (if there is not, Value will raise an exception)
Return type:None
Path()
  • returns the complete path of the created meta-data.
Return type:Standard_ExtString
PreviousVersion()
Return type:Standard_ExtString
Realize()
Return type:None
RecheckName()
  • defines the name under which the document should be stored. uses for example after modification of the folder.
Return type:CDF_StoreSetNameStatus
SetComment()
Parameters:aComment (Standard_ExtString) –
Return type:None
SetCurrent()
Return type:None
Parameters:aPresentation (Standard_ExtString) –
Return type:None
SetFolder()
  • defines the folder in which the document should be stored. returns Standard_True if the Folder exists, Standard_False otherwise.
Parameters:aFolder (TCollection_ExtendedString &) –
Return type:bool
  • defines the folder in which the document should be stored. returns Standard_True if the Folder exists, Standard_False otherwise.
Parameters:aFolder (Standard_ExtString) –
Return type:bool
SetMain()
  • the two following methods can be used just after Realize or Import – method to know if thes methods worked correctly, and if not why.
Return type:None
SetName()
  • defines the name under which the document should be stored.
Parameters:aName (Standard_ExtString) –
Return type:CDF_StoreSetNameStatus
  • defines the name under which the document should be stored.
Parameters:aName (TCollection_ExtendedString &) –
Return type:CDF_StoreSetNameStatus
SetPreviousVersion()
Parameters:aPreviousVersion (Standard_ExtString) –
Return type:bool
StoreStatus()
Return type:PCDM_StoreStatus
SubComponentStatus()
Parameters:aPresentation (Standard_ExtString) –
Return type:CDF_SubComponentStatus
thisown

The membership flag

class CDF_StoreList(*args)

Bases: OCC.Standard.Standard_Transient

Parameters:aDocument (Handle_CDM_Document &) –
Return type:None
GetHandle()
Init()
Return type:None
IsConsistent()
Return type:bool
More()
Return type:bool
Next()
Return type:None
Store()
  • stores each object of the storelist in the reverse order of which they had been added.
Parameters:
  • aMetaData (Handle_CDM_MetaData &) –
  • aStatusAssociatedText (TCollection_ExtendedString &) –
Return type:

PCDM_StoreStatus

Value()
Return type:Handle_CDM_Document
thisown

The membership flag

class CDF_Timer(*args)

Bases: object

Return type:None
MustShow()
Return type:bool
ShowAndRestart()
Parameters:aMessage (char *) –
Return type:None
ShowAndStop()
Parameters:aMessage (char *) –
Return type:None
thisown

The membership flag

class Handle_CDF_Application(*args)

Bases: OCC.CDM.Handle_CDM_Application

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

The membership flag

class Handle_CDF_Directory(*args)

Bases: OCC.Standard.Handle_Standard_Transient

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

The membership flag

class Handle_CDF_FWOSDriver(*args)

Bases: OCC.CDF.Handle_CDF_MetaDataDriver

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

The membership flag

class Handle_CDF_MetaDataDriver(*args)

Bases: OCC.Standard.Handle_Standard_Transient

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

The membership flag

class Handle_CDF_MetaDataDriverFactory(*args)

Bases: OCC.Standard.Handle_Standard_Transient

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

The membership flag

class Handle_CDF_Session(*args)

Bases: OCC.Standard.Handle_Standard_Transient

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

The membership flag

class Handle_CDF_StoreList(*args)

Bases: OCC.Standard.Handle_Standard_Transient

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 cdf

Bases: object

static GetLicense()
Parameters:anApplicationIdentifier (int) –
Return type:void
static IsAvailable()
Parameters:anApplicationIdentifier (int) –
Return type:bool
thisown

The membership flag

cdf_GetLicense()
Parameters:anApplicationIdentifier (int) –
Return type:void
cdf_IsAvailable()
Parameters:anApplicationIdentifier (int) –
Return type:bool
new_instancemethod(func, inst, cls)
register_handle(handle, base_object)

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