def rescale_thick(elem, ratio):
    """Shrink/grow element size, while leaving the element type 'as is'."""
    if ratio == 1:
        return elem
    scaled = elem.copy()
    scaled['L'] = elem['L'] * ratio
    if scaled.base_type == 'sbend':
        scaled['angle'] = scaled['angle'] * ratio
    return scaled
