Draft: fix trailing whitespace

This commit is contained in:
luzpaz
2023-01-22 14:08:28 +00:00
committed by Uwe
parent 6173d48da7
commit 5fa4482504
21 changed files with 64 additions and 64 deletions

View File

@@ -45,7 +45,7 @@ class BezCurve(DraftObject):
"The points of the Bezier curve")
obj.addProperty("App::PropertyVectorList", "Points", "Draft", _tip)
_tip = QT_TRANSLATE_NOOP("App::Property",
_tip = QT_TRANSLATE_NOOP("App::Property",
"The degree of the Bezier function")
obj.addProperty("App::PropertyInteger", "Degree", "Draft", _tip)
@@ -99,7 +99,7 @@ class BezCurve(DraftObject):
#fp.Continuity = [0]*numsegments
def onChanged(self, fp, prop):
if prop == 'Closed':
if prop == 'Closed':
# if remove the last entry when curve gets opened
oldlen = len(fp.Continuity)
newlen = (len(self._segpoleslst(fp))-1+1*fp.Closed)
@@ -108,15 +108,15 @@ class BezCurve(DraftObject):
if oldlen < newlen:
fp.Continuity = fp.Continuity + [0]*(newlen-oldlen)
if (hasattr(fp,'Closed') and
fp.Closed and
if (hasattr(fp,'Closed') and
fp.Closed and
prop in ['Points','Degree','Closed'] and
len(fp.Points) % fp.Degree):
# the curve editing tools can't handle extra points
fp.Points=fp.Points[:(fp.Degree*(len(fp.Points)//fp.Degree))]
fp.Points=fp.Points[:(fp.Degree*(len(fp.Points)//fp.Degree))]
#for closed curves
if prop in ["Degree"] and fp.Degree >= 1:
if prop in ["Degree"] and fp.Degree >= 1:
self.resetcontinuity(fp)
if prop in ["Points","Degree","Continuity","Closed"]:
@@ -149,7 +149,7 @@ class BezCurve(DraftObject):
if hasattr(fp,"Area") and hasattr(w,"Area"):
fp.Area = w.Area
if hasattr(fp,"Length") and hasattr(w,"Length"):
fp.Length = w.Length
fp.Length = w.Length
fp.Placement = plm
@classmethod

View File

@@ -49,7 +49,7 @@ class BSpline(DraftObject):
"If the B-spline is closed or not")
obj.addProperty("App::PropertyBool","Closed", "Draft", _tip)
_tip = QT_TRANSLATE_NOOP("App::Property",
_tip = QT_TRANSLATE_NOOP("App::Property",
"Create a face if this spline is closed")
obj.addProperty("App::PropertyBool","MakeFace", "Draft",_tip)

View File

@@ -42,7 +42,7 @@ class Circle(DraftObject):
super(Circle, self).__init__(obj, "Circle")
_tip = QT_TRANSLATE_NOOP("App::Property", "Start angle of the arc")
obj.addProperty("App::PropertyAngle", "FirstAngle",
obj.addProperty("App::PropertyAngle", "FirstAngle",
"Draft", _tip)
_tip = QT_TRANSLATE_NOOP("App::Property", "End angle of the arc (for a full circle, \

View File

@@ -56,7 +56,7 @@ class Clone(DraftObject):
"set True for fusion or False for compound")
obj.addProperty("App::PropertyBool", "Fuse",
"Draft", _tip)
obj.Scale = App.Vector(1,1,1)
def join(self,obj,shapes):

View File

@@ -50,27 +50,27 @@ class Polygon(DraftObject):
_tip = QT_TRANSLATE_NOOP("App::Property",
"Radius of the control circle")
obj.addProperty("App::PropertyLength", "Radius", "Draft", _tip)
_tip = QT_TRANSLATE_NOOP("App::Property",
"How the polygon must be drawn from the control circle")
obj.addProperty("App::PropertyEnumeration", "DrawMode", "Draft", _tip)
_tip = QT_TRANSLATE_NOOP("App::Property",
"Radius to use to fillet the corners")
obj.addProperty("App::PropertyLength", "FilletRadius", "Draft", _tip)
_tip = QT_TRANSLATE_NOOP("App::Property",
"Size of the chamfer to give to the corners")
obj.addProperty("App::PropertyLength", "ChamferSize", "Draft", _tip)
_tip = QT_TRANSLATE_NOOP("App::Property",
"Create a face")
obj.addProperty("App::PropertyBool", "MakeFace", "Draft", _tip)
_tip = QT_TRANSLATE_NOOP("App::Property",
"The area of this object")
obj.addProperty("App::PropertyArea", "Area", "Draft", _tip)
obj.MakeFace = get_param("fillmode",True)
obj.DrawMode = ['inscribed','circumscribed']
obj.FacesNumber = 0
@@ -101,7 +101,7 @@ class Polygon(DraftObject):
shape = w
if "FilletRadius" in obj.PropertiesList:
if obj.FilletRadius.Value != 0:
w = DraftGeomUtils.filletWire(shape,
w = DraftGeomUtils.filletWire(shape,
obj.FilletRadius.Value)
if w:
shape = w

View File

@@ -50,22 +50,22 @@ class Rectangle(DraftObject):
_tip = QT_TRANSLATE_NOOP("App::Property", "Radius to use to fillet the corners")
obj.addProperty("App::PropertyLength", "FilletRadius", "Draft", _tip)
_tip = QT_TRANSLATE_NOOP("App::Property", "Size of the chamfer to give to the corners")
obj.addProperty("App::PropertyLength", "ChamferSize", "Draft", _tip)
_tip = QT_TRANSLATE_NOOP("App::Property", "Create a face")
obj.addProperty("App::PropertyBool", "MakeFace", "Draft", _tip)
_tip = QT_TRANSLATE_NOOP("App::Property", "Horizontal subdivisions of this rectangle")
obj.addProperty("App::PropertyInteger", "Rows", "Draft", _tip)
_tip = QT_TRANSLATE_NOOP("App::Property", "Vertical subdivisions of this rectangle")
obj.addProperty("App::PropertyInteger", "Columns", "Draft", _tip)
_tip = QT_TRANSLATE_NOOP("App::Property", "The area of this object")
obj.addProperty("App::PropertyArea", "Area", "Draft", _tip)
obj.MakeFace = get_param("fillmode",True)
obj.Length=1
obj.Height=1
@@ -83,7 +83,7 @@ class Rectangle(DraftObject):
plm = obj.Placement
shape = None
if hasattr(obj,"Rows") and hasattr(obj,"Columns"):
# TODO: verify if this is needed:
if obj.Rows > 1:
@@ -157,7 +157,7 @@ class Rectangle(DraftObject):
shape = Part.Face(shape)
else:
shape = Part.Face(shape)
obj.Shape = shape
if hasattr(obj,"Area") and hasattr(shape,"Area"):

View File

@@ -91,7 +91,7 @@ class Wire(DraftObject):
_tip = QT_TRANSLATE_NOOP("App::Property",
"The area of this object")
obj.addProperty("App::PropertyArea","Area", "Draft",_tip)
obj.MakeFace = get_param("fillmode",True)
obj.Closed = False