diff --git a/src/Mod/Arch/ArchFence.py b/src/Mod/Arch/ArchFence.py index 4ed6e27696..023bb3f741 100644 --- a/src/Mod/Arch/ArchFence.py +++ b/src/Mod/Arch/ArchFence.py @@ -180,7 +180,7 @@ class _Fence(ArchComponent.Component): def clipSection(self, shape, length, clipLength): import Part - + boundBox = shape.BoundBox lengthToCut = length - clipLength halfLengthToCut = lengthToCut / 2 @@ -259,10 +259,10 @@ class _CommandFence: post = sel[1] path = sel[2] - buildFence(section, post, path) + makeFence(section, post, path) -def buildFence(section, post, path): +def makeFence(section, post, path): obj = FreeCAD.ActiveDocument.addObject( 'Part::FeaturePython', 'Fence') @@ -280,6 +280,8 @@ def buildFence(section, post, path): FreeCAD.ActiveDocument.recompute() + return obj + def hide(obj): if hasattr(obj, 'ViewObject') and obj.ViewObject: @@ -336,4 +338,4 @@ if __name__ == '__main__': path = buildPath() post = buildPost() - buildFence(section, post, path) + print(makeFence(section, post, path))