OCC.Core.XCAFPrs module¶
XCAFPrs module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_xcafprs.html
-
class
SwigPyIterator
(*args, **kwargs)¶ Bases:
object
-
advance
()¶
-
copy
()¶
-
decr
()¶
-
distance
()¶
-
equal
()¶
-
incr
()¶
-
next
()¶
-
previous
()¶
-
property
thisown
¶ The membership flag
-
value
()¶
-
-
class
XCAFPrs_AISObject
(*args)¶ Bases:
OCC.Core.AIS.AIS_ColoredShape
- Creates an object to visualise the shape label.
- param theLabel
- type theLabel
TDF_Label
- rtype
None
-
DispatchStyles
()¶ - Fetch the Shape from associated Label and fill the map of sub-shapes styles. By default, this method is called implicitly within first ::Compute(). Application might call this method explicitly to manipulate styles afterwards. @param theToSyncStyles flag indicating if method ::Compute() should call this method again on first compute or re-compute
- param theToSyncStyles
default value is Standard_False
- type theToSyncStyles
bool
- rtype
void
-
static
DownCast
(t)¶
-
GetLabel
()¶ - Returns the label which was visualised by this presentation
- rtype
TDF_Label
-
SetLabel
()¶ - Assign the label to this presentation (but does not mark it outdated with SetToUpdate()).
- param theLabel
- type theLabel
TDF_Label
- rtype
None
-
property
thisown
¶ The membership flag
-
class
XCAFPrs_DataMapOfStyleShape
(*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
XCAFPrs_DataMapOfStyleTransient
(*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
XCAFPrs_DocumentExplorer
(*args)¶ Bases:
object
- Empty constructor.
- rtype
None* Constructor for exploring the whole document. @param theDocument document to explore @param theFlags iteration flags @param theDefStyle default style for nodes with undefined style
- param theDocument
- type theDocument
TDocStd_Document
- param theFlags
- type theFlags
int
- param theDefStyle
default value is XCAFPrs_Style()
- type theDefStyle
XCAFPrs_Style
- rtype
None* Constructor for exploring specified list of root shapes in the document. @param theDocument document to explore @param theRoots root labels to explore within specified document @param theFlags iteration flags @param theDefStyle default style for nodes with undefined style
- param theDocument
- type theDocument
TDocStd_Document
- param theRoots
- type theRoots
TDF_LabelSequence
- param theFlags
- type theFlags
int
- param theDefStyle
default value is XCAFPrs_Style()
- type theDefStyle
XCAFPrs_Style
- rtype
None
-
ChangeCurrent
()¶ - Return current position.
- rtype
XCAFPrs_DocumentNode
-
Current
()¶ - Return current position.
- rtype
XCAFPrs_DocumentNode* Return current position within specified assembly depth.
- param theDepth
- type theDepth
int
- rtype
XCAFPrs_DocumentNode
-
CurrentDepth
()¶ - Return depth of the current node in hierarchy, starting from 0. Zero means Root label.
- rtype
int
-
static
DefineChildId
()¶ - @name string identification tools Construct a unique string identifier for the given label. The identifier is a concatenation of label entries (TDF_Tool::Entry() with tailing ‘.’) of hierarchy from parent to child joined via ‘/’ and looking like this: @code 0:1:1:1./0:1:1:1:9./0:1:1:5:7. @endcode This generation scheme also allows finding originating labels using TDF_Tool::Label(). The tailing dot simplifies parent equality check. @param theLabel child label to define id @param theParentId parent string identifier defined by this method
- param theLabel
- type theLabel
TDF_Label
- param theParentId
- type theParentId
TCollection_AsciiString
- rtype
TCollection_AsciiString
-
static
FindLabelFromPathId
()¶ - Find a shape entity based on a text identifier constructed from OCAF labels defining full path. @sa DefineChildId()
- param theDocument
- type theDocument
TDocStd_Document
- param theId
- type theId
TCollection_AsciiString
- param theParentLocation
- type theParentLocation
TopLoc_Location
- param theLocation
- type theLocation
TopLoc_Location
- rtype
TDF_Label* Find a shape entity based on a text identifier constructed from OCAF labels defining full path. @sa DefineChildId()
- param theDocument
- type theDocument
TDocStd_Document
- param theId
- type theId
TCollection_AsciiString
- param theLocation
- type theLocation
TopLoc_Location
- rtype
TDF_Label
-
static
FindShapeFromPathId
()¶ - Find a shape entity based on a text identifier constructed from OCAF labels defining full path. @sa DefineChildId()
- param theDocument
- type theDocument
TDocStd_Document
- param theId
- type theId
TCollection_AsciiString
- rtype
TopoDS_Shape
-
Init
()¶ - Initialize the iterator from a single root shape in the document. @param theDocument document to explore @param theRoot single root label to explore within specified document @param theFlags iteration flags @param theDefStyle default style for nodes with undefined style
- param theDocument
- type theDocument
TDocStd_Document
- param theRoot
- type theRoot
TDF_Label
- param theFlags
- type theFlags
int
- param theDefStyle
default value is XCAFPrs_Style()
- type theDefStyle
XCAFPrs_Style
- rtype
None* Initialize the iterator from the list of root shapes in the document. @param theDocument document to explore @param theRoots root labels to explore within specified document @param theFlags iteration flags @param theDefStyle default style for nodes with undefined style
- param theDocument
- type theDocument
TDocStd_Document
- param theRoots
- type theRoots
TDF_LabelSequence
- param theFlags
- type theFlags
int
- param theDefStyle
default value is XCAFPrs_Style()
- type theDefStyle
XCAFPrs_Style
- rtype
None
-
More
()¶ - Return True if iterator points to the valid node.
- rtype
bool
-
Next
()¶ - Go to the next node.
- rtype
None
-
property
thisown
¶ The membership flag
-
class
XCAFPrs_DocumentIdIterator
(*args)¶ Bases:
object
- Main constructor.
- param thePath
- type thePath
TCollection_AsciiString
- rtype
None
-
More
()¶ - Return True if iterator points to a value.
- rtype
bool
-
Next
()¶ - Find the next value.
- rtype
None
-
Value
()¶ - Return current value.
- rtype
TCollection_AsciiString
-
property
thisown
¶ The membership flag
-
class
XCAFPrs_DocumentNode
(*args)¶ Bases:
object
- //!< flag indicating that this label is assembly
- rtype
None
-
property
ChildIter
¶
-
property
Id
¶
-
property
IsAssembly
¶
-
property
Label
¶
-
property
LocalTrsf
¶
-
property
Location
¶
-
property
RefLabel
¶
-
property
Style
¶
-
property
thisown
¶ The membership flag
-
class
XCAFPrs_Driver
¶ Bases:
OCC.Core.TPrsStd.TPrsStd_Driver
Empty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
static
DownCast
(t)¶
-
static
GetID
()¶ - returns GUID of the driver
- rtype
Standard_GUID
-
property
thisown
¶ The membership flag
-
class
XCAFPrs_IndexedDataMapOfShapeStyle
(*args)¶ Bases:
object
-
Add
()¶
-
Assign
()¶
-
ChangeFromIndex
()¶
-
ChangeFromKey
()¶
-
ChangeSeek
()¶
-
Clear
()¶
-
Contains
()¶
-
Exchange
()¶
-
FindFromIndex
()¶
-
FindFromKey
()¶
-
FindIndex
()¶
-
FindKey
()¶
-
ReSize
()¶
-
RemoveFromIndex
()¶
-
RemoveKey
()¶
-
RemoveLast
()¶
-
Seek
()¶
-
Set
()¶
-
Size
()¶
-
Substitute
()¶
-
Swap
()¶
-
begin
()¶
-
cbegin
()¶
-
cend
()¶
-
end
()¶
-
property
thisown
¶ The membership flag
-
-
class
XCAFPrs_Style
(*args)¶ Bases:
object
- Empty constructor - colors are unset, visibility is True.
- rtype
None
-
DumpJsonToString
(XCAFPrs_Style self, int depth=-1) → std::string¶
-
GetColorCurv
()¶ - Return curve color.
- rtype
Quantity_Color
-
GetColorSurf
()¶ - Return surface color.
- rtype
Quantity_Color
-
GetColorSurfRGBA
()¶ - Return surface color.
- rtype
Quantity_ColorRGBA
-
static
HashCode
()¶ - Computes a hash code for the given set of styling settings, in the range [1, theUpperBound] @param theStyle the set of styling settings which hash code is to be computed @param theUpperBound the upper bound of the range a computing hash code must be within returns a computed hash code, in the range [1, theUpperBound]
- param theStyle
- type theStyle
XCAFPrs_Style
- param theUpperBound
- type theUpperBound
int
- rtype
int
-
static
IsEqual
()¶ - Returns True if styles are the same Methods for using Style as key in maps
- param theOther
- type theOther
XCAFPrs_Style
- rtype
bool* Returns True when the two keys are the same.
- param theS1
- type theS1
XCAFPrs_Style
- param theS2
- type theS2
XCAFPrs_Style
- rtype
bool
-
IsSetColorCurv
()¶ - Return True if curve color has been defined.
- rtype
bool
-
IsSetColorSurf
()¶ - Return True if surface color has been defined.
- rtype
bool
-
IsVisible
()¶ - Manage visibility.
- rtype
bool
-
SetColorCurv
()¶ - Set curve color.
- param col
- type col
Quantity_Color
- rtype
None
-
SetColorSurf
()¶ - Set surface color.
- param theColor
- type theColor
Quantity_Color
- rtype
None* Set surface color.
- param theColor
- type theColor
Quantity_ColorRGBA
- rtype
None
-
SetVisibility
()¶ - Assign visibility.
- param theVisibility
- type theVisibility
bool
- rtype
None
-
UnSetColorCurv
()¶ - Manage curve color setting
- rtype
None
-
UnSetColorSurf
()¶ - Manage surface color setting
- rtype
None
-
property
thisown
¶ The membership flag
-
class
xcafprs
¶ Bases:
object
-
static
CollectStyleSettings
()¶ - Collect styles defined for shape on label L and its components and subshapes and fills a map of shape - style correspondence The location <loc> is for internal use, it should be Null location for external call
- param L
- type L
TDF_Label
- param loc
- type loc
TopLoc_Location
- param settings
- type settings
XCAFPrs_IndexedDataMapOfShapeStyle
- param theLayerColor
default value is Quantity_ColorRGBA(Quantity_NOC_WHITE)
- type theLayerColor
Quantity_ColorRGBA
- rtype
void
-
static
SetViewNameMode
()¶ - Set ViewNameMode for indicate display names or not.
- param viewNameMode
- type viewNameMode
bool
- rtype
void
-
property
thisown
¶ The membership flag
-
static