feat: 扩展Face保持关系编辑语义

This commit is contained in:
2026-08-10 17:50:50 +08:00
parent 61f0b76e59
commit 3a851d0967
8 changed files with 382 additions and 41 deletions
+10
View File
@@ -34,6 +34,8 @@ def _execute(model: StepModel, operation: str, args: list[object]) -> str:
return model.resize_face_area(int(args[0]), float(args[1]))
if operation == "resize_face_size_local":
return model.resize_face_size_local(int(args[0]), float(args[1]), str(args[2]))
if operation == "resize_face_size_local_keep_relations":
return model.resize_face_size_local_keep_relations(int(args[0]), float(args[1]), str(args[2]))
if operation == "resize_face_size_owning_scale":
return model.resize_face_size_owning_scale(int(args[0]), float(args[1]), str(args[2]))
if operation == "move_face_center_local":
@@ -44,6 +46,14 @@ def _execute(model: StepModel, operation: str, args: list[object]) -> str:
int(args[0]),
(float(center[0]), float(center[1]), float(center[2])),
)
if operation == "move_face_center_local_keep_relations":
center = list(args[1])
if len(center) != 3:
raise ValueError("move_face_center_local_keep_relations requires a 3D target center.")
return model.move_face_center_local_keep_relations(
int(args[0]),
(float(center[0]), float(center[1]), float(center[2])),
)
if operation == "resize_shell_thickness":
return model.resize_shell_thickness(int(args[0]), float(args[1]))
if operation == "resize_shell_thickness_owning_scale":