feat: 完善 Face 参数化编辑和隔离执行
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
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, ...]], ...] = (
|
||||
(
|
||||
"Edge length auto strategy resolves to local deformation",
|
||||
(
|
||||
"verify_edge_length_resize.py",
|
||||
"--strategy",
|
||||
"auto",
|
||||
"--anchor",
|
||||
"keep-start",
|
||||
"--expect-strategy",
|
||||
"local-edge-only-deform",
|
||||
),
|
||||
),
|
||||
(
|
||||
"Edge length local deformation, fixed start point",
|
||||
("verify_edge_length_resize.py", "--strategy", "local-edge-only-deform", "--anchor", "keep-start"),
|
||||
),
|
||||
(
|
||||
"Edge length local deformation, fixed end point",
|
||||
("verify_edge_length_resize.py", "--strategy", "local-edge-only-deform", "--anchor", "keep-end"),
|
||||
),
|
||||
(
|
||||
"Edge length local deformation, fixed center",
|
||||
("verify_edge_length_resize.py", "--strategy", "local-edge-only-deform", "--anchor", "center"),
|
||||
),
|
||||
(
|
||||
"Edge length move end plane, fixed start point",
|
||||
("verify_edge_length_resize.py", "--strategy", "move-edge-end-plane-by-push-pull", "--anchor", "keep-start"),
|
||||
),
|
||||
(
|
||||
"Edge length move end plane, fixed end point",
|
||||
("verify_edge_length_resize.py", "--strategy", "move-edge-end-plane-by-push-pull", "--anchor", "keep-end"),
|
||||
),
|
||||
(
|
||||
"Edge length scale owning object, fixed start point",
|
||||
("verify_edge_length_resize.py", "--strategy", "scale-owning-shape-from-edge", "--anchor", "keep-start"),
|
||||
),
|
||||
(
|
||||
"Edge length scale owning object, fixed end point",
|
||||
("verify_edge_length_resize.py", "--strategy", "scale-owning-shape-from-edge", "--anchor", "keep-end"),
|
||||
),
|
||||
(
|
||||
"Edge length scale owning object, fixed center",
|
||||
("verify_edge_length_resize.py", "--strategy", "scale-owning-shape-from-edge", "--anchor", "center"),
|
||||
),
|
||||
(
|
||||
"Edge fillet, chamfer, asymmetric chamfer, distance-angle chamfer and existing fillet resize",
|
||||
("verify_edge_round_chamfer.py",),
|
||||
),
|
||||
(
|
||||
"Ellipse Edge major and minor radius resize",
|
||||
("verify_ellipse_edge_resize.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("\nEdge edit suite passed.", flush=True)
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in New Issue
Block a user