This repository has been archived by the owner on Mar 4, 2023. It is now read-only.
/
AttributeColorMap.py
104 lines (88 loc) · 5.63 KB
/
AttributeColorMap.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
from abaqusConstants import *
class AttributeColorMap:
"""The AttributeColorMap object is used to store values and attributes associated with
AttributeColorMap type objects. AttributeColorMap objects can be modified using the
methods described below. The methods accessed via the Viewport object cause the
AttributeColorMap object to be updated in the session.viewports[name].colorMappings
repository.
Attributes
----------
mapType: SymbolicConstant
A SymbolicConstant specifying the type of AttributeColorMap . Possible values are
MATERIAL_MAP, SECTION_MAP, PART_MAP, ELSET_MAP, AVERAGING_REGION_MAP, and ELTYPE_MAP.
overrides: dict
A :py:class:`~.Dictionary` object specifying a color mapping. Each key is of String type and specifies
an attribute in the map; the corresponding values specify the color definition to apply
to that attribute in the form (0|1, wire color, edge color, face color). The 0|1 defines
the active status for the attribute. For example:`overrides={
'Part-1':(1,'00FF00', '00CCFF', '00FF00')}`
defaultOverrides: dict
A :py:class:`~.Dictionary` object specifying a custom color mapping similar to overrides. For
example:`defaultOverrides={ 'Copper':(1,''00FF00', '00CCFF',
'00FF00')}`The color mapping can contain keys that have not been
created. When the key is created, it gets the appropriate values from this mapping.
attributeColors: dict
A :py:class:`~.Dictionary` object specifying the color settings of each attribute as described in the
[updateOverrides
](https://help.3ds.com/2022/english/DSSIMULIA_Established/SIMACAEKERRefMap/simaker-c-attributecolormappyc.htm?ContextScope=allsimaker-attributecolormapupdateoverridespyc)method.
Notes
-----
This object can be accessed by:
.. code-block::
session.viewports[name].colorMappings[name]
"""
# A SymbolicConstant specifying the type of AttributeColorMap . Possible values are
# MATERIAL_MAP, SECTION_MAP, PART_MAP, ELSET_MAP, AVERAGING_REGION_MAP, and ELTYPE_MAP.
mapType: SymbolicConstant = None
# A Dictionary object specifying a color mapping. Each key is of String type and specifies
# an attribute in the map; the corresponding values specify the color definition to apply
# to that attribute in the form (0|1, wire color, edge color, face color). The 0|1 defines
# the active status for the attribute. For example:`overrides={
# 'Part-1':(1,'#00FF00', '#00CCFF', '#00FF00')}`
overrides: dict = None
# A Dictionary object specifying a custom color mapping similar to overrides. For
# example:`defaultOverrides={ 'Copper':(1,''#00FF00', '#00CCFF',
# '#00FF00')}`The color mapping can contain keys that have not been
# created. When the key is created, it gets the appropriate values from this mapping.
defaultOverrides: dict = None
# A Dictionary object specifying the color settings of each attribute as described in the
# [updateOverrides
# ](https://help.3ds.com/2022/english/DSSIMULIA_Established/SIMACAEKERRefMap/simaker-c-attributecolormappyc.htm?ContextScope=all#simaker-attributecolormapupdateoverridespyc)method.
attributeColors: dict = None
def setDefaults(self):
"""This method resets the AttributeColorMap object to its default state."""
pass
def setValues(self, overrides: dict = None, defaultOverrides: dict = None):
"""This method modifies the AttributeColorMap object.
Parameters
----------
overrides
A Dictionary object specifying a color mapping. Each key is of String type and specifies
an attribute in the map; the corresponding values specify the color definition to apply
to that attribute in the form (0|1, wire color, edge color, face color). The 0|1 defines
the active status for the attribute. For example:`overrides={
'Part-1':(1,'#00FF00', '#00CCFF', '#00FF00')}`
defaultOverrides
A Dictionary object specifying a custom color mapping similar to overrides. For
example:`defaultOverrides={ 'Copper':(1,''#00FF00', '#00CCFF',
'#00FF00')}`The color mapping can contain keys that have not been
created. When the key is created, it gets the appropriate values from this mapping.
"""
pass
def updateOverrides(self, overrides: dict = None, defaultOverrides: dict = None):
"""This method specifies additional overrides to be added to the current object definition.
Parameters
----------
overrides
A Dictionary object specifying a color mapping. Each key is of String type and specifies
an attribute in the map; the corresponding values specify the color definition to apply
to that attribute in the form (0|1, wire color, edge color, face color). The 0|1 defines
the active status for the attribute. For example:`overrides={
'Part-1':(1,'#00FF00', '#00CCFF', '#00FF00')}`
defaultOverrides
A Dictionary object specifying a custom color mapping similar to overrides. For
example:`defaultOverrides={ 'Copper':(1,''#00FF00', '#00CCFF',
'#00FF00')}`The color mapping can contain keys that have not been
created. When the key is created, it gets the appropriate values from this mapping.
"""
pass