feat: extend ordered pair evidence through common
Some checks failed
real-verification / chrome (push) Has been cancelled
real-verification / freecad-oracle (push) Has been cancelled
real-verification / wasm (push) Has been cancelled

This commit is contained in:
2026-08-15 10:37:35 -04:00
parent 378a6e7c0a
commit 1ee55b1338
7 changed files with 13195 additions and 351 deletions

View File

@@ -205,6 +205,15 @@ def collect_rejected():
"sections": [{"name": item.Name, "typeId": item.TypeId} for item in feature.Sections],
"spine": link_snapshot(feature.Spine),
}
elif operation == "revolution":
feature = document.addObject("Part::Revolution", "PairResult")
feature.Source = source
feature.Axis = App.Vector(0.0, 1.0, 0.0)
feature.Base = App.Vector(-1.0, 0.0, 0.0)
feature.Angle = 360.0
feature.Solid = True
diagnostic["parameter"] = {"name": "angle", "value": round(float(feature.Angle), 7)}
diagnostic["input"] = link_snapshot(feature.Source)
else:
raise RuntimeError("Unsupported rejected ordered-pair operation: " + operation)
diagnostic["nativeTypeId"] = feature.TypeId
@@ -248,8 +257,8 @@ def collect_rejected():
or "Error" in diagnostic["state"]
or "Invalid" in diagnostic["state"]
)
expected_type_id = {"pad": "PartDesign::Pad", "loft": "Part::Loft", "pipe": "Part::Sweep"}[operation]
input_names = [diagnostic.get("input", {}).get("name")] if operation == "pad" else [item["name"] for item in diagnostic.get("input", {}).get("sections", [])]
expected_type_id = {"pad": "PartDesign::Pad", "loft": "Part::Loft", "pipe": "Part::Sweep", "revolution": "Part::Revolution"}[operation]
input_names = [diagnostic.get("input", {}).get("name")] if operation in ("pad", "revolution") else [item["name"] for item in diagnostic.get("input", {}).get("sections", [])]
checks = {
"nativeFeatureConstructed": diagnostic.get("nativeTypeId") == expected_type_id,
"fuseSolidUsedAsInput": source_name in input_names and diagnostic.get("inputShape", {}).get("solids") == 1,