This repository has been archived by the owner on Mar 4, 2023. It is now read-only.
/
DatumCsys.py
96 lines (78 loc) · 3.59 KB
/
DatumCsys.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
from abaqusConstants import *
from .Datum import Datum
from .DatumAxis import DatumAxis
from .DatumPoint import DatumPoint
class DatumCsys(Datum):
"""The DatumCsys object has no direct constructor; it is created when a Feature object is
created. For example, the DatumCsysByOffset method creates a Feature object that creates
a DatumCsys object.
The DatumCsys object is derived from the Datum object.
Attributes
----------
coordSysType: SymbolicConstant
A SymbolicConstant specifying the type of the coordinate system. Possible values are
CARTESIAN, CYLINDRICAL, and SPHERICAL.
origin: DatumPoint
A :py:class:`~abaqus.Datum.DatumPoint.DatumPoint` object specifying the origin of the coordinate system.
axis1: DatumAxis
A :py:class:`~abaqus.Datum.DatumAxis.DatumAxis` object specifying the 1-direction of the coordinate system.
axis2: DatumAxis
A :py:class:`~abaqus.Datum.DatumAxis.DatumAxis` object specifying the 2-direction of the coordinate system.
axis3: DatumAxis
A :py:class:`~abaqus.Datum.DatumAxis.DatumAxis` object specifying the 3-direction of the coordinate system.
Notes
-----
This object can be accessed by:
.. code-block:: python
import part
mdb.models[name].parts[name].datums[i]
import assembly
mdb.models[name].rootAssembly.allInstances[name].datums[i]
mdb.models[name].rootAssembly.connectorOrientations[i].localCsys1
mdb.models[name].rootAssembly.connectorOrientations[i].localCsys2
mdb.models[name].rootAssembly.datums[i]
mdb.models[name].rootAssembly.instances[name].datums[i]
import odbAccess
session.odbs[name].rootAssembly.connectorOrientations[i].localCsys1
session.odbs[name].rootAssembly.connectorOrientations[i].localCsys2
"""
# A SymbolicConstant specifying the type of the coordinate system. Possible values are
# CARTESIAN, CYLINDRICAL, and SPHERICAL.
coordSysType: SymbolicConstant = None
# A DatumPoint object specifying the origin of the coordinate system.
origin: DatumPoint = DatumPoint()
# A DatumAxis object specifying the 1-direction of the coordinate system.
axis1: DatumAxis = DatumAxis()
# A DatumAxis object specifying the 2-direction of the coordinate system.
axis2: DatumAxis = DatumAxis()
# A DatumAxis object specifying the 3-direction of the coordinate system.
axis3: DatumAxis = DatumAxis()
def globalToLocal(
self, coordinates: tuple[float, float, float]
) -> tuple[float, float, float]:
"""This method transforms specified coordinates in the global coordinate system into this
local coordinate system.
Parameters
----------
coordinates
A tuple of three Floats representing the coordinates in the global coordinate system.
Returns
-------
tuple[float, float, float]
A tuple of three Floats representing the coordinates in this local coordinate system.
"""
pass
def localToGlobal(
self, coordinates: tuple[float, float, float]
) -> tuple[float, float, float]:
"""This method transforms specified coordinates in this local coordinate system into the global coordinate system.
Parameters
----------
coordinates
A tuple of three Floats representing the coordinates in the local coordinate system.
Returns
-------
tuple[float, float, float]
A tuple of three Floats representing the coordinates in this global coordinate system.
"""
pass