The recompute and the `try` structure are no longer required.
This commit is contained in:
Roy-043
2025-01-15 21:32:51 +01:00
committed by Yorik van Havre
parent e7e41bb001
commit 3385ac8a74

View File

@@ -608,11 +608,8 @@ class _Wall(ArchComponent.Component):
#print "modifying p2"
obj.Base.End = p2
elif Draft.getType(obj.Base) in ["Sketcher::SketchObject", "ArchSketch"]:
try:
obj.Base.recompute() # Fix for the 'GeoId index out range' error.
obj.Base.moveGeometry(0, 2, obj.Base.Placement.inverse().multVec(p2))
except Exception: # This 'GeoId index out range' error should no longer occur.
print("Debug: The base sketch of this wall could not be changed, because the sketch has not been edited yet in this session (this is a bug in FreeCAD). Try entering and exiting edit mode in this sketch first, and then changing the wall length should work.")
# obj.Base.recompute() # Fix for the 'GeoId index out range' error. Not required in V1.1.
obj.Base.moveGeometry(0, 2, obj.Base.Placement.inverse().multVec(p2))
else:
FreeCAD.Console.PrintError(translate("Arch","Error: Unable to modify the base object of this wall")+"\n")