-
Notifications
You must be signed in to change notification settings - Fork 27
/
ConstrainedSketchDimensionModel.py
262 lines (225 loc) · 9.34 KB
/
ConstrainedSketchDimensionModel.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
from __future__ import annotations
from typing import Sequence
from abqpy.decorators import abaqus_class_doc, abaqus_method_doc
from ...UtilityAndView.abaqusConstants import OFF, Boolean
from ..ConstrainedSketchBase import ConstrainedSketchBase
from ..ConstrainedSketchGeometry.ConstrainedSketchGeometry import (
ConstrainedSketchGeometry,
)
from ..ConstrainedSketchVertex.ConstrainedSketchVertex import ConstrainedSketchVertex
from .ConstrainedSketchDimension import ConstrainedSketchDimension
@abaqus_class_doc
class ConstrainedSketchDimensionModel(ConstrainedSketchBase):
"""A ConstrainedSketch object contains the entities that are used to create a sketch. The objects include
ConstrainedSketchGeometry objects contained in the ConstrainedSketchGeometry Repository, such as Line, Arc,
and Spline. ConstrainedSketchVertex, ConstrainedSketchDimension, ConstrainedSketchConstraint, and
ConstrainedSketchParameter objects are contained in their respective repositories.
.. note::
This object can be accessed by::
import sketch
mdb.models[name].sketches[name]
"""
@abaqus_method_doc
def AngularDimension(
self,
line1: ConstrainedSketchGeometry,
line2: ConstrainedSketchGeometry,
textPoint: Sequence[float],
value: float | None = None,
reference: Boolean = OFF,
) -> ConstrainedSketchDimension:
"""This method constructs a ConstrainedSketchDimension object between two ConstrainedSketchGeometry
objects, with the given angle between them.
.. note::
This function can be accessed by::
mdb.models[name].sketches[name].AngularDimension
Parameters
----------
line1
A ConstrainedSketchGeometry object specifying the first line.
line2
A ConstrainedSketchGeometry object specifying the second line.
textPoint
A pair of Floats specifying the location of the dimension text.
value
A Float specifying the angle between the two lines.
reference
A Boolean specifying whether the created dimension enforces the above value or if it
simply measures the angle between two lines.
Returns
-------
dimension
A ConstrainedSketchDimension object
"""
return ConstrainedSketchDimension()
@abaqus_method_doc
def HorizontalDimension(
self,
vertex1: ConstrainedSketchVertex,
vertex2: ConstrainedSketchVertex,
textPoint: Sequence[float],
value: float | None = None,
reference: Boolean = OFF,
) -> ConstrainedSketchDimension:
"""This method constructs a ConstrainedSketchDimension object between two vertices. A horizontal
dimension indicates the horizontal distance along the **X** axis between two vertices.
.. note::
This function can be accessed by::
mdb.models[name].sketches[name].HorizontalDimension
Parameters
----------
vertex1
A ConstrainedSketchVertex object specifying the first endpoint.
vertex2
A ConstrainedSketchVertex object specifying the second endpoint.
textPoint
A pair of Floats specifying the location of the dimension text.
value
A Float distance between the two vertices.
reference
A Boolean specifying whether the created dimension enforces the above value or if it
simply measures the distance between the two vertices.
Returns
-------
dimension
A ConstrainedSketchDimension object
"""
return ConstrainedSketchDimension()
@abaqus_method_doc
def ObliqueDimension(
self,
vertex1: ConstrainedSketchVertex,
vertex2: ConstrainedSketchVertex,
textPoint: Sequence[float],
value: float | None = None,
reference: Boolean = OFF,
) -> ConstrainedSketchDimension:
"""This method constructs a ConstrainedSketchDimension object between two vertices. An oblique dimension
indicates the distance between two vertices.
.. note::
This function can be accessed by::
mdb.models[name].sketches[name].ObliqueDimension
Parameters
----------
vertex1
A ConstrainedSketchVertex object specifying the first endpoint.
vertex2
A ConstrainedSketchVertex object specifying the second endpoint.
textPoint
A pair of Floats specifying the location of the dimension text.
value
A Float specifying the distance between the two ConstrainedSketchVertex objects.
reference
A Boolean specifying whether the created dimension enforces the above value or if it
simply measures the distance between the two vertices.
Returns
-------
dimension
A ConstrainedSketchDimension object
"""
return ConstrainedSketchDimension()
@abaqus_method_doc
def RadialDimension(
self,
curve: ConstrainedSketchGeometry,
textPoint: Sequence[float],
value: float | None = None,
reference: Boolean = OFF,
majorRadius: float | None = None,
minorRadius: float | None = None,
) -> ConstrainedSketchDimension:
"""This method constructs a ConstrainedSketchDimension object on a circular or elliptical arc. A radial
dimension indicates the radius of an arc or circle or the major or minor radius of an ellipse.
.. note::
This function can be accessed by::
mdb.models[name].sketches[name].RadialDimension
Parameters
----------
curve
A ConstrainedSketchGeometry object specifying the circular or elliptical arc.
textPoint
A pair of Floats specifying the location of the dimension text.
value
A Float specifying the radius of the arc, circle or ellipse.
reference
A Boolean specifying whether the created dimension enforces the above value or if it
simply measures the angle between two lines.
majorRadius
A Float specifying the major Radius if **curve** is an ellipse. This is mutually exclusive
with **value** and **minorRadius**.
minorRadius
A Float specifying the minor Radius if **curve** is an ellipse. This is mutually exclusive
with **value** and **majorRadius**.
Returns
-------
dimension
A ConstrainedSketchDimension object
"""
return ConstrainedSketchDimension()
@abaqus_method_doc
def VerticalDimension(
self,
vertex1: ConstrainedSketchVertex,
vertex2: ConstrainedSketchVertex,
textPoint: Sequence[float],
value: float | None = None,
reference: Boolean = OFF,
) -> ConstrainedSketchDimension:
"""This method constructs a ConstrainedSketchDimension between two vertices. A vertical dimension
controls the vertical distance along the **Y** axis between two vertices.
.. note::
This function can be accessed by::
mdb.models[name].sketches[name].VerticalDimension
Parameters
----------
vertex1
A ConstrainedSketchVertex object specifying the first endpoint.
vertex2
A ConstrainedSketchVertex object specifying the second endpoint.
textPoint
A pair of Floats specifying the location of the dimension text.
value
A Float specifying the angle between the two lines.
reference
A Boolean specifying whether the created dimension enforces the above value or if it
simply measures the angle between two lines.
Returns
-------
dimension
A ConstrainedSketchDimension object
"""
return ConstrainedSketchDimension()
@abaqus_method_doc
def DistanceDimension(
self,
entity1: ConstrainedSketchVertex,
entity2: ConstrainedSketchVertex,
textPoint: Sequence[float],
value: float | None = None,
reference: Boolean = OFF,
) -> ConstrainedSketchDimension:
"""This method constructs a ConstrainedSketchDimension object between two ConstrainedSketchGeometry, or
aConstrainedSketchVertex and ConstrainedSketchGeometry object. A distance dimension specifies the
shortest distance between two entities.
.. note::
This function can be accessed by::
mdb.models[name].sketches[name].DistanceDimension
Parameters
----------
entity1
A ConstrainedSketchVertex object or ConstrainedSketchGeometry object.
entity2
A ConstrainedSketchVertex object or ConstrainedSketchGeometry object.
textPoint
A pair of Floats specifying the location of the dimension text.
value
A Float specifying the angle between the two lines.
reference
A Boolean specifying whether the created dimension enforces the above value or if it
simply measures the angle between two lines.
Returns
-------
dimension
A ConstrainedSketchDimension object
"""
return ConstrainedSketchDimension()