feat: 完善 Face 一级关系编辑和稳定性
This commit is contained in:
@@ -33,15 +33,19 @@ def _execute(model: StepModel, operation: str, args: list[object]) -> str:
|
||||
return model.resize_shell_thickness(int(args[0]), float(args[1]))
|
||||
if operation == "resize_shell_thickness_owning_scale":
|
||||
return model.resize_shell_thickness_owning_scale(int(args[0]), float(args[1]))
|
||||
if operation == "resize_cone_reference_radius":
|
||||
return model.resize_conical_reference_radius(int(args[0]), float(args[1]))
|
||||
if operation == "resize_cone_semi_angle":
|
||||
return model.resize_conical_semi_angle(int(args[0]), float(args[1]))
|
||||
if operation == "resize_sphere_radius":
|
||||
return model.resize_spherical_radius(int(args[0]), float(args[1]))
|
||||
if operation == "resize_torus_radius":
|
||||
return model.resize_toroidal_radius(int(args[0]), float(args[1]), str(args[2]))
|
||||
raise ValueError(f"Unsupported isolated edit operation: {operation}")
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser(description="Run one high-risk geometry edit in an isolated process.")
|
||||
parser.add_argument("request", help="JSON request file.")
|
||||
parsed = parser.parse_args()
|
||||
|
||||
request_path = Path(parsed.request)
|
||||
def run_request(request: str | Path) -> int:
|
||||
request_path = Path(request)
|
||||
response_path = request_path.with_suffix(".response.json")
|
||||
try:
|
||||
request = json.loads(request_path.read_text(encoding="utf-8-sig"))
|
||||
@@ -83,5 +87,12 @@ def main() -> int:
|
||||
return 2
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser(description="Run one high-risk geometry edit in an isolated process.")
|
||||
parser.add_argument("request", help="JSON request file.")
|
||||
parsed = parser.parse_args()
|
||||
return run_request(parsed.request)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
|
||||
Reference in New Issue
Block a user