feat: 完善 Face 参数化编辑和隔离执行

This commit is contained in:
2026-07-31 16:36:05 +08:00
parent 27e4f7236c
commit bb44e3920d
31 changed files with 5428 additions and 252 deletions
+137
View File
@@ -0,0 +1,137 @@
from __future__ import annotations
import subprocess
import sys
from pathlib import Path
PROJECT_ROOT = Path(__file__).resolve().parent.parent
SCRIPT_DIR = PROJECT_ROOT / "scripts"
CASES: tuple[tuple[str, tuple[str, ...]], ...] = (
(
"face width, current face only",
("verify_face_resize_semantics.py", "--strategy", "local", "--axis", "width", "--target-size", "15"),
),
(
"face width, owning feature",
("verify_face_resize_semantics.py", "--strategy", "owning", "--axis", "width", "--target-size", "15"),
),
(
"face height, current face only",
("verify_face_resize_semantics.py", "--strategy", "local", "--axis", "height", "--target-size", "15"),
),
(
"face height, owning feature",
("verify_face_resize_semantics.py", "--strategy", "owning", "--axis", "height", "--target-size", "15"),
),
(
"rectangular face width and height axes stay separate",
("verify_face_rectangular_axes.py",),
),
(
"face area, current face only",
("verify_face_resize_semantics.py", "--property", "area", "--strategy", "local", "--target-area", "144"),
),
(
"face area, owning feature",
("verify_face_resize_semantics.py", "--property", "area", "--strategy", "owning", "--target-area", "144"),
),
(
"face center, current face only",
("verify_face_resize_semantics.py", "--property", "center", "--strategy", "local", "--center-offset", "2,0,3"),
),
(
"face center, owning feature",
("verify_face_resize_semantics.py", "--property", "center", "--strategy", "owning", "--center-offset", "2,0,3"),
),
(
"face offset, push pull",
("verify_face_resize_semantics.py", "--property", "offset", "--strategy", "push_pull", "--offset-distance", "1"),
),
(
"face offset, push pull inward cut",
("verify_face_resize_semantics.py", "--property", "offset", "--strategy", "push_pull", "--offset-distance", "-1"),
),
(
"face offset, inward cut limits",
("verify_face_push_pull_limits.py",),
),
(
"face offset, current face only",
("verify_face_resize_semantics.py", "--property", "offset", "--strategy", "local", "--offset-distance", "1"),
),
(
"face offset, owning feature",
("verify_face_resize_semantics.py", "--property", "offset", "--strategy", "owning", "--offset-distance", "1"),
),
(
"coplanar split faces, push pull as one region",
("verify_face_coplanar_push_pull.py",),
),
(
"coplanar split faces, inward cut as one region",
("verify_face_coplanar_push_pull.py", "--distance", "-1"),
),
(
"holed planar Face disables local-only deformation",
("verify_face_complex_boundary_guard.py",),
),
(
"planar Face on curved Solid disables local-only deformation",
("verify_face_mixed_surface_guard.py",),
),
(
"non-rectangular planar Face local edits",
("verify_face_nonrectangular_local_edit.py",),
),
(
"thin wall thickness, current face and owning feature",
("verify_shell_thickness_resize.py",),
),
(
"thin wall thickness decrease, current face and owning feature",
("verify_shell_thickness_resize.py", "--target-thickness", "1"),
),
(
"property editor keeps generic Face edits out of cylindrical features",
("verify_property_editor_specs.py",),
),
(
"Face edited values read back into property rows",
("verify_face_property_readback.py",),
),
(
"Face logical selection stays on the edited face",
("verify_face_logical_selection_retention.py",),
),
(
"Face invalid positive targets are blocked",
("verify_face_invalid_target_guards.py",),
),
(
"Face extreme positive targets are blocked",
("verify_face_extreme_target_guards.py",),
),
(
"Face no-op plans are blocked",
("verify_face_noop_guards.py",),
),
)
def main() -> int:
for index, (label, command) in enumerate(CASES, start=1):
print(f"\n[{index}/{len(CASES)}] {label}", flush=True)
subprocess.run(
(sys.executable, str(SCRIPT_DIR / command[0]), *command[1:]),
cwd=PROJECT_ROOT,
check=True,
)
print("\nFace edit suite passed.", flush=True)
return 0
if __name__ == "__main__":
raise SystemExit(main())