This repository has been archived by the owner on Mar 4, 2023. It is now read-only.
/
SuperimposeOptions.py
461 lines (414 loc) · 23.4 KB
/
SuperimposeOptions.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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
from abaqusConstants import *
from ..PlotOptions.DGSuperimposeOptions import DGSuperimposeOptions
class SuperimposeOptions(DGSuperimposeOptions):
"""The SuperimposeOptions object stores values and attributes associated with the
undeformed shape when the display contains both the deformed shape and the undeformed
shape. The SuperimposeOptions object has no constructor command. Abaqus creates a
*defaultOdbDisplay.superimposeOptions* member when you import the Visualization module.
Abaqus creates a *superimposeOptions* member when it creates the OdbDisplay object,
using the values from *defaultOdbDisplay.superimposeOptions*. Abaqus creates the
*odbDisplay* member when a viewport is created, using the values from
*defaultOdbDisplay*.
SuperimposeOptions objects are accessed in one of two ways:
- The default superimpose options. These settings are used as defaults when other
*superimposeOptions* members are created. These settings can be set to customize user
preferences.
- The superimpose options associated with a particular viewport.
The SuperimposeOptions object is derived from the DGSuperimposeOptions object.
Attributes
----------
deformedOffsetMode: SymbolicConstant
A SymbolicConstant specifying the offset of the deformed shape from the undeformed
shape. Possible values are NONE, UNIFORM, and NONUNIFORM. The default value is NONE.NONE
specifies that there should be no offset of the deformed shape from the undeformed
shape.
uniformOffset: float
A Float specifying the uniform offset value when **deformedOffsetMode=UNIFORM**. The
default value is 0.0.
nonuniformOffset: float
A tuple of three Floats specifying the offset value in each of the three coordinate
directions when **deformedOffsetMode=NONUNIFORM**. The default value is (0, 0, 0).
renderStyle: SymbolicConstant
A SymbolicConstant specifying the render style of the plot. Possible values are
WIREFRAME, FILLED, HIDDEN, and SHADED. The default value is WIREFRAME.
visibleEdges: SymbolicConstant
A SymbolicConstant specifying which edges to plot. Possible values are ALL, EXTERIOR,
FEATURE, FREE, and NONE. The default value is FEATURE.NONE can be used only when
**renderStyle=SHADED**.
edgeLineStyle: SymbolicConstant
A SymbolicConstant specifying the edge line style. Possible values are SOLID, DASHED,
DOTTED, and DOT_DASH. The default value is SOLID.
edgeLineThickness: SymbolicConstant
A SymbolicConstant specifying the edge line thickness. Possible values are VERY_THIN,
THIN, MEDIUM, and THICK. The default value is VERY_THIN.
colorCodeOverride: Boolean
A Boolean specifying whether to allow color coded items in the output database to
override the edge and fill color settings. The default value is ON.
elemLabels: Boolean
A Boolean specifying whether to plot the element labels. The default value is OFF.
faceLabels: Boolean
A Boolean specifying whether to plot the face labels. The default value is OFF.
nodeLabels: Boolean
A Boolean specifying whether to plot the node labels. The default value is OFF.
nodeSymbols: Boolean
A Boolean specifying whether to plot the node symbols. The default value is OFF.
nodeSymbolType: SymbolicConstant
A SymbolicConstant specifying the node symbol types. Possible values
are:FILLED_CIRCLEFILLED_SQUAREFILLED_DIAMONDFILLED_TRIHOLLOW_CIRCLEHOLLOW_SQUAREHOLLOW_DIAMONDHOLLOW_TRICROSSXMARKERThe
default value is HOLLOW_CIRCLE.
nodeSymbolSize: SymbolicConstant
A SymbolicConstant specifying the node symbol size. Possible values are SMALL, MEDIUM,
and LARGE. The default value is SMALL.
elementShrink: Boolean
A Boolean specifying whether elements are displayed in a shrunk format. The default
value is OFF.
elementShrinkFactor: int
An Int specifying the percentage to shrink the elements when **elementShrink=ON**.
Possible values are 0≤ **elementShrinkPercentage** ≤ 90. The default value is 5.
coordinateScale: Boolean
A Boolean specifying whether to scale coordinates. The default value is OFF.
normals: Boolean
A Boolean specifying whether to draw arrows that indicate the directions of element and
surface normals. The default value is OFF.
normalDisplay: SymbolicConstant
A SymbolicConstant specifying whether to draw element normals and surface normals.
Possible values are ELEMENT and SURFACE. The default value is ELEMENT.
normalArrowLength: SymbolicConstant
A SymbolicConstant specifying the length of the normal arrows. Possible values are
SHORT, MEDIUM, and LONG. The default value is MEDIUM.
normalLineThickness: SymbolicConstant
A SymbolicConstant specifying the thickness of the normal arrows. Possible values are
VERY_THIN, THIN, MEDIUM, and THICK. The default value is VERY_THIN.
normalArrowheadStyle: SymbolicConstant
A SymbolicConstant specifying the arrowhead style of the normal arrows. Possible values
are NONE, FILLED, and WIRE. The default value is WIRE.
translucency: Boolean
A Boolean specifying whether to set translucency. The default value is OFF.
translucencyFactor: float
A Float specifying the translucency factor when **translucency=ON**. Possible values are
0.0≤ **translucencyFactor** ≤ 1.0. The default value is 0.3.
edgeColorWireHide: str
A String specifying the color to be used to plot the edges of the model when
**renderStyle=WIREFRAME** or HIDDEN. The default value is "Green".
edgeColorFillShade: str
A String specifying the color to be used to plot the edges of the model when
**renderStyle=FILLED** or SHADED. The default value is "Black".
fillColor: str
A String specifying the color to be used to fill elements when **renderStyle=FILLED** or
SHADED. The default value is "Green".
labelFont: str
A String specifying the label font to be used for all model labels. The default value is
"-*-courier-medium-r-normal-*-*-120-*-*-m-*-*-*".
elemLabelColor: str
A String specifying the color to be used to plot the element labels. The default value
is "Cyan".
faceLabelColor: str
A String specifying the color to be used to plot the face labels. The default value is
"Red".
nodeLabelColor: str
A String specifying the color to be used to plot the node labels. The default value is
"Yellow".
nodeSymbolColor: str
A String specifying the color to be used to plot the node symbols. The default value is
"Yellow".
faceNormalColor: str
A String specifying the color to be used to plot the normal to a nonbeam element or to a
surface. The default value is "Red".
beamN1Color: str
A String specifying the color to be used to plot an arrow along the beam n1n1-direction.
The default value is "Blue".
beamN2Color: str
A String specifying the color to be used to plot an arrow along the beam n2n2-direction.
The default value is "Red".
beamTangentColor: str
A String specifying the color to be used to plot an arrow along the tangent to a beam.
The default value is "White".
coordinateScaleFactors: float
A tuple of three Floats specifying the coordinate scaling in each of the three
coordinate directions when **coordinateScale=ON**. The default value is (1, 1, 1).
Notes
-----
This object can be accessed by:
.. code-block:: python
import visualization
session.defaultOdbDisplay.superimposeOptions
session.viewports[name].assemblyDisplay.displayGroupInstances[name].odbDisplayOptions.superimposeOptions
session.viewports[name].layers[name].assemblyDisplay.displayGroupInstances[name].odbDisplayOptions.superimposeOptions
session.viewports[name].layers[name].odbDisplay.displayGroupInstances[name].odbDisplayOptions.superimposeOptions
session.viewports[name].layers[name].odbDisplay.superimposeOptions
session.viewports[name].layers[name].partDisplay.displayGroupInstances[name].odbDisplayOptions.superimposeOptions
session.viewports[name].odbDisplay.displayGroupInstances[name].odbDisplayOptions.superimposeOptions
session.viewports[name].odbDisplay.superimposeOptions
session.viewports[name].partDisplay.displayGroupInstances[name].odbDisplayOptions.superimposeOptions
"""
# A SymbolicConstant specifying the offset of the deformed shape from the undeformed
# shape. Possible values are NONE, UNIFORM, and NONUNIFORM. The default value is NONE.NONE
# specifies that there should be no offset of the deformed shape from the undeformed
# shape.
deformedOffsetMode: SymbolicConstant = NONE
# A Float specifying the uniform offset value when *deformedOffsetMode*=UNIFORM. The
# default value is 0.0.
uniformOffset: float = 0
# A tuple of three Floats specifying the offset value in each of the three coordinate
# directions when *deformedOffsetMode*=NONUNIFORM. The default value is (0, 0, 0).
nonuniformOffset: float = None
# A SymbolicConstant specifying the render style of the plot. Possible values are
# WIREFRAME, FILLED, HIDDEN, and SHADED. The default value is WIREFRAME.
renderStyle: SymbolicConstant = WIREFRAME
# A SymbolicConstant specifying which edges to plot. Possible values are ALL, EXTERIOR,
# FEATURE, FREE, and NONE. The default value is FEATURE.NONE can be used only when
# *renderStyle*=SHADED.
visibleEdges: SymbolicConstant = FEATURE
# A SymbolicConstant specifying the edge line style. Possible values are SOLID, DASHED,
# DOTTED, and DOT_DASH. The default value is SOLID.
edgeLineStyle: SymbolicConstant = SOLID
# A SymbolicConstant specifying the edge line thickness. Possible values are VERY_THIN,
# THIN, MEDIUM, and THICK. The default value is VERY_THIN.
edgeLineThickness: SymbolicConstant = VERY_THIN
# A Boolean specifying whether to allow color coded items in the output database to
# override the edge and fill color settings. The default value is ON.
colorCodeOverride: Boolean = ON
# A Boolean specifying whether to plot the element labels. The default value is OFF.
elemLabels: Boolean = OFF
# A Boolean specifying whether to plot the face labels. The default value is OFF.
faceLabels: Boolean = OFF
# A Boolean specifying whether to plot the node labels. The default value is OFF.
nodeLabels: Boolean = OFF
# A Boolean specifying whether to plot the node symbols. The default value is OFF.
nodeSymbols: Boolean = OFF
# A SymbolicConstant specifying the node symbol types. Possible values
# are:FILLED_CIRCLEFILLED_SQUAREFILLED_DIAMONDFILLED_TRIHOLLOW_CIRCLEHOLLOW_SQUAREHOLLOW_DIAMONDHOLLOW_TRICROSSXMARKERThe
# default value is HOLLOW_CIRCLE.
nodeSymbolType: SymbolicConstant = HOLLOW_CIRCLE
# A SymbolicConstant specifying the node symbol size. Possible values are SMALL, MEDIUM,
# and LARGE. The default value is SMALL.
nodeSymbolSize: SymbolicConstant = SMALL
# A Boolean specifying whether elements are displayed in a shrunk format. The default
# value is OFF.
elementShrink: Boolean = OFF
# An Int specifying the percentage to shrink the elements when *elementShrink*=ON.
# Possible values are 0≤ *elementShrinkPercentage* ≤ 90. The default value is 5.
elementShrinkFactor: int = 5
# A Boolean specifying whether to scale coordinates. The default value is OFF.
coordinateScale: Boolean = OFF
# A Boolean specifying whether to draw arrows that indicate the directions of element and
# surface normals. The default value is OFF.
normals: Boolean = OFF
# A SymbolicConstant specifying whether to draw element normals and surface normals.
# Possible values are ELEMENT and SURFACE. The default value is ELEMENT.
normalDisplay: SymbolicConstant = ELEMENT
# A SymbolicConstant specifying the length of the normal arrows. Possible values are
# SHORT, MEDIUM, and LONG. The default value is MEDIUM.
normalArrowLength: SymbolicConstant = MEDIUM
# A SymbolicConstant specifying the thickness of the normal arrows. Possible values are
# VERY_THIN, THIN, MEDIUM, and THICK. The default value is VERY_THIN.
normalLineThickness: SymbolicConstant = VERY_THIN
# A SymbolicConstant specifying the arrowhead style of the normal arrows. Possible values
# are NONE, FILLED, and WIRE. The default value is WIRE.
normalArrowheadStyle: SymbolicConstant = WIRE
# A Boolean specifying whether to set translucency. The default value is OFF.
translucency: Boolean = OFF
# A Float specifying the translucency factor when *translucency*=ON. Possible values are
# 0.0≤ *translucencyFactor* ≤ 1.0. The default value is 0.3.
translucencyFactor: float = 0
# A String specifying the color to be used to plot the edges of the model when
# *renderStyle*=WIREFRAME or HIDDEN. The default value is "Green".
edgeColorWireHide: str = ""
# A String specifying the color to be used to plot the edges of the model when
# *renderStyle*=FILLED or SHADED. The default value is "Black".
edgeColorFillShade: str = ""
# A String specifying the color to be used to fill elements when *renderStyle*=FILLED or
# SHADED. The default value is "Green".
fillColor: str = ""
# A String specifying the label font to be used for all model labels. The default value is
# "-*-courier-medium-r-normal-*-*-120-*-*-m-*-*-*".
labelFont: str = ""
# A String specifying the color to be used to plot the element labels. The default value
# is "Cyan".
elemLabelColor: str = ""
# A String specifying the color to be used to plot the face labels. The default value is
# "Red".
faceLabelColor: str = ""
# A String specifying the color to be used to plot the node labels. The default value is
# "Yellow".
nodeLabelColor: str = ""
# A String specifying the color to be used to plot the node symbols. The default value is
# "Yellow".
nodeSymbolColor: str = ""
# A String specifying the color to be used to plot the normal to a nonbeam element or to a
# surface. The default value is "Red".
faceNormalColor: str = ""
# A String specifying the color to be used to plot an arrow along the beam n1n1-direction.
# The default value is "Blue".
beamN1Color: str = ""
# A String specifying the color to be used to plot an arrow along the beam n2n2-direction.
# The default value is "Red".
beamN2Color: str = ""
# A String specifying the color to be used to plot an arrow along the tangent to a beam.
# The default value is "White".
beamTangentColor: str = ""
# A tuple of three Floats specifying the coordinate scaling in each of the three
# coordinate directions when *coordinateScale*=ON. The default value is (1, 1, 1).
coordinateScaleFactors: float = None
def setValues(
self,
options: "SuperimposeOptions" = None,
renderStyle: SymbolicConstant = WIREFRAME,
visibleEdges: SymbolicConstant = FEATURE,
edgeColorWireHide: str = "",
edgeColorFillShade: str = "",
edgeLineStyle: SymbolicConstant = SOLID,
edgeLineThickness: SymbolicConstant = VERY_THIN,
colorCodeOverride: Boolean = ON,
fillColor: str = "",
labelFont: str = "",
elemLabels: Boolean = OFF,
elemLabelColor: str = "",
faceLabels: Boolean = OFF,
faceLabelColor: str = "",
nodeLabels: Boolean = OFF,
nodeLabelColor: str = "",
nodeSymbols: Boolean = OFF,
nodeSymbolType: SymbolicConstant = HOLLOW_CIRCLE,
nodeSymbolColor: str = "",
nodeSymbolSize: SymbolicConstant = SMALL,
elementShrink: Boolean = OFF,
elementShrinkFactor: int = 5,
coordinateScale: Boolean = OFF,
coordinateScaleFactors: tuple = (),
normals: Boolean = OFF,
normalDisplay: SymbolicConstant = ELEMENT,
faceNormalColor: str = "",
beamN1Color: str = "",
beamN2Color: str = "",
beamTangentColor: str = "",
normalArrowLength: SymbolicConstant = MEDIUM,
normalLineThickness: SymbolicConstant = VERY_THIN,
normalArrowheadStyle: SymbolicConstant = WIRE,
translucency: Boolean = OFF,
translucencyFactor: float = 0,
deformedOffsetMode: SymbolicConstant = NONE,
uniformOffset: float = 0,
nonuniformOffset: tuple = (),
):
"""This method modifies the SuperimposeOptions object.
Parameters
----------
options
A SuperimposeOptions object from which values are to be copied. If other arguments are
also supplied to setValues, they will override the values in *options*. The default
value is None.
renderStyle
A SymbolicConstant specifying the render style of the plot. Possible values are
WIREFRAME, FILLED, HIDDEN, and SHADED. The default value is WIREFRAME.
visibleEdges
A SymbolicConstant specifying which edges to plot. Possible values are ALL, EXTERIOR,
FEATURE, FREE, and NONE. The default value is FEATURE.NONE can be used only when
*renderStyle*=SHADED.
edgeColorWireHide
A String specifying the color to be used to plot the edges of the model when
*renderStyle*=WIREFRAME or HIDDEN. The default value is "Green".
edgeColorFillShade
A String specifying the color to be used to plot the edges of the model when
*renderStyle*=FILLED or SHADED. The default value is "Black".
edgeLineStyle
A SymbolicConstant specifying the edge line style. Possible values are SOLID, DASHED,
DOTTED, and DOT_DASH. The default value is SOLID.
edgeLineThickness
A SymbolicConstant specifying the edge line thickness. Possible values are VERY_THIN,
THIN, MEDIUM, and THICK. The default value is VERY_THIN.
colorCodeOverride
A Boolean specifying whether to allow color coded items in the output database to
override the edge and fill color settings. The default value is ON.
fillColor
A String specifying the color to be used to fill elements when *renderStyle*=FILLED or
SHADED. The default value is "Green".
labelFont
A String specifying the label font to be used for all model labels. The default value is
"-*-courier-medium-r-normal-*-*-120-*-*-m-*-*-*".
elemLabels
A Boolean specifying whether to plot the element labels. The default value is OFF.
elemLabelColor
A String specifying the color to be used to plot the element labels. The default value
is "Cyan".
faceLabels
A Boolean specifying whether to plot the face labels. The default value is OFF.
faceLabelColor
A String specifying the color to be used to plot the face labels. The default value is
"Red".
nodeLabels
A Boolean specifying whether to plot the node labels. The default value is OFF.
nodeLabelColor
A String specifying the color to be used to plot the node labels. The default value is
"Yellow".
nodeSymbols
A Boolean specifying whether to plot the node symbols. The default value is OFF.
nodeSymbolType
A SymbolicConstant specifying the node symbol types. Possible values
are:FILLED_CIRCLEFILLED_SQUAREFILLED_DIAMONDFILLED_TRIHOLLOW_CIRCLEHOLLOW_SQUAREHOLLOW_DIAMONDHOLLOW_TRICROSSXMARKERThe
default value is HOLLOW_CIRCLE.
nodeSymbolColor
A String specifying the color to be used to plot the node symbols. The default value is
"Yellow".
nodeSymbolSize
A SymbolicConstant specifying the node symbol size. Possible values are SMALL, MEDIUM,
and LARGE. The default value is SMALL.
elementShrink
A Boolean specifying whether elements are displayed in a shrunk format. The default
value is OFF.
elementShrinkFactor
An Int specifying the percentage to shrink the elements when *elementShrink*=ON.
Possible values are 0≤ *elementShrinkPercentage* ≤ 90. The default value is 5.
coordinateScale
A Boolean specifying whether to scale coordinates. The default value is OFF.
coordinateScaleFactors
A sequence of three Floats specifying the coordinate scaling in each of the three
coordinate directions when *coordinateScale*=ON. The default value is (1, 1, 1).
normals
A Boolean specifying whether to draw arrows that indicate the directions of element and
surface normals. The default value is OFF.
normalDisplay
A SymbolicConstant specifying whether to draw element normals and surface normals.
Possible values are ELEMENT and SURFACE. The default value is ELEMENT.
faceNormalColor
A String specifying the color to be used to plot the normal to a nonbeam element or to a
surface. The default value is "Red".
beamN1Color
A String specifying the color to be used to plot an arrow along the beam n1n1-direction.
The default value is "Blue".
beamN2Color
A String specifying the color to be used to plot an arrow along the beam n2n2-direction.
The default value is "Red".
beamTangentColor
A String specifying the color to be used to plot an arrow along the tangent to a beam.
The default value is "White".
normalArrowLength
A SymbolicConstant specifying the length of the normal arrows. Possible values are
SHORT, MEDIUM, and LONG. The default value is MEDIUM.
normalLineThickness
A SymbolicConstant specifying the thickness of the normal arrows. Possible values are
VERY_THIN, THIN, MEDIUM, and THICK. The default value is VERY_THIN.
normalArrowheadStyle
A SymbolicConstant specifying the arrowhead style of the normal arrows. Possible values
are NONE, FILLED, and WIRE. The default value is WIRE.
translucency
A Boolean specifying whether to set translucency. The default value is OFF.
translucencyFactor
A Float specifying the translucency factor when *translucency*=ON. Possible values are
0.0≤ *translucencyFactor* ≤ 1.0. The default value is 0.3.
deformedOffsetMode
A SymbolicConstant specifying the offset of the deformed shape from the undeformed
shape. Possible values are NONE, UNIFORM, and NONUNIFORM. The default value is NONE.NONE
specifies that there should be no offset of the deformed shape from the undeformed
shape.
uniformOffset
A Float specifying the uniform offset value when *deformedOffsetMode*=UNIFORM. The
default value is 0.0.
nonuniformOffset
A sequence of three Floats specifying the offset value in each of the three coordinate
directions when *deformedOffsetMode*=NONUNIFORM. The default value is (0, 0, 0).
Raises
------
RangeError
"""
pass