Source code for anastruct._types

from typing import TYPE_CHECKING, Dict, Literal, Sequence, TypedDict, Union

import numpy as np

if TYPE_CHECKING:
    from anastruct.vertex import Vertex

[docs] AxisNumber = Literal[1, 2, 3]
[docs] Dimension = Literal["x", "y", "y_neg", "both"]
[docs] ElementType = Literal["general", "truss"]
[docs] LoadDirection = Literal["element", "x", "y", "parallel", "perpendicular", "angle"]
[docs] MpType = Dict[Literal[1, 2], float]
[docs] NumberLike = Union[float, int, np.number]
[docs] OrientAxis = Literal["y", "z"]
[docs] Spring = Dict[Literal[1, 2], float]
[docs] SupportDirection = Literal["x", "y", "1", "2", 1, 2]
[docs] VertexLike = Union[Sequence[Union[float, int]], np.ndarray, "Vertex"]
[docs] SectionProps = TypedDict( "SectionProps", { "EI": float, "EA": float, "g": float, }, )