feat: 接入 SCDM 优先编辑闭环并支持阵列局部间距
接入 SCDM probe/edit/cache/校验链路,增强孔组、阵列、关系式和参数表交互。 支持阵列相邻段间距、移动意图切换、结果回滚校验,并补充对应回归脚本。
This commit is contained in:
@@ -229,17 +229,34 @@ class StepModel(FeatureMixin, ExportMixin, TransformMixin, OperationMixin, Polyd
|
||||
def scdm_local_face_signatures(self) -> list[dict[str, object]]:
|
||||
"""Return cheap geometry hints used to map SCDM raw objects back to local Face IDs."""
|
||||
signatures: list[dict[str, object]] = []
|
||||
face_ordinal_by_solid: dict[int, int] = {}
|
||||
for face_id, face in enumerate(self.faces):
|
||||
try:
|
||||
surf = BRepAdaptor_Surface(face)
|
||||
surface_type = surf.GetType()
|
||||
except Exception:
|
||||
continue
|
||||
solid_id = int(self.face_solid_ids[face_id]) if face_id < len(self.face_solid_ids) else -1
|
||||
part_id = int(self.face_part_ids[face_id]) if face_id < len(self.face_part_ids) else -1
|
||||
face_ordinal = face_ordinal_by_solid.get(solid_id, 0)
|
||||
face_ordinal_by_solid[solid_id] = face_ordinal + 1
|
||||
signature: dict[str, object] = {
|
||||
"faceId": int(face_id),
|
||||
"logicalFaceId": self.face_logical_id(face_id),
|
||||
"partId": part_id,
|
||||
"solidId": solid_id,
|
||||
"bodyIndex": solid_id,
|
||||
"faceOrdinal": face_ordinal,
|
||||
"globalFaceOrdinal": int(face_id),
|
||||
"surfaceType": SURFACE_TYPES.get(surface_type, f"type {surface_type}"),
|
||||
}
|
||||
try:
|
||||
bounds = _shape_bounds_info(face)
|
||||
signature["bboxMin"] = bounds.get("bbox_min")
|
||||
signature["bboxMax"] = bounds.get("bbox_max")
|
||||
signature["bboxSize"] = bounds.get("bbox_size")
|
||||
except Exception:
|
||||
pass
|
||||
try:
|
||||
if surface_type == GeomAbs_Plane:
|
||||
plane = surf.Plane()
|
||||
|
||||
Reference in New Issue
Block a user