feat: 完善 STEP/B-Rep 一级关系参数化编辑

This commit is contained in:
2026-08-07 18:08:32 +08:00
parent eef9efcc1e
commit 12250603dd
26 changed files with 4254 additions and 1270 deletions
+12 -12
View File
@@ -374,7 +374,7 @@ def main() -> int:
input_path=hollow_path,
)
_run_worker_case(
label="偏移变换(局部重建)",
label="偏移(局部重建)",
operation="move_face_plane_offset_local",
args=[0, 10.0],
validator=_assert_plane_position,
@@ -392,25 +392,25 @@ def main() -> int:
validator=lambda label, model: _assert_face_area(label, model, 400.0),
)
_run_worker_case(
label="U向尺寸(局部重建)",
label="面内长度(局部重建)",
operation="resize_face_size_local",
args=[0, 25.0, "width"],
validator=_assert_face_width,
)
_run_worker_case(
label="V向尺寸(局部重建)",
label="面内宽度(局部重建)",
operation="resize_face_size_local",
args=[0, 25.0, "height"],
validator=_assert_face_height,
)
_run_worker_case(
label="U向尺寸(缩放特征)",
label="面内长度(缩放特征)",
operation="resize_face_size_owning_scale",
args=[0, 25.0, "width"],
validator=lambda label, model: _assert_face_width(label, model, 25.0),
)
_run_worker_case(
label="V向尺寸(缩放特征)",
label="面内宽度(缩放特征)",
operation="resize_face_size_owning_scale",
args=[0, 25.0, "height"],
validator=lambda label, model: _assert_face_height(label, model, 25.0),
@@ -534,16 +534,16 @@ def main() -> int:
delattr(sys, "frozen")
for title in (
"U向尺寸(局部重建)",
"V向尺寸(局部重建)",
"U向尺寸(缩放特征)",
"V向尺寸(缩放特征)",
"面内长度(局部重建)",
"面内宽度(局部重建)",
"面内长度(缩放特征)",
"面内宽度(缩放特征)",
"壳体厚度(缩放特征)缩放所属对象",
):
if not probe._quick_edit_title_supports_isolation(title):
raise SystemExit(f"{title}: quick edit title should support isolated execution")
context = {
"operation_name": "U向尺寸(局部重建)",
"operation_name": "面内长度(局部重建)",
"target": "Face 0",
"parameters": {"part_id": 1, "face_id": 0},
"target_kind": "face",
@@ -596,7 +596,7 @@ def main() -> int:
owning_result = owning_probe._run_isolated_edit_job(
context={
**context,
"operation_name": "U向尺寸(缩放特征)",
"operation_name": "面内长度(缩放特征)",
},
isolation=owning_isolation,
snapshot=owning_probe.model.snapshot(),
@@ -616,7 +616,7 @@ def main() -> int:
raise SystemExit("isolated owning window job replaced the window model before returning to the UI thread")
if owning_result.get("model_polydata") is None or owning_result.get("edge_polydata") is None:
raise SystemExit("isolated owning window job should return prebuilt display polydata")
_assert_face_width("U向尺寸(整体窗口任务)", owning_after_model, 25.0)
_assert_face_width("面内长度(整体窗口任务)", owning_after_model, 25.0)
if not _logical_region_has_width(owning_after_model, 0, 25.0):
raise SystemExit("isolated owning window job did not preserve the original logical Face ID on the edited width")
print("isolated owning window job ok")