Revert "Merge pull request #214 from ALITTLELZ/prcxi1"

This reverts commit 4595f86725, reversing
changes made to 1340bae838.
This commit is contained in:
zhangshixiang
2026-01-14 15:57:35 +08:00
parent 4595f86725
commit b045ab4e0a
4 changed files with 29 additions and 35 deletions

View File

@@ -592,7 +592,6 @@ def resource_plr_to_ulab(resource_plr: "ResourcePLR", parent_name: str = None, w
"trash": "trash",
"deck": "deck",
"tip_rack": "tip_rack",
"tube_rack": "tube_rack",
"warehouse": "warehouse",
"container": "container",
"tube": "tube",

View File

@@ -333,7 +333,6 @@ class ResourceTreeSet(object):
"well": "well",
"deck": "deck",
"tip_rack": "tip_rack",
"tube_rack": "tube_rack",
"tip_spot": "tip_spot",
"tube": "tube",
"bottle_carrier": "bottle_carrier",
@@ -380,36 +379,33 @@ class ResourceTreeSet(object):
}
# 先构建当前节点的字典不包含children
# 获取category优先从顶层获取如果不存在则从config中获取
category = d.get("category") or d.get("config", {}).get("category", "")
config_dict = {
k: v
for k, v in d.items()
if k
not in [
"name",
"children",
"parent_name",
"location",
"rotation",
"size_x",
"size_y",
"size_z",
"cross_section_type",
"bottom_type",
]
}
r_dict = {
"id": d["name"],
"uuid": current_uuid,
"name": d["name"],
"parent": parent_resource, # 直接传入 ResourceDict 对象
"parent_uuid": parent_uuid, # 使用 parent_uuid 而不是 parent 对象
"type": replace_plr_type(category),
"type": replace_plr_type(d.get("category", "")),
"class": d.get("class", ""),
"position": pos,
"pose": pos,
"config": config_dict,
"config": {
k: v
for k, v in d.items()
if k
not in [
"name",
"children",
"parent_name",
"location",
"rotation",
"size_x",
"size_y",
"size_z",
"cross_section_type",
"bottom_type",
]
},
"data": states[d["name"]],
"extra": extra,
}