加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ipc_sm_782.py 3.56 KB
一键复制 编辑 原始数据 按行查看 历史
Trygve Laugstøl 提交于 2017-12-16 19:18 . o Moving some code around.
def make_dicts(header, *rows):
return [{k: v for k, v in zip(header, row)} for row in rows]
resc_dimensions = make_dicts(["size_mm", "size_in", "l_min", "l_max", "s_min", "s_max", "w_min", "w_max", "t_min", "t_max", "h_max"],
# Component
# Identifier L S W T H
# (mm) [in] min max min max min max min max max
("1005", "0402", 1.00, 1.10, 0.40, 0.70, 0.48, 0.60, 0.10, 0.30, 0.40),
("1608", "0603", 1.50, 1.70, 0.70, 1.11, 0.70, 0.95, 0.15, 0.40, 0.60),
("2012", "0805", 1.85, 2.15, 0.55, 1.32, 1.10, 1.40, 0.15, 0.65, 0.65),
("3216", "1206", 3.05, 3.35, 1.55, 2.32, 1.45, 1.75, 0.25, 0.75, 0.71),
("3225", "1210", 3.05, 3.35, 1.55, 2.32, 2.34, 2.64, 0.25, 0.75, 0.71),
("5025", "2010", 4.85, 5.15, 3.15, 3.92, 2.35, 2.65, 0.35, 0.85, 0.71),
("6332", "2512", 6.15, 6.45, 4.45, 5.22, 3.05, 3.35, 0.35, 0.85, 0.71),
)
resc_land_patterns = make_dicts(["rlp_no", "size_mm", "size_in", "z", "g", "x", "y", "c", "grid"],
# Component Identifier Y C Placement Grid
# RLP No. (mm) [in] Z G X ref ref (No. of Grid elements)
("100A", "1005", "0402", 2.20, 0.40, 0.70, 0.90, 1.30, "2x6"),
("101A", "1608", "0603", 2.80, 0.60, 1.00, 1.10, 1.70, "4x6"),
("102A", "2012", "0805", 3.20, 0.60, 1.50, 1.30, 1.90, "4x8"),
("103A", "3216", "1206", 4.40, 1.20, 1.80, 1.60, 2.80, "4x10"),
("104A", "3225", "1210", 4.40, 1.20, 2.70, 1.60, 2.80, "6x10"),
("105A", "5025", "2010", 6.20, 2.60, 2.70, 1.80, 4.40, "6x14"),
("106A", "6332", "2512", 7.40, 3.80, 3.20, 1.80, 5.60, "8x16"),
)
capc_dimensions = make_dicts(["size_mm", "size_in", "l_min", "l_max", "s_min", "s_max", "w_min", "w_max", "t_min", "t_max", "h_max"],
# Component
# Identifier L S W T H
# (mm) [in] min max min max min max min max max
("1005", "0402", 0.90, 1.10, 0.30, 0.65, 0.40, 0.60, 0.10, 0.30, 0.60),
("1310", "0504", 1.02, 1.32, 0.26, 0.72, 0.77, 1.27, 0.13, 0.38, 1.02),
("1608", "0603", 1.45, 1.75, 0.45, 0.97, 0.65, 0.95, 0.20, 0.50, 0.85),
("2012", "0805", 1.80, 2.20, 0.30, 1.11, 1.05, 1.45, 0.25, 0.75, 1.10),
("3216", "1206", 3.00, 3.40, 1.50, 2.31, 1.40, 1.80, 0.25, 0.75, 1.35),
("3225", "1210", 3.00, 3.40, 1.50, 2.31, 2.30, 2.70, 0.25, 0.75, 1.35),
("4532", "1812", 4.20, 4.80, 2.30, 3.46, 3.00, 3.40, 0.25, 0.95, 1.35),
("4564", "1825", 4.20, 4.80, 2.30, 3.46, 6.00, 6.80, 0.25, 0.95, 1.10),
)
capc_land_patterns = make_dicts(["rlp_no", "size_mm", "size_in", "z", "g", "x", "y", "c", "grid"],
# Component Identifier Y C Placement Grid
# RLP No. (mm) [in] Z G X ref ref (No. of Grid elements)
("130A", "1005", "0402", 2.20, 0.40, 0.70, 0.90, 1.30, "2x6"),
("131A", "1310", "0504", 2.40, 0.40, 1.30, 1.00, 1.40, "4x6"),
("132A", "1608", "0603", 2.80, 0.60, 1.00, 1.10, 1.70, "4x6"),
("133A", "2012", "0805", 3.20, 0.60, 1.50, 1.30, 1.90, "4x8"),
("134A", "3216", "1206", 4.40, 1.20, 1.80, 1.60, 2.80, "4x10"),
("135A", "3225", "1210", 4.40, 1.20, 2.70, 1.60, 2.80, "6x10"),
("136A", "4532", "1812", 5.80, 2.00, 3.40, 1.90, 3.90, "8x12"),
("137A", "4564", "1825", 5.80, 2.00, 6.80, 1.90, 3.90, "14x12"),
)
data = dict(
resc = dict(
dimensions = resc_dimensions,
land_patterns = resc_land_patterns
),
capc = dict(
dimensions = capc_dimensions,
land_patterns = capc_land_patterns
),
)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化