• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

haiiliin / abqpy / 9778498874

03 Jul 2024 01:09PM UTC coverage: 73.937%. First build
9778498874

Pull #5650

github

web-flow
Merge 11eafe700 into 7e76949aa
Pull Request #5650: [bugfix] Move circular imports to `TYPE_CHECKING` blocks (backport #5586)

17 of 23 new or added lines in 6 files covered. (73.91%)

24161 of 32678 relevant lines covered (73.94%)

0.74 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

86.11
/src/abaqus/Assembly/ModelInstance.py
1
from __future__ import annotations
1✔
2

3
from typing import TYPE_CHECKING
1✔
4

5
from abqpy.decorators import abaqus_class_doc, abaqus_method_doc
1✔
6

7
from ..BasicGeometry.EdgeArray import EdgeArray
1✔
8
from ..BasicGeometry.ReferencePoint import ReferencePoint
1✔
9
from ..BasicGeometry.VertexArray import VertexArray
1✔
10
from ..Datum.Datum import Datum
1✔
11
from ..Mesh.MeshElementArray import MeshElementArray
1✔
12
from ..Mesh.MeshNodeArray import MeshNodeArray
1✔
13
from ..Region.Set import Set
1✔
14
from ..Region.Surface import Surface
1✔
15
from ..UtilityAndView.abaqusConstants import OFF, Boolean
1✔
16

17
if TYPE_CHECKING:
1✔
NEW
18
    from ..Model.Model import Model
×
19

20

21
@abaqus_class_doc
1✔
22
class ModelInstance:
1✔
23
    """A ModelInstance object is an instance of a Model.
24

25
    .. note::
26
        This object can be accessed by::
27

28
            import assembly
29
            mdb.models[name].rootAssembly.modelInstances[i]
30
    """
31

32
    #: A repository of Set objects specifying the sets created on the assembly. For more
33
    #: information, see [Region
34
    #: commands](https://help.3ds.com/2022/english/DSSIMULIA_Established/SIMACAEKERRefMap/simaker-m-RegPyc-sb.htm?ContextScope=all).
35
    sets: dict[str, Set] = {}
1✔
36

37
    #: A repository of Surface objects specifying the surfaces created on the assembly. For
38
    #: more information, see [Region
39
    #: commands](https://help.3ds.com/2022/english/DSSIMULIA_Established/SIMACAEKERRefMap/simaker-m-RegPyc-sb.htm?ContextScope=all).
40
    surfaces: dict[str, Surface] = {}
1✔
41

42
    #: A VertexArray object.
43
    vertices: VertexArray = VertexArray([])
1✔
44

45
    #: An EdgeArray object.
46
    edges: EdgeArray = EdgeArray([])
1✔
47

48
    #: A MeshElementArray object.
49
    elements: MeshElementArray = MeshElementArray([])
1✔
50

51
    #: A MeshNodeArray object.
52
    nodes: MeshNodeArray = MeshNodeArray([])
1✔
53

54
    #: A repository of Datum objects.
55
    datums: dict[str, Datum] = {}
1✔
56

57
    #: A repository of ReferencePoint objects.
58
    referencePoints: dict[str, ReferencePoint] = {}
1✔
59

60
    @abaqus_method_doc
1✔
61
    def __init__(self, name: str, model: Model, autoOffset: Boolean = OFF):
1✔
62
        """This method creates a ModelInstance object and puts it into the instances repository.
63

64
        .. note::
65
            This function can be accessed by::
66

67
                mdb.models[name].rootAssembly.Instance
68

69
        Parameters
70
        ----------
71
        name
72
            The repository key. The name must be a valid Abaqus object name.
73
        model
74
            A Model object to be instanced. If the model does not exist, no ModelInstance object is
75
            created.
76
        autoOffset
77
            A Boolean specifying whether to apply an auto offset to the new instance that will
78
            offset it from existing instances. The default value is OFF.
79

80
        Returns
81
        -------
82
        ModelInstance
83
            A ModelInstance object.
84
        """
85
        ...
×
86

87
    @abaqus_method_doc
1✔
88
    def ConvertConstraints(self):
1✔
89
        """This method converts the position constraints of an instance to absolute positions.
90

91
        The method deletes the constraint features on the instance but preserves the position in space.
92
        """
93
        ...
×
94

95
    @abaqus_method_doc
1✔
96
    def getPosition(self):
1✔
97
        """This method prints the sum of the translations and rotations applied to the ModelInstance object."""
98
        ...
×
99

100
    @abaqus_method_doc
1✔
101
    def translate(self, vector: tuple):
1✔
102
        """This method translates an instance by the specified amount.
103

104
        Parameters
105
        ----------
106
        vector
107
            A sequence of three Floats specifying a translation vector.
108
        """
109
        ...
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc