diff --git a/src/abaqus/Feature/Feature.py b/src/abaqus/Feature/Feature.py index ffef837424..33488417b6 100644 --- a/src/abaqus/Feature/Feature.py +++ b/src/abaqus/Feature/Feature.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Sequence, Union, overload +from typing import TYPE_CHECKING, Sequence, overload from typing_extensions import Literal @@ -10,13 +10,13 @@ from ..BasicGeometry.Edge import Edge from ..BasicGeometry.Face import Face from ..BasicGeometry.InterestingPoint import InterestingPoint -from ..BasicGeometry.ReferencePoint import ReferencePoint +from ..BasicGeometry.ReferencePoint import ReferencePoint as ReferencePointType from ..BasicGeometry.Transform import Transform -from ..BasicGeometry.Vertex import Vertex from ..Datum.Datum import Datum from ..Datum.DatumAxis import DatumAxis from ..Datum.DatumPlane import DatumPlane from ..Datum.DatumPoint import DatumPoint +from ..Mesh.MeshEdge import MeshEdge from ..Mesh.MeshFace import MeshFace from ..Mesh.MeshNode import MeshNode from ..Sketcher.ConstrainedSketch import ConstrainedSketch, ConstrainedSketchVertex @@ -32,6 +32,9 @@ ) from ..UtilityAndView.abaqusConstants import abaqusConstants as C +if TYPE_CHECKING: + from numpy.typing import NDArray + @abaqus_class_doc class Feature: @@ -61,7 +64,13 @@ class Feature: def AttachmentPoints( self, name: str, - points: float, + points: ( + Sequence[ConstrainedSketchVertex] + | Sequence[DatumPoint] + | Sequence[MeshNode] + | Sequence[InterestingPoint] + | Sequence[Sequence[float]] + ), projectionMethod: Literal[C.PROJECT_BY_PROXIMITY, C.PROJECT_BY_DIRECTION] = PROJECT_BY_PROXIMITY, projectOnFaces: Sequence[Face] = (), projectOnElementFaces: Sequence[MeshFace] = (), @@ -224,36 +233,48 @@ def AttachmentPointsOffsetFromEdges( spacingMethod: Literal[C.AUTO_FIT_PTS, C.SPECIFY_NUM_PTS] = AUTO_FIT_PTS, patterningMethod: Literal[C.PATTERN_ORTHOGONALLY, C.PATTERN_ALONG_DIRECTION] = C.PATTERN_ORTHOGONALLY, referenceFace: str = "", - startPointForPatternDirection: ConstrainedSketchVertex - | Datum - | ReferencePoint - | MeshNode - | InterestingPoint - | Sequence[float] = (0.0, 0.0, 0.0), - endPointForPatternDirection: ConstrainedSketchVertex - | Datum - | ReferencePoint - | MeshNode - | InterestingPoint - | Sequence[float] = (0.0, 0.0, 0.0), + startPointForPatternDirection: ( + ConstrainedSketchVertex + | Datum + | ReferencePointType + | MeshNode + | InterestingPoint + | Sequence[float] + | NDArray + ) = (0.0, 0.0, 0.0), + endPointForPatternDirection: ( + ConstrainedSketchVertex + | Datum + | ReferencePointType + | MeshNode + | InterestingPoint + | Sequence[float] + | NDArray + ) = (0.0, 0.0, 0.0), offsetFromEdges: str = "", numberOfRows: int = 1, spacingBetweenRows: str = "", projectionMethod: Literal[C.PROJECT_BY_PROXIMITY, C.PROJECT_BY_DIRECTION] = PROJECT_BY_PROXIMITY, projectOnFaces: Sequence[Face] = (), projectOnElementFaces: Sequence[MeshFace] = (), - projectionDirStartPt: ConstrainedSketchVertex - | Datum - | ReferencePoint - | MeshNode - | InterestingPoint - | Sequence[float] = (0.0, 0.0, 0.0), - projectionDirEndPt: ConstrainedSketchVertex - | Datum - | ReferencePoint - | MeshNode - | InterestingPoint - | Sequence[float] = (0.0, 0.0, 0.0), + projectionDirStartPt: ( + ConstrainedSketchVertex + | Datum + | ReferencePointType + | MeshNode + | InterestingPoint + | Sequence[float] + | NDArray + ) = (0.0, 0.0, 0.0), + projectionDirEndPt: ( + ConstrainedSketchVertex + | Datum + | ReferencePointType + | MeshNode + | InterestingPoint + | Sequence[float] + | NDArray + ) = (0.0, 0.0, 0.0), setName: str = "", ) -> Feature: """This method creates a Feature object by creating attachment points along or offset from one or more @@ -354,7 +375,10 @@ def AttachmentPointsOffsetFromEdges( return Feature() @abaqus_method_doc - def DatumAxisByCylFace(self, face: str) -> Feature: + def DatumAxisByCylFace( + self, + face: Face, + ) -> Feature: """This method creates a Feature object and a DatumAxis object along the axis of a cylinder or cone. .. note:: @@ -380,7 +404,11 @@ def DatumAxisByCylFace(self, face: str) -> Feature: return Feature() @abaqus_method_doc - def DatumAxisByNormalToPlane(self, plane: str, point: int) -> Feature: + def DatumAxisByNormalToPlane( + self, + plane: Face | MeshFace | DatumPlane, + point: ConstrainedSketchVertex | DatumPoint | MeshNode | InterestingPoint | Sequence[float] | NDArray, + ) -> Feature: """This method creates a Feature object and a DatumAxis object normal to the specified plane and passing through the specified point. @@ -409,7 +437,11 @@ def DatumAxisByNormalToPlane(self, plane: str, point: int) -> Feature: return Feature() @abaqus_method_doc - def DatumAxisByParToEdge(self, edge: str, point: int) -> Feature: + def DatumAxisByParToEdge( + self, + edge: Edge | MeshEdge | DatumAxis, + point: ConstrainedSketchVertex | DatumPoint | MeshNode | InterestingPoint | Sequence[float] | NDArray, + ) -> Feature: """This method creates a Feature object and a DatumAxis object parallel to the specified edge and passing through the specified point. @@ -466,7 +498,12 @@ def DatumAxisByPrincipalAxis(self, principalAxis: Literal[C.XAXIS, C.YAXIS, C.ZA @overload @abaqus_method_doc - def DatumAxisByRotation(self, line: str, axis: str, angle: float) -> Feature: + def DatumAxisByRotation( + self, + line: Edge | DatumAxis | MeshEdge, + axis: Edge | DatumAxis | MeshEdge, + angle: float, + ) -> Feature: """This method creates a Feature object and a DatumAxis object in a three-dimensional model by rotating a line about the specified axis through the specified angle. @@ -500,7 +537,12 @@ def DatumAxisByRotation(self, line: str, axis: str, angle: float) -> Feature: @overload @abaqus_method_doc - def DatumAxisByRotation(self, line: str, point: int, angle: float) -> Feature: + def DatumAxisByRotation( + self, + line: Edge | DatumAxis | MeshEdge, + point: ConstrainedSketchVertex | DatumPoint | MeshNode | InterestingPoint | Sequence[float] | NDArray, + angle: float, + ) -> Feature: """This method creates a Feature object and a DatumAxis object in a two-dimensional model by rotating a line about the specified point through the specified angle. @@ -536,7 +578,12 @@ def DatumAxisByRotation(self, line: str, point: int, angle: float) -> Feature: def DatumAxisByRotation(self, *args, **kwargs) -> Feature: return Feature() - def DatumAxisByThreePoint(self, point1: int, point2: int, point3: int) -> Feature: + def DatumAxisByThreePoint( + self, + point1: ConstrainedSketchVertex | DatumPoint | MeshNode | InterestingPoint | Sequence[float] | NDArray, + point2: ConstrainedSketchVertex | DatumPoint | MeshNode | InterestingPoint | Sequence[float] | NDArray, + point3: ConstrainedSketchVertex | DatumPoint | MeshNode | InterestingPoint | Sequence[float] | NDArray, + ) -> Feature: """This method creates a Feature object and a DatumAxis object normal to the circle described by three points and through its center. @@ -570,7 +617,7 @@ def DatumAxisByThreePoint(self, point1: int, point2: int, point3: int) -> Featur return Feature() @abaqus_method_doc - def DatumAxisByThruEdge(self, edge: str) -> Feature: + def DatumAxisByThruEdge(self, edge: Edge | MeshEdge) -> Feature: """This method creates a Feature object and a DatumAxis object along the specified edge. .. note:: @@ -596,7 +643,11 @@ def DatumAxisByThruEdge(self, edge: str) -> Feature: return Feature() @abaqus_method_doc - def DatumAxisByTwoPlane(self, plane1: str, plane2: str) -> Feature: + def DatumAxisByTwoPlane( + self, + plane1: Face | MeshFace | DatumPlane, + plane2: Face | MeshFace | DatumPlane, + ) -> Feature: """This method creates a Feature object and a DatumAxis object at the intersection of two planes. .. note:: @@ -624,7 +675,11 @@ def DatumAxisByTwoPlane(self, plane1: str, plane2: str) -> Feature: return Feature() @abaqus_method_doc - def DatumAxisByTwoPoint(self, point1: int, point2: int) -> Feature: + def DatumAxisByTwoPoint( + self, + point1: ConstrainedSketchVertex | DatumPoint | MeshNode | InterestingPoint | Sequence[float] | NDArray, + point2: ConstrainedSketchVertex | DatumPoint | MeshNode | InterestingPoint | Sequence[float] | NDArray, + ) -> Feature: """This method creates a Feature object and a DatumAxis object along the line joining two points. .. note:: @@ -690,8 +745,8 @@ def DatumCsysByOffset( self, coordSysType: Literal[C.CARTESIAN, C.CYLINDRICAL, C.SPHERICAL], datumCoordSys: Datum, - vector: tuple, - point: str, + vector: Sequence[float] | NDArray, + point: ConstrainedSketchVertex | DatumPoint | InterestingPoint | Sequence[float] | NDArray, name: str = "", ) -> Feature: """This method creates a Feature object and a DatumCsys object by offsetting the origin of an existing @@ -737,11 +792,11 @@ def DatumCsysByOffset( def DatumCsysByThreePoints( self, coordSysType: Literal[C.CARTESIAN, C.CYLINDRICAL, C.SPHERICAL], - origin: int, - point1: int, - point2: int, - line1: str, - line2: str, + origin: ConstrainedSketchVertex | DatumPoint | MeshNode | InterestingPoint | Sequence[float] | NDArray, + point1: ConstrainedSketchVertex | DatumPoint | MeshNode | InterestingPoint | Sequence[float] | NDArray, + point2: ConstrainedSketchVertex | DatumPoint | MeshNode | InterestingPoint | Sequence[float] | NDArray, + line1: Edge | DatumAxis | MeshEdge, + line2: Edge | DatumAxis | MeshEdge, name: str = "", ) -> Feature: """This method creates a Feature object and a DatumCsys object from three points. @@ -794,8 +849,8 @@ def DatumCsysByThreePoints( def DatumCsysByTwoLines( self, coordSysType: Literal[C.CARTESIAN, C.CYLINDRICAL, C.SPHERICAL], - line1: str, - line2: str, + line1: Edge | MeshEdge | DatumAxis, + line2: Edge | MeshEdge | DatumAxis, name: str = "", ) -> Feature: """This method creates a Feature object and a DatumCsys object from two orthogonal lines. The origin of @@ -866,7 +921,12 @@ def DatumPlaneByPrincipalPlane( @overload @abaqus_method_doc - def DatumPlaneByOffset(self, plane: str, flip: Literal[C.SIDE1, C.SIDE2], offset: float) -> Feature: + def DatumPlaneByOffset( + self, + plane: Face | MeshFace | DatumPlane, + flip: Literal[C.SIDE1, C.SIDE2], + offset: float, + ) -> Feature: """This method creates a Feature object and a DatumPlane object offset by a specified distance from an existing plane. @@ -899,7 +959,11 @@ def DatumPlaneByOffset(self, plane: str, flip: Literal[C.SIDE1, C.SIDE2], offset @overload @abaqus_method_doc - def DatumPlaneByOffset(self, plane: str, point: int) -> Feature: + def DatumPlaneByOffset( + self, + plane: Face | MeshFace | DatumPlane, + point: ConstrainedSketchVertex | DatumPoint | MeshNode | InterestingPoint | Sequence[float] | NDArray, + ) -> Feature: """This method creates a Feature object and a DatumPlane object offset from an existing plane and passing through the specified point. @@ -931,7 +995,12 @@ def DatumPlaneByOffset(self, plane: str, point: int) -> Feature: def DatumPlaneByOffset(self, *args, **kwargs) -> Feature: return Feature() - def DatumPlaneByRotation(self, plane: str, axis: str, angle: float) -> Feature: + def DatumPlaneByRotation( + self, + plane: Face | MeshFace | DatumPlane, + axis: Edge | MeshEdge | DatumAxis, + angle: float, + ) -> Feature: """This method creates a Feature object and a DatumPlane object by rotating a plane about the specified axis through the specified angle. @@ -962,7 +1031,12 @@ def DatumPlaneByRotation(self, plane: str, axis: str, angle: float) -> Feature: return Feature() @abaqus_method_doc - def DatumPlaneByThreePoints(self, point1: int, point2: int, point3: int) -> Feature: + def DatumPlaneByThreePoints( + self, + point1: ConstrainedSketchVertex | DatumPoint | MeshNode | InterestingPoint | Sequence[float] | NDArray, + point2: ConstrainedSketchVertex | DatumPoint | MeshNode | InterestingPoint | Sequence[float] | NDArray, + point3: ConstrainedSketchVertex | DatumPoint | MeshNode | InterestingPoint | Sequence[float] | NDArray, + ) -> Feature: """This method creates a Feature object and a DatumPlane object defined by passing through three points. .. note:: @@ -992,7 +1066,11 @@ def DatumPlaneByThreePoints(self, point1: int, point2: int, point3: int) -> Feat return Feature() @abaqus_method_doc - def DatumPlaneByLinePoint(self, line: str, point: int) -> Feature: + def DatumPlaneByLinePoint( + self, + line: Edge | DatumAxis | MeshEdge, + point: ConstrainedSketchVertex | DatumPoint | MeshNode | InterestingPoint | Sequence[float] | NDArray, + ) -> Feature: """This method creates a Feature object and a DatumPlane object that pass through the specified line and through the specified point that does not lie on the line. @@ -1021,7 +1099,11 @@ def DatumPlaneByLinePoint(self, line: str, point: int) -> Feature: return Feature() @abaqus_method_doc - def DatumPlaneByPointNormal(self, point: int, normal: str) -> Feature: + def DatumPlaneByPointNormal( + self, + point: ConstrainedSketchVertex | DatumPoint | MeshNode | InterestingPoint | Sequence[float] | NDArray, + normal: Edge | MeshEdge | DatumAxis, + ) -> Feature: """This method creates a Feature object and a DatumPlane object normal to the specified line and running through the specified point. @@ -1050,7 +1132,11 @@ def DatumPlaneByPointNormal(self, point: int, normal: str) -> Feature: return Feature() @abaqus_method_doc - def DatumPlaneByTwoPoint(self, point1: int, point2: int) -> Feature: + def DatumPlaneByTwoPoint( + self, + point1: ConstrainedSketchVertex | DatumPoint | MeshNode | InterestingPoint | Sequence[float] | NDArray, + point2: ConstrainedSketchVertex | DatumPoint | MeshNode | InterestingPoint | Sequence[float] | NDArray, + ) -> Feature: """This method creates a Feature object and a DatumPlane object midway between two points and normal to the line connecting the points. @@ -1079,7 +1165,7 @@ def DatumPlaneByTwoPoint(self, point1: int, point2: int) -> Feature: return Feature() @abaqus_method_doc - def DatumPointByCoordinate(self, coords: tuple[float, float, float]) -> Feature: + def DatumPointByCoordinate(self, coords: Sequence[float] | NDArray) -> Feature: """This method creates a Feature object and a DatumPoint object at the point defined by the specified coordinates. @@ -1103,7 +1189,11 @@ def DatumPointByCoordinate(self, coords: tuple[float, float, float]) -> Feature: return Feature() @abaqus_method_doc - def DatumPointByOffset(self, point: int, vector: tuple) -> Feature: + def DatumPointByOffset( + self, + point: ConstrainedSketchVertex | DatumPoint | MeshNode | InterestingPoint | Sequence[float] | NDArray, + vector: Sequence[float] | NDArray, + ) -> Feature: """This method creates a Feature object and a DatumPoint object offset from an existing point by a vector. @@ -1128,7 +1218,11 @@ def DatumPointByOffset(self, point: int, vector: tuple) -> Feature: return Feature() @abaqus_method_doc - def DatumPointByMidPoint(self, point1: int, point2: int) -> Feature: + def DatumPointByMidPoint( + self, + point1: ConstrainedSketchVertex | DatumPoint | MeshNode | InterestingPoint | Sequence[float] | NDArray, + point2: ConstrainedSketchVertex | DatumPoint | MeshNode | InterestingPoint | Sequence[float] | NDArray, + ) -> Feature: """This method creates a Feature object and a DatumPoint object midway between two points. .. note:: @@ -1152,7 +1246,14 @@ def DatumPointByMidPoint(self, point1: int, point2: int) -> Feature: return Feature() @abaqus_method_doc - def DatumPointByOnFace(self, face: str, edge1: str, offset1: float, edge2: str, offset2: float) -> Feature: + def DatumPointByOnFace( + self, + face: Face | DatumPlane, + edge1: Edge | DatumAxis, + offset1: float, + edge2: Edge | DatumAxis, + offset2: float, + ) -> Feature: """This method creates a Feature object and a DatumPoint object on the specified face, offset from two edges. @@ -1218,7 +1319,11 @@ def DatumPointByEdgeParam(self, edge: Edge, parameter: float) -> Feature: return Feature() @abaqus_method_doc - def DatumPointByProjOnEdge(self, point: int, edge: str) -> Feature: + def DatumPointByProjOnEdge( + self, + point: ConstrainedSketchVertex | DatumPoint | MeshNode | InterestingPoint | Sequence[float] | NDArray, + edge: Edge | MeshEdge | DatumAxis, + ) -> Feature: """This method creates a Feature object and a DatumPoint object along an edge by projecting an existing point along the normal to the edge. @@ -1247,7 +1352,11 @@ def DatumPointByProjOnEdge(self, point: int, edge: str) -> Feature: return Feature() @abaqus_method_doc - def DatumPointByProjOnFace(self, point: int, face: Face) -> Feature: + def DatumPointByProjOnFace( + self, + point: ConstrainedSketchVertex | DatumPoint | MeshNode | InterestingPoint | Sequence[float] | NDArray, + face: Face | DatumPlane, + ) -> Feature: """This method creates a Feature object and a DatumPoint object on a specified face by projecting an existing point onto the face. @@ -1279,11 +1388,11 @@ def DatumPointByProjOnFace(self, point: int, face: Face) -> Feature: @abaqus_method_doc def MakeSketchTransform( self, - sketchPlane: Union[DatumPlane, Face], + sketchPlane: DatumPlane | Face, origin: tuple = (), sketchOrientation: Literal[C.RIGHT, C.LEFT, C.TOP, C.BOTTOM] = RIGHT, sketchPlaneSide: Literal[C.SIDE1, C.SIDE2] = SIDE1, - sketchUpEdge: Union[Edge, DatumAxis, None] = None, + sketchUpEdge: Edge | DatumAxis | None = None, ) -> Transform: """This method creates a Transform object. A Transform object is a 4x3 matrix of Floats that represents the transformation from sketch coordinates to part coordinates. @@ -1384,7 +1493,11 @@ def PartitionCellByExtendFace(self, cells: Sequence[Cell], extendFace: str) -> F @abaqus_method_doc def PartitionCellByExtrudeEdge( - self, cells: Sequence[Cell], edges: str, line: str, sense: Literal[C.FORWARD, C.REVERSE] + self, + cells: Sequence[Cell], + edges: Edge, + line: Edge | DatumAxis, + sense: Literal[C.FORWARD, C.REVERSE], ) -> Feature: """This method partitions one or more cells by extruding selected edges in the given direction. @@ -1421,7 +1534,11 @@ def PartitionCellByExtrudeEdge( return Feature() @abaqus_method_doc - def PartitionCellByPatchNCorners(self, cell: Cell, cornerPoints: tuple) -> Feature: + def PartitionCellByPatchNCorners( + self, + cell: Cell, + cornerPoints: Sequence[ConstrainedSketchVertex] | Sequence[InterestingPoint] | Sequence[DatumPoint], + ) -> Feature: """This method partitions a cell using an N-sided cutting patch defined by the given corner points. .. note:: @@ -1450,7 +1567,11 @@ def PartitionCellByPatchNCorners(self, cell: Cell, cornerPoints: tuple) -> Featu return Feature() @abaqus_method_doc - def PartitionCellByPatchNEdges(self, cell: str, edges: Sequence[Edge]) -> Feature: + def PartitionCellByPatchNEdges( + self, + cell: Cell, + edges: Sequence[Edge], + ) -> Feature: """This method partitions a cell using an N-sided cutting patch defined by the given edges. .. note:: @@ -1483,7 +1604,7 @@ def PartitionCellByPlaneNormalToEdge( self, cells: Sequence[Cell], edge: Edge, - point: Union[ConstrainedSketchVertex, InterestingPoint, DatumPoint], + point: ConstrainedSketchVertex | InterestingPoint | DatumPoint, ) -> Feature: """This method partitions one or more cells using a plane normal to an edge at the given edge point. @@ -1517,8 +1638,8 @@ def PartitionCellByPlaneNormalToEdge( def PartitionCellByPlanePointNormal( self, cells: Sequence[Cell], - point: Union[ConstrainedSketchVertex, InterestingPoint, DatumPoint], - normal: Union[Edge, DatumAxis], + point: ConstrainedSketchVertex | InterestingPoint | DatumPoint, + normal: Edge | DatumAxis, ) -> Feature: """This method partitions one or more cells using a plane defined by a point and a normal direction. @@ -1549,7 +1670,13 @@ def PartitionCellByPlanePointNormal( return Feature() @abaqus_method_doc - def PartitionCellByPlaneThreePoints(self, cells: Sequence[Cell], point1: int, point2: int, point3: int) -> Feature: + def PartitionCellByPlaneThreePoints( + self, + cells: Sequence[Cell], + point1: ConstrainedSketchVertex | DatumPoint | InterestingPoint | Sequence[float] | NDArray, + point2: ConstrainedSketchVertex | DatumPoint | InterestingPoint | Sequence[float] | NDArray, + point3: ConstrainedSketchVertex | DatumPoint | InterestingPoint | Sequence[float] | NDArray, + ) -> Feature: """This method partitions one or more cells using a plane defined by three points. .. note:: @@ -1672,7 +1799,11 @@ def PartitionEdgeByParam(self, edges: Sequence[Edge], parameter: float) -> Featu return Feature() @abaqus_method_doc - def PartitionEdgeByPoint(self, edge: Edge, point: int) -> Feature: + def PartitionEdgeByPoint( + self, + edge: Edge, + point: DatumPoint | InterestingPoint | Sequence[float] | NDArray, + ) -> Feature: """This method partitions an edge at the given point. .. note:: @@ -1763,7 +1894,12 @@ def PartitionFaceByCurvedPathEdgeParams( @abaqus_method_doc def PartitionFaceByCurvedPathEdgePoints( - self, face: Face, edge1: Edge, point1: int, edge2: Edge, point2: int + self, + face: Face, + edge1: Edge, + point1: ConstrainedSketchVertex | DatumPoint | InterestingPoint | Sequence[float] | NDArray, + edge2: Edge, + point2: ConstrainedSketchVertex | DatumPoint | InterestingPoint | Sequence[float] | NDArray, ) -> Feature: """This method partitions a face normal to two edges, using a curved path between the two given edge points. @@ -1906,7 +2042,12 @@ def PartitionFaceByProjectingEdges( return Feature() @abaqus_method_doc - def PartitionFaceByShortestPath(self, faces: Sequence[Face], point1: int, point2: int) -> Feature: + def PartitionFaceByShortestPath( + self, + faces: Sequence[Face], + point1: ConstrainedSketchVertex | DatumPoint | InterestingPoint | Sequence[float] | NDArray, + point2: ConstrainedSketchVertex | DatumPoint | InterestingPoint | Sequence[float] | NDArray, + ) -> Feature: """This method partitions one or more faces using a minimum distance path between the two given points. .. note:: @@ -1982,7 +2123,7 @@ def PartitionFaceBySketch( def PartitionFaceBySketchDistance( self, faces: Sequence[Face], - sketchPlane: str, + sketchPlane: Face | DatumPlane, sketchPlaneSide: Literal[C.SIDE1, C.SIDE2], sketchUpEdge: Edge, sketch: ConstrainedSketch, @@ -2033,10 +2174,10 @@ def PartitionFaceBySketchDistance( def PartitionFaceBySketchRefPoint( self, faces: Sequence[Face], - sketchPlane: str, + sketchPlane: Face | DatumPlane, sketchUpEdge: Edge, sketch: ConstrainedSketch, - point: int, + point: ConstrainedSketchVertex | DatumPoint | InterestingPoint | Sequence[float] | NDArray, sketchOrientation: Literal[C.RIGHT, C.LEFT, C.TOP, C.BOTTOM] = RIGHT, ) -> Feature: """This method partitions one or more faces by sketching on a sketch plane and then projecting the @@ -2128,7 +2269,7 @@ def PartitionFaceBySketchThruAll( @abaqus_method_doc def ReferencePoint( self, - point: Union[tuple, Vertex, InterestingPoint, MeshNode, Datum], + point: ConstrainedSketchVertex | InterestingPoint | MeshNode | DatumPoint | Sequence[float] | NDArray, instanceName: str = "", ) -> Feature: """This method creates a Feature object and a ReferencePoint object at the specified location. @@ -2181,7 +2322,14 @@ def RemoveWireEdges(self, wireEdgeList: Sequence[Edge]) -> Feature: @abaqus_method_doc def WirePolyLine( self, - points: float, + points: ( + Sequence[ConstrainedSketchVertex] + | Sequence[DatumPoint] + | Sequence[MeshNode] + | Sequence[InterestingPoint] + | Sequence[Sequence[float]] + | Sequence[ReferencePointType] + ), mergeType: Literal[C.MERGE, C.IMPRINT, C.SEPARATE] = IMPRINT, meshable: Boolean = ON, ) -> Feature: diff --git a/src/abaqus/Mesh/MeshPart.py b/src/abaqus/Mesh/MeshPart.py index 34e10a0f13..e8888c04e3 100644 --- a/src/abaqus/Mesh/MeshPart.py +++ b/src/abaqus/Mesh/MeshPart.py @@ -967,16 +967,7 @@ def setBoundaryLayerControls( @abaqus_method_doc def setElementType( self, - regions: Union[ - Sequence[ - Union[ - ConstrainedSketchGeometry, - Sequence[MeshElement], - Sequence[Cell], - ] - ], - Set, - ], + regions: Union[Sequence[ConstrainedSketchGeometry], Sequence[MeshElement], Set], elemTypes: Sequence[ElemType], ): """This method assigns element types to the specified regions. @@ -1024,7 +1015,7 @@ def setLogicalCorners(self, region: str, corners: str): @abaqus_method_doc def setMeshControls( self, - regions: tuple, + regions: Union[Sequence[Face], Sequence[Cell]], elemShape: Literal[C.HEX_DOMINATED, C.WEDGE, C.TET, C.QUAD_DOMINATED, C.HEX, C.QUAD, C.TRI] | None = None, technique: Literal[C.BOTTOM_UP, C.STRUCTURED, C.FREE, C.SWEEP, C.SYSTEM_ASSIGN] | None = None, algorithm: Literal[C.NON_DEFAULT, C.MEDIAL_AXIS, C.ADVANCING_FRONT] | None = None, diff --git a/src/abaqus/Part/PartFeature.py b/src/abaqus/Part/PartFeature.py index a701ba8951..848872efc0 100644 --- a/src/abaqus/Part/PartFeature.py +++ b/src/abaqus/Part/PartFeature.py @@ -10,6 +10,7 @@ from ..BasicGeometry.Edge import Edge from ..BasicGeometry.Face import Face from ..BasicGeometry.Vertex import Vertex +from ..Datum.Datum import Datum from ..Datum.DatumAxis import DatumAxis from ..Datum.DatumPlane import DatumPlane from ..Feature.Feature import Feature as BaseFeature @@ -1307,8 +1308,9 @@ def OffsetFaces( faceList: Sequence[Face], distance: float | None = None, targetFaces: Sequence[Face] = (), - targetFacesMethod: Literal[C.HALF_OF_AVERAGE, C.CLOSEST_POINT_FRACTION, C.FARTHEST_POINT_FRACTION] - | None = None, + targetFacesMethod: ( + Literal[C.HALF_OF_AVERAGE, C.CLOSEST_POINT_FRACTION, C.FARTHEST_POINT_FRACTION] | None + ) = None, fractionDistance: float | None = None, trimToReferenceRep: Boolean = OFF, ) -> "Feature": @@ -1791,7 +1793,7 @@ def ShellExtrude( @abaqus_method_doc def ShellLoft( self, - loftsections: tuple, + loftsections: Sequence, startCondition: Literal[C.NONE, C.NORMAL, C.RADIAL, C.SPECIFIED] | None = None, endCondition: Literal[C.NONE, C.NORMAL, C.RADIAL, C.SPECIFIED] | None = None, startTangent: float | None = None, @@ -2408,9 +2410,9 @@ def Stitch(self, edgeList: Sequence[Edge] = (), stitchTolerance: float | None = @abaqus_method_doc def Wire( self, - sketchPlane: str, + sketchPlane: Union[Datum, Face], sketchPlaneSide: Literal[C.SIDE1, C.SIDE2], - sketchUpEdge: Edge, + sketchUpEdge: Union[Edge, Datum], sketch: ConstrainedSketch, sketchOrientation: Literal[C.RIGHT, C.LEFT, C.TOP, C.BOTTOM] = RIGHT, ) -> "Feature":