Draft: various cleanup

Mainly added an empty line at the end of each file and changed docstrings.
This commit is contained in:
carlopav
2020-05-12 20:59:17 +02:00
committed by Yorik van Havre
parent 2c4de88132
commit 125d0ca84d
57 changed files with 170 additions and 113 deletions

View File

@@ -184,7 +184,6 @@ class Array(DraftLink):
return super(Array, self).buildShape(obj, pl, pls)
def rectArray(self,pl,xvector,yvector,zvector,xnum,ynum,znum):
import Part
base = [pl.copy()]
for xcount in range(xnum):
currentxvector=App.Vector(xvector).multiply(xcount)
@@ -209,7 +208,6 @@ class Array(DraftLink):
return base
def circArray(self,pl,rdist,tdist,axis,center,cnum,sym):
import Part
sym = max(1, sym)
lead = (0,1,0)
if axis.x == 0 and axis.z == 0: lead = (1,0,0)
@@ -232,7 +230,6 @@ class Array(DraftLink):
def polarArray(self,spl,center,angle,num,axis,axisvector):
#print("angle ",angle," num ",num)
import Part
spin = App.Placement(App.Vector(), spl.Rotation)
pl = App.Placement(spl.Base, App.Rotation())
center = center.sub(spl.Base)
@@ -257,4 +254,4 @@ class Array(DraftLink):
return base
_Array = Array
_Array = Array

View File

@@ -152,4 +152,4 @@ class DraftObject(object):
pass
_DraftObject = DraftObject
_DraftObject = DraftObject

View File

@@ -193,4 +193,4 @@ class BezCurve(DraftObject):
return pn + knot
_BezCurve = BezCurve
_BezCurve = BezCurve

View File

@@ -53,4 +53,4 @@ class Block(DraftObject):
obj.Placement = plm
obj.positionBySupport()
_Block = Block
_Block = Block

View File

@@ -133,4 +133,4 @@ class BSpline(DraftObject):
obj.positionBySupport()
_BSpline = BSpline
_BSpline = BSpline

View File

@@ -95,4 +95,4 @@ class Circle(DraftObject):
obj.positionBySupport()
_Circle = Circle
_Circle = Circle

View File

@@ -128,4 +128,4 @@ class Clone(DraftObject):
return None
_Clone = Clone
_Clone = Clone

View File

@@ -401,5 +401,3 @@ class AngularDimension(DimensionBase):
obj.setEditorMode('Normal',2)
if hasattr(obj,"Support"):
obj.setEditorMode('Support',2)

View File

@@ -38,9 +38,9 @@ from draftobjects.base import DraftObject
class DraftLink(DraftObject):
"""
Documentation needed.
I guess the DraftLink was introduced by Realthunder to allow
the use of new App::Link object into Draft Array objects during
the development of version 0.19.
DraftLink was introduced by Realthunder to allow the use of new
App::Link object into Draft Array objects during version 0.19 development
cycle.
"""
def __init__(self,obj,tp):
@@ -177,4 +177,4 @@ class DraftLink(DraftObject):
'-Immutable' if obj.ExpandArray else 'Immutable')
_DraftLink = DraftLink
_DraftLink = DraftLink

View File

@@ -21,6 +21,7 @@
# * *
# ***************************************************************************
"""This module provides the object code for the Draft DrawingView object.
This module is obsolete, since Drawing was substituted by TechDraw.
"""
## @package drawingview
# \ingroup DRAFT
@@ -34,8 +35,7 @@ import FreeCAD as App
import DraftVecUtils
import getSVG as svg
getSVG = svg.getSVG
from getSVG import getSVG
import draftutils.utils as utils
@@ -45,7 +45,7 @@ from draftobjects.base import DraftObject
class DrawingView(DraftObject):
"""The Draft DrawingView object
TODO: this class is obsolete, since Drawing was substituted by TechDraw.
OBSOLETE: this class is obsolete, since Drawing was substituted by TechDraw.
"""
def __init__(self, obj):
@@ -138,4 +138,4 @@ class DrawingView(DraftObject):
return utils.getDXF(obj)
_DrawingView = DrawingView
_DrawingView = DrawingView

View File

@@ -99,4 +99,4 @@ class Ellipse(DraftObject):
obj.positionBySupport()
_Ellipse = Ellipse
_Ellipse = Ellipse

View File

@@ -123,4 +123,4 @@ class Facebinder(DraftObject):
self.execute(obj)
_Facebinder = Facebinder
_Facebinder = Facebinder

View File

@@ -238,4 +238,4 @@ class Label(DraftAnnotation):
def onChanged(self,obj,prop):
'''Do something when a property has changed'''
return
return

View File

@@ -74,4 +74,4 @@ class Point(DraftObject):
obj.Z.Value)
_Point = Point
_Point = Point

View File

@@ -104,4 +104,4 @@ class PointArray(DraftObject):
obj.Shape = obj.Base.Shape.copy()
_PointArray = PointArray
_PointArray = PointArray

View File

@@ -119,4 +119,4 @@ class Polygon(DraftObject):
obj.positionBySupport()
_Polygon = Polygon
_Polygon = Polygon

View File

@@ -177,4 +177,4 @@ class Rectangle(DraftObject):
obj.positionBySupport()
_Rectangle = Rectangle
_Rectangle = Rectangle

View File

@@ -269,4 +269,4 @@ class Shape2DView(DraftObject):
obj.Placement = pl
_Shape2DView = Shape2DView
_Shape2DView = Shape2DView

View File

@@ -200,4 +200,4 @@ class ShapeString(DraftObject):
return ret
_ShapeString = ShapeString
_ShapeString = ShapeString

View File

@@ -248,4 +248,4 @@ class Wire(DraftObject):
obj.End = displayfpend
_Wire = Wire
_Wire = Wire

View File

@@ -72,4 +72,4 @@ class WorkingPlaneProxy:
def __setstate__(self,state):
if state:
self.Type = state
self.Type = state