This repository has been archived by the owner on Mar 4, 2023. It is now read-only.
/
AcisFile.py
342 lines (279 loc) · 11.7 KB
/
AcisFile.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
from abaqusConstants import *
class AcisFile:
"""The AcisFile object is a file object used to open ACIS-, STEP-, and IGES-format files.
Attributes
----------
numberOfParts: int
An Int specifying :py:class:`~.the` number of parts in :py:class:`~.the` object.
Notes
-----
This object can be accessed by:
.. code-block:: python
import part
"""
# An Int specifying the number of parts in the object.
numberOfParts: int = None
def openAcis(self, fileName: str, scaleFromFile: Boolean = OFF):
"""This method creates an AcisFile object from a file containing ACIS-format geometry. This
object is subsequently used by the PartFromGeometryFile method.
Notes
-----
This function can be accessed by:
.. code-block:: python
mdb.openAcis
Parameters
----------
fileName
A String specifying the path to the ACIS file to open.
scaleFromFile
A Boolean specifying whether to scale, rotate, and translate the part using the
transform read from the ACIS file. The default value is OFF.
Returns
-------
An AcisFile object.
Raises
------
- File is from a newer version of ACIS than the CAE kernel.
Texterror: ACIS File version exceeds Kernel.
- The data in the ACIS file are corrupted.
Texterror: Failed to read ACIS file.
"""
pass
def openCatia(
self,
fileName: str,
topology: SymbolicConstant = None,
convertUnits: SymbolicConstant = OFF,
combineBodies: Boolean = OFF,
):
"""This method creates an AcisFile object from a file containing V5-format geometry. This
object is subsequently used by the PartFromGeometryFile method.
Notes
-----
This function can be accessed by:
.. code-block:: python
mdb.openAcis
Parameters
----------
fileName
A String specifying the path to the CATIA file to open.
topology
A SymbolicConstant specifying the topology of the data to be read from the file and of
the part to be created. Possible values are SOLID , SHELL, and WIRE. If
*topology*=SOLID, Abaqus/CAE attempts to attach cells to create a solid. If
*topology*=SHELL, Abaqus/CAE builds the body as a shell entity and not as a solid
entity. The default value is SOLID .
convertUnits
A SymbolicConstant specifying whether the original units should be retained. Possible
values are ON and OFF. The default value is OFF.
combineBodies
A Boolean specifying whether to combine the bodies in the CATPart file. If the bodies to
be combined touch or overlap, invalid entities would result. For CATProduct files, this
option will be ignored.
Returns
-------
An AcisFile object.
"""
pass
def openEnf(
self,
fileName: str,
fileType: str,
topology: SymbolicConstant = SOLID,
convertUnits: Boolean = OFF,
):
"""This method creates an AcisFile object from a file containing Elysium Neutral
File-format geometry that was created by CATIA V5, I-DEAS, or Pro/ENGINEER. This object
is subsequently used by the PartFromGeometryFile method.
Notes
-----
This function can be accessed by:
.. code-block:: python
mdb.openAcis
Parameters
----------
fileName
A String specifying the path to the Elysium Neutral File that was created by I-DEAS,
Pro/ENGINEER, or CATIA V5.
fileType
A String specifying the type of CAD system that created the file. Possible values are
“ideas”, “proe”, or “catiav5” or a combination similar to “proe/ideas/catiav5” if the
type is unknown.
topology
A SymbolicConstant specifying the topology of the data to be read from the file and of
the part to be created. Possible values are SOLID , SHELL, and WIRE. If
*topology*=SOLID, Abaqus/CAE attempts to attach cells to create a solid. If
*topology*=SHELL, Abaqus/CAE builds the body as a shell entity and not as a solid
entity. The default value is SOLID.
convertUnits
A Boolean specifying if the dimensions of the part should be converted to millimeters.
The default value is OFF.
Returns
-------
An AcisFile object.
"""
pass
def openIges(
self,
fileName: str,
trimCurve: SymbolicConstant = DEFAULT,
scaleFromFile: SymbolicConstant = OFF,
msbo: Boolean = False,
includedLayers: tuple = (),
topology: SymbolicConstant = SOLID,
uniteWires: SymbolicConstant = ON,
):
"""This method creates an AcisFile object from a file containing IGES-format geometry. This
object is subsequently used by the PartFromGeometryFile method.
Notes
-----
This function can be accessed by:
.. code-block:: python
mdb.openAcis
Parameters
----------
fileName
A String specifying the path to the IGES file to open.
trimCurve
A SymbolicConstant specifying the method used to define the trim curves that bound
parametric surfaces. Possible values are:DEFAULT, use either of the following as
specified by the contents of the IGES file.PARAMETRIC_DATA, use the parameter space of
the surface being trimmed.THREED_DATA, use real space—the coordinate system of the part
along with an indication that the trim curve lies on the parametric surface.The default
value is DEFAULT.
scaleFromFile
A SymbolicConstant specifying whether the imported geometry needs to be scaled using the
units information available in the IGES file. Possible values are ON and OFF. The
default value is OFF. When the argument is set to ON, the geometry is scaled to
millimeters with respect to the unit system specified in the IGES file.
msbo
A Boolean specifying if the IGES file contains MSBO (Manifold Solid B-Rep Object)
entities. The default value is False.
includedLayers
A sequence of Ints specifying the levels or layers of entities that will be translated
from the IGES file to build the part. The default is to include all the layers.
topology
A SymbolicConstant specifying the topology of the data to be read from the file and of
the part to be created. Possible values are SOLID , SHELL, and WIRE. If
*topology*=SOLID, Abaqus/CAE attempts to attach cells to create a solid. If
*topology*=SHELL, Abaqus/CAE builds the body as a shell entity and not as a solid
entity. The default value is SOLID.
uniteWires
A SymbolicConstant specifying whether the imported wires need to be united or not.
Possible values are ON and OFF. The default value is ON. When importing a sketch, this
value is set to OFF.
Returns
-------
An AcisFile object.
Raises
------
- The data in the IGES file are corrupted.
Texterror: Failed to read IGES file.
"""
pass
def openParasolid(self, fileName: str, topology: SymbolicConstant = SOLID):
"""This method creates an AcisFile object from a file containing Parasolid-format geometry.
This object is subsequently used by the PartFromGeometryFile method.
Notes
-----
This function can be accessed by:
.. code-block:: python
mdb.openAcis
Parameters
----------
fileName
A String specifying the path to the Parasolid file to open.
topology
A SymbolicConstant specifying the topology of the data to be read from the file and of
the part to be created. Possible values are SOLID , SHELL, and WIRE. If
*topology*=SOLID, Abaqus/CAE attempts to attach cells to create a solid. If
*topology*=SHELL, Abaqus/CAE builds the body as a shell entity and not as a solid
entity. The default value is SOLID.
Returns
-------
An AcisFile object.
"""
pass
def openStep(self, fileName: str, scale: float = 1):
"""This method creates an AcisFile object from a file containing STEP-format geometry. This
object is subsequently used by the PartFromGeometryFile method.
Notes
-----
This function can be accessed by:
.. code-block:: python
mdb.openAcis
Parameters
----------
fileName
A String specifying the path to the STEP file to open.
scale
A Float specifying the scaling factor to apply to the imported geometric entities. The
default value is 1.0.
Returns
-------
An AcisFile object.
Raises
------
- The data in the STEP file are corrupted.
Texterror: Failed to read STEP file.
"""
pass
def openVda(self, fileName: str):
"""This method creates an AcisFile object from a file containing VDA-FS-format geometry.
This object is subsequently used by the PartFromGeometryFile method.
Notes
-----
This function can be accessed by:
.. code-block:: python
mdb.openAcis
Parameters
----------
fileName
A String specifying the path to the VDA-FS file to open.
Returns
-------
An AcisFile object.
Raises
------
- The data in the VDA-FS file are corrupted.
Texterror: Failed to read VDA file.
"""
pass
def openSolidworks(self, fileName: str, topology: SymbolicConstant = SOLID):
"""This method creates an AcisFile object from a file containing Solidworks format
geometry. This object is subsequently used by the PartFromGeometryFile method.
Notes
-----
This function can be accessed by:
.. code-block:: python
mdb.openAcis
Parameters
----------
fileName
A String specifying the path to the Solidworks file to open.
topology
A SymbolicConstant specifying the topology of the data to be read from the file and of
the part to be created. Possible values are SOLID, SHELL, and WIRE. If *topology*=SOLID,
Abaqus/CAE attempts to attach cells to create a solid entity. If *topology*=SHELL,
Abaqus/CAE builds the body as a shell entity, not as a solid entity. The default value
is SOLID.
Returns
-------
An AcisFile object.
Raises
------
- The data in the Solidworks file are corrupted.
Texterror: Failed to read Solidworks file.
"""
pass
def writeAcisFile(self, fileName: str, version: float = None):
"""This method exports the assembly to a named file in ACIS format.
Parameters
----------
fileName
A String specifying the name of the file to which to write.
version
A Float specifying the ACIS version. For example, the Float 12.0 corresponds to ACIS
Version 12.0. The default value is the current version of ACIS.
"""
pass