Skip to content

strip_profile

structural_sections.steel.profile_definitions.strip_profile

Strip Profile.

Classes:

structural_sections.steel.profile_definitions.strip_profile.StripProfile dataclass

StripProfile(
    *,
    width: MM,
    height: MM,
    name: str = "Strip Profile",
    plotter: Callable[[Profile], Figure] = plot_shapes,
)

Bases: Profile

Representation of a Strip profile.

For standard profiles, use the specific standard profile class Strip. For example,

strip_profile = Strip.STRIP160x5

Attributes:

  • width (MM) –

    The width of the strip profile [mm].

  • height (MM) –

    The height (thickness) of the strip profile [mm].

  • name (str) –

    The name of the profile. Default is "Strip Profile".

  • plotter (Callable[[Profile], Figure]) –

    The plotter function to visualize the profile (default: plot_shapes).

structural_sections.steel.profile_definitions.strip_profile.StripProfile.height instance-attribute

height: MM

The height (thickness) of the strip profile [mm].

structural_sections.steel.profile_definitions.strip_profile.StripProfile.max_thickness property

max_thickness: MM

Maximum element thickness of the profile [mm].

structural_sections.steel.profile_definitions.strip_profile.StripProfile.name class-attribute instance-attribute

name: str = 'Strip Profile'

The name of the profile.

structural_sections.steel.profile_definitions.strip_profile.StripProfile.plotter class-attribute instance-attribute

plotter: Callable[[Profile], Figure] = plot_shapes

The plotter function to visualize the profile.

structural_sections.steel.profile_definitions.strip_profile.StripProfile.width instance-attribute

width: MM

The width of the strip profile [mm].

structural_sections.steel.profile_definitions.strip_profile.StripProfile.with_corrosion

with_corrosion(corrosion: MM = 0) -> StripProfile

Apply corrosion to the strip profile and return a new strip profile instance.

The name attribute of the new instance will be updated to reflect the total corrosion applied including any previous corrosion indicated in the original name.

Parameters:

  • corrosion (MM, default: 0 ) –

    Corrosion per side (default is 0).

Source code in blueprints/structural_sections/steel/profile_definitions/strip_profile.py
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
def with_corrosion(self, corrosion: MM = 0) -> StripProfile:
    """Apply corrosion to the strip profile and return a new strip profile instance.

    The name attribute of the new instance will be updated to reflect the total corrosion applied
    including any previous corrosion indicated in the original name.

    Parameters
    ----------
    corrosion : MM, optional
        Corrosion per side (default is 0).
    """
    raise_if_negative(corrosion=corrosion)

    if corrosion == 0:
        return self

    width = self.width - corrosion * 2
    height = self.height - corrosion * 2

    if any(dimension <= FULL_CORROSION_TOLERANCE for dimension in (width, height)):
        raise ValueError("The profile has fully corroded.")

    name = update_name_with_corrosion(self.name, corrosion=corrosion)

    return StripProfile(
        width=width,
        height=height,
        name=name,
        plotter=self.plotter,
    )