Arch: rebar, add error prints

This commit is contained in:
Bernd Hahnebach
2020-04-07 21:00:48 +02:00
parent f9fc96047d
commit 7d8ab175a6

View File

@@ -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: