feat: 推进SCDM-first后端接入和大模型编辑优化

This commit is contained in:
2026-08-19 10:28:09 +08:00
parent 722256a41f
commit a3eb7e2476
28 changed files with 9666 additions and 168 deletions
+23 -3
View File
@@ -11298,6 +11298,11 @@ class OperationMixin:
return None
source_plane = source_surf.Plane()
cap_plane_point = source_plane.Location()
try:
if len(_explore(self.faces[face_id], TopAbs_WIRE)) > 2:
return None
except Exception:
pass
try:
scope_face_ids = self._connected_coplanar_planar_face_ids(face_id) or [face_id]
except Exception:
@@ -11342,14 +11347,29 @@ class OperationMixin:
continue
center_axis_distance = _point_axis_distance(axis_point, axis_dir, cap_center)
axis_range = self._cylindrical_axis_range(adjacent_id, side_surf)
v_min = float(axis_range["v_min"])
v_max = float(axis_range["v_max"])
source_v_min = min(float(side_surf.FirstVParameter()), float(side_surf.LastVParameter()))
source_v_max = max(float(side_surf.FirstVParameter()), float(side_surf.LastVParameter()))
axis_range = {
"v_min": source_v_min,
"v_max": source_v_max,
"same_domain_face_ids": (adjacent_id,),
"range_source": "selected-face-v-range-fast",
}
v_min = source_v_min
v_max = source_v_max
old_height = max(v_max - v_min, 1e-9)
cap_parameter = _axis_parameter(axis_point, axis_dir, cap_plane_point)
start_distance = abs(cap_parameter - v_min)
end_distance = abs(cap_parameter - v_max)
end_tolerance = max(old_height * 0.05, radius * 0.2, tolerance * 10.0, 0.05)
if start_distance > end_tolerance and end_distance > end_tolerance:
axis_range = self._cylindrical_axis_range(adjacent_id, side_surf)
v_min = float(axis_range["v_min"])
v_max = float(axis_range["v_max"])
old_height = max(v_max - v_min, 1e-9)
start_distance = abs(cap_parameter - v_min)
end_distance = abs(cap_parameter - v_max)
end_tolerance = max(old_height * 0.05, radius * 0.2, tolerance * 10.0, 0.05)
delta_abs = abs(float(distance))
operation = "extend" if distance > 0 else "retract"