feat: 增强一级关系识别与保持关系策略
This commit is contained in:
@@ -80,6 +80,7 @@ def _assert_common_facts(facts: dict[str, object], label: str) -> None:
|
||||
ignored = tuple(facts.get("first_level_fact_ignored_relation_depths", ()) or ())
|
||||
_assert("second-level" in ignored and "third-level" in ignored, f"{label}: ignored depths are missing")
|
||||
_assert(str(facts.get("first_level_fact_summary") or ""), f"{label}: summary is missing")
|
||||
_assert("first_level_planar_relation_summary" in facts, f"{label}: planar relation summary is missing")
|
||||
|
||||
|
||||
def _assert_plan_facts(plan: dict[str, object], label: str, scope: str) -> None:
|
||||
@@ -104,6 +105,22 @@ def _verify_planar_face_facts() -> None:
|
||||
_assert(int(facts.get("first_level_fact_boundary_vertex_count", 0) or 0) == 4, f"cube vertex count: {facts}")
|
||||
_assert(int(facts.get("first_level_fact_adjacent_face_count", 0) or 0) == 4, f"cube adjacent count: {facts}")
|
||||
_assert(int(facts.get("first_level_fact_included_face_count", 0) or 0) == 5, f"cube included count: {facts}")
|
||||
_assert(
|
||||
facts.get("first_level_planar_relation_status") == "ready",
|
||||
f"cube planar Face should expose planar relation facts: {facts}",
|
||||
)
|
||||
_assert(
|
||||
int(facts.get("first_level_planar_relation_count", 0) or 0) == 4,
|
||||
f"cube top Face should have four subject-adjacent planar relations: {facts}",
|
||||
)
|
||||
_assert(
|
||||
int(facts.get("first_level_planar_relation_perpendicular_count", 0) or 0) == 4,
|
||||
f"cube top Face should have four perpendicular adjacent side Faces: {facts}",
|
||||
)
|
||||
_assert(
|
||||
"一级平面关系" in str(facts.get("first_level_fact_summary") or ""),
|
||||
f"cube planar Face fact summary should include planar relation facts: {facts}",
|
||||
)
|
||||
|
||||
probe = _FactProbe(model)
|
||||
fields = probe._face_first_level_selection_fields(face_id)
|
||||
|
||||
Reference in New Issue
Block a user