feat: 完善Face保持关系守门与大模型预判
This commit is contained in:
+16
-1
@@ -729,6 +729,14 @@ class StepModel(FeatureMixin, ExportMixin, TransformMixin, OperationMixin, Polyd
|
||||
center=_tuple_or_none(info.get("area_center")),
|
||||
)
|
||||
)
|
||||
try:
|
||||
info.update(self.face_first_level_topology(face_id))
|
||||
info.update(self.face_first_level_facts(face_id, scope="face"))
|
||||
except Exception as exc:
|
||||
info.setdefault("topology_relation_status", "unavailable")
|
||||
info.setdefault("topology_relation_message", str(exc))
|
||||
info.setdefault("first_level_planar_relation_status", "unavailable")
|
||||
info.setdefault("first_level_planar_relation_summary", str(exc))
|
||||
elif surface_type == GeomAbs_Cylinder:
|
||||
cyl = surf.Cylinder()
|
||||
axis = cyl.Axis()
|
||||
@@ -1737,6 +1745,12 @@ class StepModel(FeatureMixin, ExportMixin, TransformMixin, OperationMixin, Polyd
|
||||
) -> dict[str, object]:
|
||||
if info.get("surface") != "plane":
|
||||
return {}
|
||||
boundary_edge_ids = self._face_boundary_edge_ids(face_id)
|
||||
inner_boundary_wires = int(info.get("inner_boundary_wires", 0) or 0)
|
||||
if inner_boundary_wires > 1:
|
||||
return {}
|
||||
if inner_boundary_wires == 1 and len(boundary_edge_ids) < 6:
|
||||
return {}
|
||||
if str(prismatic_info.get("prismatic_feature_semantics") or "") in {"additive-boss", "subtractive-pocket"}:
|
||||
return {}
|
||||
try:
|
||||
@@ -1748,7 +1762,6 @@ class StepModel(FeatureMixin, ExportMixin, TransformMixin, OperationMixin, Polyd
|
||||
except Exception:
|
||||
return {}
|
||||
|
||||
boundary_edge_ids = self._face_boundary_edge_ids(face_id)
|
||||
adjacent_face_ids = sorted(set(self._adjacent_face_ids_for_edges(boundary_edge_ids, face_id)) - {face_id})
|
||||
if len(adjacent_face_ids) < 6:
|
||||
return {}
|
||||
@@ -2340,6 +2353,8 @@ class StepModel(FeatureMixin, ExportMixin, TransformMixin, OperationMixin, Polyd
|
||||
shell_info: dict[str, object],
|
||||
prismatic_info: dict[str, object],
|
||||
) -> dict[str, object]:
|
||||
if bool(info.get("has_inner_boundaries")) or int(info.get("inner_boundary_wires", 0) or 0) > 0:
|
||||
return {}
|
||||
try:
|
||||
solid_id = int(info.get("solid_id", -1))
|
||||
except (TypeError, ValueError):
|
||||
|
||||
Reference in New Issue
Block a user