This repository has been archived by the owner on Mar 4, 2023. It is now read-only.
/
Arrow.py
232 lines (209 loc) · 9.13 KB
/
Arrow.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
import typing
from abaqusConstants import *
from .Annotation import Annotation
class Arrow(Annotation):
"""The Arrow object stores the visual settings and location of an arrow annotation.
The Arrow object is derived from the Annotation object.
Notes
-----
This object can be accessed by:
.. code-block:: python
import annotationToolset
mdb.annotations[name]
session.odbs[name].userData.annotations[name]
session.viewports[name].annotationsToPlot[i]
"""
def __init__(
self,
name: str,
startPoint: tuple[float] = (),
endPoint: tuple[float] = (),
startAnchor: typing.Union[SymbolicConstant, float] = BOTTOM_LEFT,
endAnchor: typing.Union[SymbolicConstant, float] = BOTTOM_LEFT,
startHeadStyle: SymbolicConstant = NONE,
endHeadStyle: SymbolicConstant = FILLED_ARROW,
startGap: float = 0,
endGap: float = 0,
color: str = "",
lineStyle: SymbolicConstant = SOLID,
lineThickness: SymbolicConstant = VERY_THIN,
):
"""This method creates an Arrow object.
Notes
-----
This function can be accessed by:
.. code-block:: python
mdb.Arrow
session.odbs[*name*].userData.Arrow
Parameters
----------
name
A String specifying the annotation repository key.
startPoint
A pair of Floats specifying the start point *X*- and *Y*-offsets in millimeters from
*startAnchor*. The default value is (0, 0).
endPoint
A pair of Floats specifying the end point *X*- and *Y*-offsets in millimeters from
*endAnchor*. The default value is (0, 0).
startAnchor
A SymbolicConstant or a sequence of Floats specifying a point. A sequence of two Floats
specifies the *X*- and *Y*-coordinates as percentages of the viewport width and height.
A sequence of three Floats specifies the *X*-, *Y*-, and *Z*-coordinates of a point in
the model coordinate system. A SymbolicConstant indicates a relative position. Possible
values are:
- BOTTOM_LEFT
- BOTTOM_CENTER
- BOTTOM_RIGHT
- CENTER_LEFT
- CENTER
- CENTER_RIGHT
- TOP_LEFT
- TOP_CENTER
- TOP_RIGHT
The default value is BOTTOM_LEFT.
endAnchor
A SymbolicConstant or a sequence of Floats specifying a point. A sequence of two Floats
specifies the *X*- and *Y*-coordinates as percentages of the viewport width and height.
A Sequence of three Floats specifies the *X*-, *Y*-, and *Z*-coordinates of a point in
the model coordinate system. A SymbolicConstant indicates a relative position. Possible
values are:
- BOTTOM_LEFT
- BOTTOM_CENTER
- BOTTOM_RIGHT
- CENTER_LEFT
- CENTER
- CENTER_RIGHT
- TOP_LEFT
- TOP_CENTER
- TOP_RIGHT
The default value is BOTTOM_LEFT.
startHeadStyle
A SymbolicConstant specifying the style of the start head. Possible values are:
- ARROW
- FILLED_ARROW
- HOLLOW_CIRCLE
- FILLED_CIRCLE
- HOLLOW_DIAMOND
- FILLED_DIAMOND
- HOLLOW_SQUARE
- FILLED_SQUARE
- NONE
The default value is NONE.
endHeadStyle
A SymbolicConstant specifying the style of the end head. Possible values are:
ARROW
- FILLED_ARROW
- HOLLOW_CIRCLE
- FILLED_CIRCLE
- HOLLOW_DIAMOND
- FILLED_DIAMOND
- HOLLOW_SQUARE
- FILLED_SQUARE
- NONE
The default value is FILLED_ARROW.
startGap
A Float specifying the distance in millimeters between the arrow start point and the
arrow start head. The default value is 0.0.
endGap
A Float specifying the distance in millimeters between the arrow end point and the arrow
end head. The default value is 0.0.
color
A String specifying the color of the arrow. Possible string values are any valid color.
The default value is "White".
lineStyle
A SymbolicConstant specifying the line style of the arrow. Possible values are SOLID,
DASHED, DOTTED, and DOT_DASH. The default value is SOLID.
lineThickness
A SymbolicConstant specifying the line thickness of the arrow. Possible values are
VERY_THIN, THIN, MEDIUM, and THICK. The default value is VERY_THIN.
Returns
-------
An Arrow object.
"""
super().__init__()
pass
def translateStartPoint(self, x: float = None, y: float = None):
"""This method translates the start point of the Arrow object on the viewport plane.
Parameters
----------
x
A Float specifying the *X* translation amount in millimeters.
y
A Float specifying the*Y* translation amount in millimeters.
"""
pass
def translateEndPoint(self, x: float = None, y: float = None):
"""This method translates the end point of the Arrow object on the viewport plane.
Parameters
----------
x
A Float specifying the *X* translation amount in millimeters.
y
A Float specifying the*Y* translation amount in millimeters.
"""
pass
def setValues(
self,
startPoint: tuple[float] = (),
endPoint: tuple[float] = (),
startAnchor: typing.Union[SymbolicConstant, float] = BOTTOM_LEFT,
endAnchor: typing.Union[SymbolicConstant, float] = BOTTOM_LEFT,
startHeadStyle: SymbolicConstant = NONE,
endHeadStyle: SymbolicConstant = FILLED_ARROW,
startGap: float = 0,
endGap: float = 0,
color: str = "",
lineStyle: SymbolicConstant = SOLID,
lineThickness: SymbolicConstant = VERY_THIN,
):
"""This method modifies the Arrow object.
Parameters
----------
startPoint
A pair of Floats specifying the start point *X*- and *Y*-offsets in millimeters from
*startAnchor*. The default value is (0, 0).
endPoint
A pair of Floats specifying the end point *X*- and *Y*-offsets in millimeters from
*endAnchor*. The default value is (0, 0).
startAnchor
A SymbolicConstant or a sequence of Floats specifying a point. A sequence of two Floats
specifies the *X*- and *Y*-coordinates as percentages of the viewport width and height.
A sequence of three Floats specifies the *X*-, *Y*-, and *Z*-coordinates of a point in
the model coordinate system. A SymbolicConstant indicates a relative position. Possible
values
are:BOTTOM_LEFTBOTTOM_CENTERBOTTOM_RIGHTCENTER_LEFTCENTERCENTER_RIGHTTOP_LEFTTOP_CENTERTOP_RIGHTThe
default value is BOTTOM_LEFT.
endAnchor
A SymbolicConstant or a sequence of Floats specifying a point. A sequence of two Floats
specifies the *X*- and *Y*-coordinates as percentages of the viewport width and height.
A Sequence of three Floats specifies the *X*-, *Y*-, and *Z*-coordinates of a point in
the model coordinate system. A SymbolicConstant indicates a relative position. Possible
values
are:BOTTOM_LEFTBOTTOM_CENTERBOTTOM_RIGHTCENTER_LEFTCENTERCENTER_RIGHTTOP_LEFTTOP_CENTERTOP_RIGHTThe
default value is BOTTOM_LEFT.
startHeadStyle
A SymbolicConstant specifying the style of the start head. Possible values
are:ARROWFILLED_ARROWHOLLOW_CIRCLEFILLED_CIRCLEHOLLOW_DIAMONDFILLED_DIAMONDHOLLOW_SQUAREFILLED_SQUARENONEThe
default value is NONE.
endHeadStyle
A SymbolicConstant specifying the style of the end head. Possible values
are:ARROWFILLED_ARROWHOLLOW_
CIRCLEFILLED_CIRCLEHOLLOW_DIAMONDFILLED_DIAMONDHOLLOW_SQUAREFILLED_SQUARENONEThe default
value is FILLED_ARROW.
startGap
A Float specifying the distance in millimeters between the arrow start point and the
arrow start head. The default value is 0.0.
endGap
A Float specifying the distance in millimeters between the arrow end point and the arrow
end head. The default value is 0.0.
color
A String specifying the color of the arrow. Possible string values are any valid color.
The default value is "White".
lineStyle
A SymbolicConstant specifying the line style of the arrow. Possible values are SOLID,
DASHED, DOTTED, and DOT_DASH. The default value is SOLID.
lineThickness
A SymbolicConstant specifying the line thickness of the arrow. Possible values are
VERY_THIN, THIN, MEDIUM, and THICK. The default value is VERY_THIN.
"""
pass