Skip to content

Nice way to check security factors or degrees of utilisations in structural calculations #251

@av-engineering

Description

@av-engineering

Hello,

I want to share my way of checking security factors and degrees of utilisations with handcalcs:

pass_latex = r"$\mathbf{\color{green}\checkmark}$"
fail_latex = r"$\mathbf{\color{red} !}$"

def check_DoU(DoU):
    check = fail_latex
    operator = ">"
    if DoU <= 1:
        check = pass_latex
        operator = "\\leq"
    return f"{round(DoU,2)} {operator} 1 \\quad {check}"

def check_S(S_ist, S_soll):
    check = fail_latex
    operator = "<"
    if S_ist >= S_soll: 
        check = pass_latex
        operator = "\\geq"
    return f"{round(S_ist,1)} {operator} {S_soll} \\quad {check}"

E.g.:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions