This repository has been archived by the owner on Mar 4, 2023. It is now read-only.
/
DisplayGroup.py
150 lines (119 loc) · 4.46 KB
/
DisplayGroup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
from abaqusConstants import *
from .Leaf import Leaf
class DisplayGroup:
"""DisplayGroup objects are used to select a subset of the entities displayed in the
viewport.
Attributes
----------
canUndo: Boolean
A Boolean specifying whether Undo is possible or not.
canRedo: Boolean
A Boolean specifying whether Redo is possible or not.
name: str
A String specifying the repository key.
module: SymbolicConstant
A SymbolicConstant specifying the module in which the display group has been created.
The possible values are PART, ASSEMBLY, PART_ASSEMBLY, ODB, and ALL.
modelName: str
A String specifying the name of the model to which the display group belongs when the
module is part- or assembly-based.
partName: str
A String specifying the name of the part to which the display group belongs when the
module is part-based.
Notes
-----
This object can be accessed by:
.. code-block:: python
session.displayGroups[name]
import assembly
session.viewports[name].assemblyDisplay.displayGroup
session.viewports[name].layers[name].assemblyDisplay.displayGroup
import visualization
session.viewports[name].layers[name].odbDisplay.displayGroup
import part
session.viewports[name].layers[name].partDisplay.displayGroup
session.viewports[name].odbDisplay.displayGroup
session.viewports[name].partDisplay.displayGroup
"""
# A Boolean specifying whether Undo is possible or not.
canUndo: Boolean = OFF
# A Boolean specifying whether Redo is possible or not.
canRedo: Boolean = OFF
# A String specifying the repository key.
name: str = ""
# A SymbolicConstant specifying the module in which the display group has been created.
# The possible values are PART, ASSEMBLY, PART_ASSEMBLY, ODB, and ALL.
module: SymbolicConstant = None
# A String specifying the name of the model to which the display group belongs when the
# module is part- or assembly-based.
modelName: str = ""
# A String specifying the name of the part to which the display group belongs when the
# module is part-based.
partName: str = ""
def __init__(self, name: str, leaf: Leaf):
"""This method creates a DisplayGroup object.
Notes
-----
This function can be accessed by:
.. code-block:: python
session.DisplayGroup
Parameters
----------
name
A String specifying the repository key.
leaf
A Leaf object specifying the items in the display group.
Returns
-------
A DisplayGroup object.
"""
pass
def add(self, leaf: Leaf):
"""This method adds the specified items to the display group.
Parameters
----------
leaf
A Leaf object specifying the items to add to the display group.
"""
pass
def either(self, leaf: Leaf):
"""This method redefines the display group to be only those items that are not shared by
the *leaf* argument and by the display group.
Parameters
----------
leaf
A Leaf object specifying the items to be excluded from the display group.
"""
pass
def intersect(self, leaf: Leaf):
"""This method redefines the display group to be only those items that are shared by the
*leaf* argument and the display group.
Parameters
----------
leaf
A Leaf object specifying the items to be included in the display group.
"""
pass
def redoLast(self):
"""This method redoes the last undone operation on the display group."""
pass
def remove(self, leaf: Leaf):
"""This method removes the specified items from the display group.
Parameters
----------
leaf
A Leaf object specifying the items to remove from the display group.
"""
pass
def replace(self, leaf: Leaf):
"""This method replaces the contents of the display group with the specified items.
Parameters
----------
leaf
A Leaf object specifying the items with which to replace the current display group
contents.
"""
pass
def undoLast(self):
"""This method undoes the last operation performed on the display group."""
pass