Fix use of Sketch as a Base for Arch Structure extruded along a Tool

See: https://forum.freecadweb.org/viewtopic.php?f=23&t=43228

It fixes the following issue:
Allow the use of sketches for Structure which follow a Tool. Currently, sketches are only accepted as structure Base when there is no Tool set. If I select the sketch and press the Structure button, the structure is computed correctly. But when I set the Tool property, the message "Structure has no solid" is reported and the Structure is not updated.
This commit is contained in:
alafr
2020-02-13 08:00:22 +01:00
committed by Yorik van Havre
parent 25a2837bbe
commit 6ae04900b9

View File

@@ -672,7 +672,7 @@ class _Structure(ArchComponent.Component):
extv = pla[0].Rotation.multVec(evi)
if obj.Tool:
try:
shi = obj.Tool.Shape.copy().makePipe(obj.Base.Shape.copy())
shi = obj.Tool.Shape.copy().makePipe(shi)
except Part.OCCError:
FreeCAD.Console.PrintError(translate("Arch","Error: The base shape couldn't be extruded along this tool object")+"\n")
return