OCC.Core.CDM module¶
CDM module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_cdm.html
-
class
CDM_Application
(*args, **kwargs)¶ Bases:
OCC.Core.Standard.Standard_Transient
Empty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
BeginOfUpdate
()¶ - this method is called before the update of a document. By default, writes in MessageDriver().
- param aDocument
- type aDocument
CDM_Document
- rtype
void
-
static
DownCast
(t)¶
-
EndOfUpdate
()¶ - this method is called affter the update of a document. By default, writes in MessageDriver().
- param aDocument
- type aDocument
CDM_Document
- param theStatus
- type theStatus
bool
- param ErrorString
- type ErrorString
TCollection_ExtendedString
- rtype
void
-
MessageDriver
()¶ - Returns default messenger;
- rtype
opencascade::handle<Message_Messenger>
-
Name
()¶ - Returns the application name.
- rtype
TCollection_ExtendedString
-
Resources
()¶ - The manager returned by this virtual method will be used to search for Format.Retrieval resource items.
- rtype
opencascade::handle<Resource_Manager>
-
Version
()¶ - Returns the application version.
- rtype
TCollection_AsciiString
-
Write
()¶ - writes the string in the application MessagerDriver.
- param aString
- type aString
Standard_ExtString
- rtype
None
-
property
thisown
¶ The membership flag
-
class
CDM_Document
(*args, **kwargs)¶ Bases:
OCC.Core.Standard.Standard_Transient
Empty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
AddComment
()¶ - appends a comment into comments of this document.
- param aComment
- type aComment
TCollection_ExtendedString
- rtype
None
-
Application
()¶ - Return type
opencascade::handle<CDM_Application>
-
CanClose
()¶ - Return type
CDM_CanCloseStatus
-
CanCloseReference
()¶ - A referenced document may indicate through this virtual method that it does not allow the closing of aDocument which it references through the reference aReferenceIdentifier. By default returns Standard_True;;
- param aDocument
- type aDocument
CDM_Document
- param aReferenceIdentifier
- type aReferenceIdentifier
int
- rtype
bool
-
ChangeStorageFormatVersion
()¶ - Sets <theVersion> of the format to be used to store the document
- param theVersion
- type theVersion
int
- rtype
None
-
CloseReference
()¶ - A referenced document may update its internal data structure when {aDocument} which it references through the reference {aReferenceIdentifier} is being closed. By default this method does nothing.
- param aDocument
- type aDocument
CDM_Document
- param aReferenceIdentifier
- type aReferenceIdentifier
int
- rtype
void
-
Comment
()¶ - returns the first of associated comments. By defaut the comment is an empty string.
- rtype
Standard_ExtString
-
Comments
()¶ - returns the associated comments through <aComments>. Returns empty sequence if no comments are associated.
- param aComments
- type aComments
TColStd_SequenceOfExtendedString
- rtype
None
-
CopyReference
()¶ - Copies a reference to this document. This method avoid retrieval of referenced document. The arguments are the original document and a valid reference identifier Returns the local identifier.
- param aFromDocument
- type aFromDocument
CDM_Document
- param aReferenceIdentifier
- type aReferenceIdentifier
int
- rtype
int
-
CreateReference
()¶ - Creates a reference from this document to {anOtherDocument}. Returns a reference identifier. This reference identifier is unique in the document and will not be used for the next references, even after the storing of the document. If there is already a reference between the two documents, the reference is not created, but its reference identifier is returned.
- param anOtherDocument
- type anOtherDocument
CDM_Document
- rtype
int:param aMetaData:
- type aMetaData
CDM_MetaData
- param aReferenceIdentifier
- type aReferenceIdentifier
int
- param anApplication
- type anApplication
CDM_Application
- param aToDocumentVersion
- type aToDocumentVersion
int
- param UseStorageConfiguration
- type UseStorageConfiguration
bool
- rtype
None:param aMetaData:
- type aMetaData
CDM_MetaData
- param anApplication
- type anApplication
CDM_Application
- param aDocumentVersion
- type aDocumentVersion
int
- param UseStorageConfiguration
- type UseStorageConfiguration
bool
- rtype
int
-
DeepReferences
()¶ - returns True is this document references aDocument;
- param aDocument
- type aDocument
CDM_Document
- rtype
bool
-
Description
()¶ - gets the FileFormat.Description resource.
- rtype
TCollection_ExtendedString
-
Document
()¶ - Returns the To Document of the reference identified by aReferenceIdentifier. If the ToDocument is stored and has not yet been retrieved, this method will retrieve it.
- param aReferenceIdentifier
- type aReferenceIdentifier
int
- rtype
opencascade::handle<CDM_Document>
-
static
DownCast
(t)¶
-
Extensions
()¶ - by default empties the extensions.
- param Extensions
- type Extensions
TColStd_SequenceOfExtendedString
- rtype
void
-
FileExtension
()¶ - gets the Desktop.Domain.Application.`FileFormat`.FileExtension resource.
- rtype
TCollection_ExtendedString
-
static
FindFromPresentation
()¶ - returns the document having the given alphanumeric presentation.
- param aPresentation
- type aPresentation
TCollection_ExtendedString
- rtype
opencascade::handle<CDM_Document>
-
static
FindPresentation
()¶ - indicates whether a document having the given presentation does exist.
- param aPresentation
- type aPresentation
TCollection_ExtendedString
- rtype
bool
-
Folder
()¶ - Return type
-
FromReferencesNumber
()¶ - returns the number of references having this document as To Document.
- rtype
int
-
GetAlternativeDocument
()¶ - This method can be redefined to extract another document in a different format. For example, to extract a Shape from an applicative document.
- param aFormat
- type aFormat
TCollection_ExtendedString
- param anAlternativeDocument
- type anAlternativeDocument
CDM_Document
- rtype
bool
-
IsInSession
()¶ - returns True if the To Document of the reference identified by aReferenceIdentifier is in session, False if it corresponds to a not yet retrieved document.
- param aReferenceIdentifier
- type aReferenceIdentifier
int
- rtype
bool
-
IsModified
()¶ - returns true if the version is greater than the storage version
- rtype
bool
-
IsOpened
()¶ - Return type
bool* returns true if the document corresponding to the given reference has been retrieved and opened. Otherwise returns false. This method does not retrieve the referenced document :param aReferenceIdentifier: :type aReferenceIdentifier: int :rtype: bool
-
IsReadOnly
()¶ - indicates that this document cannot be modified.
- rtype
bool* indicates that the referenced document cannot be modified,
- param aReferenceIdentifier
- type aReferenceIdentifier
int
- rtype
bool
-
IsStored
()¶ - returns True if the To Document of the reference identified by aReferenceIdentifier has already been stored, False otherwise.
- param aReferenceIdentifier
- type aReferenceIdentifier
int
- rtype
bool:rtype: bool
-
IsUpToDate
()¶ - returns true if the modification counter found in the given reference is equal to the actual modification counter of the To Document. This method is able to deal with a reference to a not retrieved document.
- param aReferenceIdentifier
- type aReferenceIdentifier
int
- rtype
bool
-
LoadResources
()¶ - read (or rereads) the following resource.
- rtype
None
-
MetaData
()¶ - Return type
opencascade::handle<CDM_MetaData>
-
Modifications
()¶ - returns the current modification counter.
- rtype
int
-
Modify
()¶ - Indicates that this document has been modified. This method increments the modification counter.
- rtype
None
-
Name
()¶ - returns the name of the metadata of the To Document of the reference identified by aReferenceIdentifier.
- param aReferenceIdentifier
- type aReferenceIdentifier
int
- rtype
TCollection_ExtendedString
-
Open
()¶ - Parameters
anApplication –
- type anApplication
CDM_Application
- rtype
None
-
Presentation
()¶ - Returns an alphanumeric string identifying this document in a unique manner in the current process. The presentation may change when the document is stored. Tries to get the ‘FileFormat`.Presentation resource This item is used to give a default presentation to the document.
- rtype
Standard_ExtString
-
PrintToString
(CDM_Document self) → std::string¶
-
Reference
()¶ - Parameters
aReferenceIdentifier –
- type aReferenceIdentifier
int
- rtype
opencascade::handle<CDM_Reference>
-
RemoveAllReferences
()¶ - Removes all references having this document for From Document.
- rtype
None
-
RemoveReference
()¶ - Removes the reference between the From Document and the To Document identified by a reference identifier.
- param aReferenceIdentifier
- type aReferenceIdentifier
int
- rtype
None
-
RequestedComment
()¶ - Return type
-
RequestedFolder
()¶ - Return type
-
RequestedName
()¶ - determines under which the document is going to be store. By default the name of the document wil be – used. If the document has no name its presentation will be used.
- rtype
TCollection_ExtendedString
-
RequestedPreviousVersion
()¶ - Return type
-
SetComment
()¶ - associates a comment with this document.
- param aComment
- type aComment
TCollection_ExtendedString
- rtype
None
-
SetComments
()¶ - associates a comments with this document.
- param aComments
- type aComments
TColStd_SequenceOfExtendedString
- rtype
None
-
SetIsUpToDate
()¶ - Resets the modification counter in the given reference to the actual modification counter of its To Document. This method should be called after the application has updated this document.
- param aReferenceIdentifier
- type aReferenceIdentifier
int
- rtype
None
-
SetMetaData
()¶ - associates database information to a document which has been stored. The name of the document is now the name which has beenused to store the data.
- param aMetaData
- type aMetaData
CDM_MetaData
- rtype
None
-
SetModifications
()¶ - Parameters
Modifications –
- type Modifications
int
- rtype
None
-
SetReferenceCounter
()¶ - Parameters
aReferenceCounter –
- type aReferenceCounter
int
- rtype
None
-
SetRequestedComment
()¶ - defines the Comment with which the object should be stored.
- param aComment
- type aComment
TCollection_ExtendedString
- rtype
None
-
SetRequestedFolder
()¶ - defines the folder in which the object should be stored.
- param aFolder
- type aFolder
TCollection_ExtendedString
- rtype
None
-
SetRequestedName
()¶ - defines the name under which the object should be stored.
- param aName
- type aName
TCollection_ExtendedString
- rtype
None
-
SetRequestedPreviousVersion
()¶ - Parameters
aPreviousVersion –
- type aPreviousVersion
TCollection_ExtendedString
- rtype
None
-
ShallowReferences
()¶ - returns True is this document references aDocument;
- param aDocument
- type aDocument
CDM_Document
- rtype
bool
-
StorageFormat
()¶ - The Storage Format is the key which is used to determine in the application resources the storage driver plugin, the file extension and other data used to store the document.
- rtype
TCollection_ExtendedString
-
StorageFormatVersion
()¶ - Returns version of the format to be used to store the document
- rtype
int
-
StorageVersion
()¶ - returns the value of the modification counter at the time of storage. By default returns 0.
- rtype
int
-
ToReferencesNumber
()¶ - returns the number of references having this document as From Document.
- rtype
int
-
Update
()¶ - The Update method will be called once for each reference, but it should not perform any computation, to avoid multiple computation of a same document.
- param aToDocument
- type aToDocument
CDM_Document
- param aReferenceIdentifier
- type aReferenceIdentifier
int
- param aModifContext
- type aModifContext
Standard_Address
- rtype
void* This method Update will be called to signal the end of the modified references list. The document should be recomputed and UpdateFromDocuments should be called. Update should returns True in case of success, false otherwise. In case of Failure, additional information can be given in ErrorString.
- param ErrorString
- type ErrorString
TCollection_ExtendedString
- rtype
bool* the following method should be used instead: //! Update(me:mutable; ErrorString: out ExtendedString from TCollection) returns Boolean from Standard
- rtype
void
-
UpdateFromDocuments
()¶ - call virtual method Update on all referencing documents. This method keeps the list of the – documents to process.It may be the starting of an update – cycle. If not, the reentrant calls made by Update method (without argument) will append the referencing documents to the list and call the Update method (with arguments). Only the first call to UpdateFromDocuments generate call to Update().
- param aModifContext
- type aModifContext
Standard_Address
- rtype
None
-
property
thisown
¶ The membership flag
-
class
CDM_DocumentHasher
¶ Bases:
object
-
static
HashCode
()¶
-
static
IsEqual
()¶
-
property
thisown
¶ The membership flag
-
static
-
class
CDM_ListIteratorOfListOfDocument
(*args)¶ Bases:
object
-
ChangeValue
()¶
-
More
()¶
-
Next
()¶
-
Value
()¶
-
property
thisown
¶ The membership flag
-
-
class
CDM_ListIteratorOfListOfReferences
(*args)¶ Bases:
object
-
ChangeValue
()¶
-
More
()¶
-
Next
()¶
-
Value
()¶
-
property
thisown
¶ The membership flag
-
-
class
CDM_ListOfDocument
(*args)¶ Bases:
object
-
Append
()¶
-
Assign
()¶
-
Clear
()¶
-
First
()¶
-
InsertAfter
()¶
-
InsertBefore
()¶
-
Last
()¶
-
Prepend
()¶
-
Remove
()¶
-
RemoveFirst
()¶
-
Reverse
()¶
-
Set
()¶
-
Size
()¶
-
begin
()¶
-
cbegin
()¶
-
cend
()¶
-
end
()¶
-
property
thisown
¶ The membership flag
-
-
class
CDM_ListOfReferences
(*args)¶ Bases:
object
-
Append
()¶
-
Assign
()¶
-
Clear
()¶
-
First
()¶
-
InsertAfter
()¶
-
InsertBefore
()¶
-
Last
()¶
-
Prepend
()¶
-
Remove
()¶
-
RemoveFirst
()¶
-
Reverse
()¶
-
Set
()¶
-
Size
()¶
-
begin
()¶
-
cbegin
()¶
-
cend
()¶
-
end
()¶
-
property
thisown
¶ The membership flag
-
-
class
CDM_MapOfDocument
(*args)¶ Bases:
object
-
Add
()¶
-
Added
()¶
-
Assign
()¶
-
Clear
()¶
-
Contains
()¶
-
Differ
()¶
-
Difference
()¶
-
Exchange
()¶
-
HasIntersection
()¶
-
Intersect
()¶
-
Intersection
()¶
-
IsEqual
()¶
-
ReSize
()¶
-
Remove
()¶
-
Set
()¶
-
Size
()¶
-
Subtract
()¶
-
Subtraction
()¶
-
Union
()¶
-
Unite
()¶
-
cbegin
()¶
-
cend
()¶
-
property
thisown
¶ The membership flag
-
-
class
CDM_MetaData
(*args, **kwargs)¶ Bases:
OCC.Core.Standard.Standard_Transient
Empty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
Document
()¶ - Return type
opencascade::handle<CDM_Document>
-
static
DownCast
(t)¶
-
FileName
()¶ - Return type
-
Folder
()¶ - returns the folder in which the meta-data has to be created or has to be found.
- rtype
TCollection_ExtendedString
-
HasVersion
()¶ - indicates that the version has to be taken into account when searching the corresponding meta-data.
- rtype
bool
-
static
LookUp
()¶ - Parameters
aFolder –
- type aFolder
TCollection_ExtendedString
- param aName
- type aName
TCollection_ExtendedString
- param aPath
- type aPath
TCollection_ExtendedString
- param aFileName
- type aFileName
TCollection_ExtendedString
- param ReadOnly
- type ReadOnly
bool
- rtype
opencascade::handle<CDM_MetaData>:param aFolder:
- type aFolder
TCollection_ExtendedString
- param aName
- type aName
TCollection_ExtendedString
- param aPath
- type aPath
TCollection_ExtendedString
- param aVersion
- type aVersion
TCollection_ExtendedString
- param aFileName
- type aFileName
TCollection_ExtendedString
- param ReadOnly
- type ReadOnly
bool
- rtype
opencascade::handle<CDM_MetaData>
-
Name
()¶ - returns the name under which the meta-data has to be created or has to be found.
- rtype
TCollection_ExtendedString
-
Path
()¶ - Return type
-
PrintToString
(CDM_MetaData self) → std::string¶
-
Version
()¶ - returns the version under which the meta-data has to be found. Warning: raises NoSuchObject from Standard if no Version has been defined
- rtype
TCollection_ExtendedString
-
property
thisown
¶ The membership flag
-
class
CDM_MetaDataLookUpTable
(*args)¶ Bases:
object
-
Assign
()¶
-
Bind
()¶
-
Bound
()¶
-
ChangeFind
()¶
-
ChangeSeek
()¶
-
Clear
()¶
-
Exchange
()¶
-
Find
()¶
-
IsBound
()¶
-
ReSize
()¶
-
Seek
()¶
-
Set
()¶
-
Size
()¶
-
UnBind
()¶
-
begin
()¶
-
cbegin
()¶
-
cend
()¶
-
end
()¶
-
property
thisown
¶ The membership flag
-
-
class
CDM_PresentationDirectory
(*args)¶ Bases:
object
-
Assign
()¶
-
Bind
()¶
-
Bound
()¶
-
ChangeFind
()¶
-
ChangeSeek
()¶
-
Clear
()¶
-
Exchange
()¶
-
Find
()¶
-
IsBound
()¶
-
ReSize
()¶
-
Seek
()¶
-
Set
()¶
-
Size
()¶
-
UnBind
()¶
-
begin
()¶
-
cbegin
()¶
-
cend
()¶
-
end
()¶
-
property
thisown
¶ The membership flag
-
-
class
CDM_Reference
(*args, **kwargs)¶ Bases:
OCC.Core.Standard.Standard_Transient
Empty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
static
DownCast
(t)¶
-
FromDocument
()¶ - Return type
opencascade::handle<CDM_Document>
-
ToDocument
()¶ - Return type
opencascade::handle<CDM_Document>
-
property
thisown
¶ The membership flag