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

@@ -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")