Remove temp patch script
CodeQL Analysis / Analyze (python) (push) Failing after 1m14s
Docker Build / Build Docker Image (push) Failing after 9s
Pre-commit Checks / Run Pre-commit Hooks (push) Failing after 4m53s
Tests / Python Tests (push) Failing after 4m53s
Deploy Documentation / deploy (push) Successful in 2m16s
CodeQL Analysis / Analyze (python) (push) Failing after 1m14s
Docker Build / Build Docker Image (push) Failing after 9s
Pre-commit Checks / Run Pre-commit Hooks (push) Failing after 4m53s
Tests / Python Tests (push) Failing after 4m53s
Deploy Documentation / deploy (push) Successful in 2m16s
This commit is contained in:
@@ -1,24 +0,0 @@
|
|||||||
with open("src/freecad_mcp/tools/partdesign.py", "r") as f:
|
|
||||||
c = f.read()
|
|
||||||
|
|
||||||
# Fix pad_sketch: Midplane -> SideType
|
|
||||||
old = '# FC 1.1.1: use Midplane instead of Symmetric\nif "Midplane" in pad.PropertiesList:\n pad.Midplane = {symmetric}\nelif "Symmetric" in pad.PropertiesList:\n pad.Symmetric = {symmetric}'
|
|
||||||
new = '# FC 1.1.1: SideType replaces Midplane/Symmetric\nif "SideType" in pad.PropertiesList:\n pad.SideType = "Symmetric" if {symmetric} else "One side"\nelif "Midplane" in pad.PropertiesList:\n pad.Midplane = {symmetric}\nelif "Symmetric" in pad.PropertiesList:\n pad.Symmetric = {symmetric}'
|
|
||||||
c = c.replace(old, new)
|
|
||||||
print("Pad: SideType applied" if old not in c else "Pad NOT found")
|
|
||||||
|
|
||||||
# Fix revolution_sketch
|
|
||||||
old2 = '# FC 1.1.1: use Midplane instead of Symmetric\nif "Midplane" in rev.PropertiesList:\n rev.Midplane = {symmetric}\nelif "Symmetric" in rev.PropertiesList:\n rev.Symmetric = {symmetric}'
|
|
||||||
new2 = '# FC 1.1.1: SideType replaces Midplane/Symmetric\nif "SideType" in rev.PropertiesList:\n rev.SideType = "Symmetric" if {symmetric} else "One side"\nelif "Midplane" in rev.PropertiesList:\n rev.Midplane = {symmetric}\nelif "Symmetric" in rev.PropertiesList:\n rev.Symmetric = {symmetric}'
|
|
||||||
c = c.replace(old2, new2)
|
|
||||||
print("Rev: SideType applied" if old2 not in c else "Rev NOT found")
|
|
||||||
|
|
||||||
# Fix groove_sketch
|
|
||||||
old3 = '# FC 1.1.1: use Midplane instead of Symmetric\nif "Midplane" in groove.PropertiesList:\n groove.Midplane = {symmetric}\nelif "Symmetric" in groove.PropertiesList:\n groove.Symmetric = {symmetric}'
|
|
||||||
new3 = '# FC 1.1.1: SideType replaces Midplane/Symmetric\nif "SideType" in groove.PropertiesList:\n groove.SideType = "Symmetric" if {symmetric} else "One side"\nelif "Midplane" in groove.PropertiesList:\n groove.Midplane = {symmetric}\nelif "Symmetric" in groove.PropertiesList:\n groove.Symmetric = {symmetric}'
|
|
||||||
c = c.replace(old3, new3)
|
|
||||||
print("Groove: SideType applied" if old3 not in c else "Groove NOT found")
|
|
||||||
|
|
||||||
with open("src/freecad_mcp/tools/partdesign.py", "w") as f:
|
|
||||||
f.write(c)
|
|
||||||
print("Done")
|
|
||||||
Reference in New Issue
Block a user