feat: close builder mutation and roundtrip evidence gaps

This commit is contained in:
2026-08-10 21:27:42 -04:00
parent 3907f50ff1
commit 26ea9b57d7
49 changed files with 5797 additions and 687 deletions

View File

@@ -2,6 +2,8 @@ import json
import FreeCAD as App
from freecad_mutation_evidence import capture_property_mutation
def version_text():
return ".".join(str(value) for value in App.Version()[:3])
@@ -38,7 +40,9 @@ def selected_fillet():
feature = body.newObject("PartDesign::Fillet", "Fillet")
feature.Base = (box, ["Edge1"])
feature.Radius = 1
mutation = capture_property_mutation(document, feature, "Radius", 0.5)
result = shape_result("fillet-selected-edge", document, feature)
result["mutation"] = mutation
result["selection"] = ["Edge1"]
App.closeDocument(document.Name)
return result
@@ -49,7 +53,9 @@ def selected_chamfer():
feature = body.newObject("PartDesign::Chamfer", "Chamfer")
feature.Base = (box, ["Edge1"])
feature.Size = 1
mutation = capture_property_mutation(document, feature, "Size", 0.5)
result = shape_result("chamfer-selected-edge", document, feature)
result["mutation"] = mutation
result["selection"] = ["Edge1"]
App.closeDocument(document.Name)
return result
@@ -76,7 +82,9 @@ def selected_draft():
document.recompute()
if "Invalid" in feature.State:
feature.Reversed = False
mutation = capture_property_mutation(document, feature, "Angle", 30.0)
result = shape_result("draft-selected-face", document, feature)
result["mutation"] = mutation
result["selection"] = ["Face{}".format(top_face + 1)]
result["reversed"] = bool(feature.Reversed)
App.closeDocument(document.Name)
@@ -91,7 +99,9 @@ def selected_thickness():
feature.Reversed = True
feature.Mode = 0
feature.Join = 0
mutation = capture_property_mutation(document, feature, "Value", 0.8)
result = shape_result("thickness-selected-face", document, feature)
result["mutation"] = mutation
result["selection"] = ["Face1"]
result["reversed"] = bool(feature.Reversed)
result["elementMapSize"] = int(feature.Shape.ElementMapSize)