From b2d78ee95a85ffd3288b122b321b5d02ee372d89 Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Tue, 7 Apr 2020 21:00:48 +0200 Subject: [PATCH] Arch: rebar, add error prints --- src/Mod/Arch/ArchRebar.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/Mod/Arch/ArchRebar.py b/src/Mod/Arch/ArchRebar.py index 7786f39eef..9ce7aceb00 100644 --- a/src/Mod/Arch/ArchRebar.py +++ b/src/Mod/Arch/ArchRebar.py @@ -301,15 +301,35 @@ class _Rebar(ArchComponent.Component): if self.clone(obj): return if not obj.Base: + FreeCAD.Console.PrintError( + "No Base, return without a rebar shape for {}.\n" + .format(obj.Name) + ) return if not obj.Base.Shape: + FreeCAD.Console.PrintError( + "No Shape in Base, return without a rebar shape for {}.\n" + .format(obj.Name) + ) return if not obj.Base.Shape.Wires: + FreeCAD.Console.PrintError( + "No Wires in Shape of Base, return without a rebar shape for {}.\n" + .format(obj.Name) + ) return if not obj.Diameter.Value: + FreeCAD.Console.PrintError( + "No Diameter Value, return without a rebar shape for {}.\n" + .format(obj.Name) + ) return if not obj.Amount: return + FreeCAD.Console.PrintError( + "No Amount, return without a rebar shape for {}.\n" + .format(obj.Name) + ) father = obj.Host fathershape = None if not father: