Made dogbone resilient to all dressups and profiles.

This commit is contained in:
Markus Lampert
2018-01-21 18:25:15 -08:00
committed by wmayer
parent 0b48c98792
commit d1fa0d1d37

View File

@@ -798,7 +798,7 @@ class ObjectDressup:
side = Side.Right
if hasattr(obj.Base, 'Side') and obj.Base.Side == 'Inside':
side = Side.Left
if obj.Base.Direction == 'CCW':
if hasattr(obj.Base, 'Directin') and obj.Base.Direction == 'CCW':
side = Side.oppositeOf(side)
obj.Side = side
@@ -1044,9 +1044,6 @@ class CommandDressupDogbone:
if not baseObject.isDerivedFrom("Path::Feature"):
FreeCAD.Console.PrintError(translate("Path_DressupDogbone", "The selected object is not a path\n"))
return
if not hasattr(baseObject, "Side") and not hasattr(baseObject, 'Direction'):
FreeCAD.Console.PrintError(translate("Path_DressupDogbone", "Please select a Profile/Contour or Dogbone Dressup object"))
return
# everything ok!
FreeCAD.ActiveDocument.openTransaction(translate("Path_DressupDogbone", "Create Dogbone Dress-up"))