Draft: Housekeeping: call 'make' functions with new name (3)

This commit is contained in:
Roy
2022-02-13 11:01:15 +01:00
parent 2a79ce4bdc
commit effd40ec99
14 changed files with 30 additions and 30 deletions

View File

@@ -37,9 +37,9 @@ if App.GuiUp:
from draftviewproviders.view_point import ViewProviderPoint
def make_point(X=0, Y=0, Z=0, color=None, name = "Point", point_size= 5):
""" makePoint(x,y,z ,[color(r,g,b),point_size]) or
makePoint(Vector,color(r,g,b),point_size]) -
def make_point(X=0, Y=0, Z=0, color=None, name="Point", point_size=5):
""" make_point(x, y, z, [color(r, g, b), point_size]) or
make_point(Vector, color(r, g, b), point_size])
Creates a Draft Point in the current document.

View File

@@ -38,7 +38,7 @@ if App.GuiUp:
def make_rectangle(length, height=0, placement=None, face=None, support=None):
"""makeRectangle(length, width, [placement], [face])
"""make_rectangle(length, width, [placement], [face])
Creates a Rectangle object with length in X direction and height in Y
direction.
@@ -49,13 +49,13 @@ def make_rectangle(length, height=0, placement=None, face=None, support=None):
placement : Base.Placement
If a placement is given, it is used.
face : Bool
If face is False, the rectangle is shown as a wireframe,
If face is False, the rectangle is shown as a wireframe,
otherwise as a face.
Rectangles can also be constructed by giving them a list of four vertices
as first argument: makeRectangle(list_of_vertices,face=...)
as first argument: make_rectangle(list_of_vertices, face=...)
but you are responsible to check yourself that these 4 vertices are ordered
and actually form a rectangle, otherwise the result might be wrong. Placement
is ignored when constructing a rectangle this way (face argument is kept).
@@ -70,9 +70,9 @@ def make_rectangle(length, height=0, placement=None, face=None, support=None):
xv = verts[1].sub(verts[0])
yv = verts[3].sub(verts[0])
zv = xv.cross(yv)
rr = App.Rotation(xv,yv,zv,"XYZ")
rp = App.Placement(verts[0],rr)
return makeRectangle(xv.Length,yv.Length,rp,face,support)
rr = App.Rotation(xv, yv, zv, "XYZ")
rp = App.Placement(verts[0], rr)
return make_rectangle(xv.Length, yv.Length, rp, face, support)
if placement:
utils.type_check([(placement,App.Placement)], "make_rectangle")

View File

@@ -37,7 +37,7 @@ if App.GuiUp:
def make_shape2dview(baseobj,projectionVector=None,facenumbers=[]):
"""makeShape2DView(object, [projectionVector], [facenumbers])
"""make_shape2dview(object, [projectionVector], [facenumbers])
Add a 2D shape to the document, which is a 2D projection of the given object.

View File

@@ -40,8 +40,8 @@ from draftutils.translate import translate
def make_sketch(objects_list, autoconstraints=False, addTo=None,
delete=False, name="Sketch", radiusPrecision=-1, tol=1e-3):
"""makeSketch(objects_list,[autoconstraints],[addTo],[delete],
[name],[radiusPrecision],[tol])
"""make_sketch(objects_list, [autoconstraints], [addTo], [delete],
[name], [radiusPrecision], [tol])
Makes a Sketch objects_list with the given Draft objects.

View File

@@ -38,7 +38,7 @@ if App.GuiUp:
def make_wire(pointslist, closed=False, placement=None, face=None, support=None, bs2wire=False):
"""makeWire(pointslist,[closed],[placement])
"""make_wire(pointslist, [closed], [placement])
Creates a Wire object from the given list of vectors. If face is
true (and wire is closed), the wire will appear filled. Instead of