# -*- coding: utf-8 -*- """Общие элементы оформления листов (основная надпись, технические требования).""" from drawings.dw_env import DES ORG = [] # графа 9 (предприятие) — не заполняется (литера и подписи — пустые по заданию) def title(sh, code, title_lines, mass="", scale="", material=None, sheet=1, sheets=1, form=1, title_h=5.0, material_h=3.5): f = dict(code=code, title=title_lines, mass=mass, scale=scale, sheet=sheet, sheets=sheets, org=ORG, names={}, lit="", title_h=title_h, material_h=material_h) if material: f["material"] = material return sh.title_block(f, form=form) def tt_block(sh, x, y_top, width, items, h=3.5, step=None, header=None, header_h=5.0): """Технические требования (ГОСТ Р 2.316-2023): пункты нумеруются, текст — над основной надписью.""" y = y_top if header: sh.text((x + width / 2.0, y - header_h), header, header_h, ha="center") y -= header_h + 4.0 return sh.text_block(x, y, items, h=h, step=step or h * 1.75, width=width, numbered=True) def sb_code(): return DES + " СБ"