Modules with functions to create the custom scripted objects. More...

Namespaces

namespace  make_arc_3points
 Provides functions to create Arc objects by using 3 points.
 
namespace  make_array
 Provides functions to create Array objects.
 
namespace  make_bezcurve
 Provides functions to create BezCurve objects.
 
namespace  make_block
 Provides functions to create Block objects.
 
namespace  make_bspline
 Provides functions to create BSpline objects.
 
namespace  make_circle
 Provides functions to create Circle objects.
 
namespace  make_circulararray
 Provides functions to create circular Array objects.
 
namespace  make_clone
 Provides functions to create Clone objects.
 
namespace  make_copy
 Provides functions to create copies of objects.
 
namespace  make_dimension
 Provides functions to create Linear or AngularDimension objects.
 
namespace  make_drawingview
 Provides functions to create DrawingView objects.
 
namespace  make_ellipse
 Provides functions to create Ellipse objects.
 
namespace  make_facebinder
 Provides functions to create Facebinder objects.
 
namespace  make_fillet
 Provides functions to create Fillet objects between two lines.
 
namespace  make_label
 Provides functions to create Label objects.
 
namespace  make_layer
 Provides functions to create Layer objects.
 
namespace  make_line
 Provides functions to create two-point Wire objects.
 
namespace  make_orthoarray
 Provides functions to create orthogonal 2D and 3D Arrays.
 
namespace  make_patharray
 Provides functions to create PathArray objects.
 
namespace  make_point
 Provides functions to create Point objects.
 
namespace  make_pointarray
 Provides functions to create PointArray objects.
 
namespace  make_polararray
 Provides functions to create polar Array objects.
 
namespace  make_polygon
 Provides functions to create Polygon objects.
 
namespace  make_rectangle
 This module provides the code for Draft make_rectangle function.
 
namespace  make_shape2dview
 Provides functions to create Shape2DView objects.
 
namespace  make_shapestring
 Provides functions to create ShapeString objects.
 
namespace  make_sketch
 Provides functions to create Sketch objects from Draft objects.
 
namespace  make_text
 Provides functions to create Text objects.
 
namespace  make_wire
 Provides functions to create multipoint Wire objects.
 
namespace  make_wpproxy
 Provides functions to create WorkingPlaneProxy objects.
 

Functions

def draftmake.make_text.convert_draft_texts (textslist=None)
 
def draftmake.make_text.convertDraftTexts (textslist=[])
 
def draftmake.make_layer.get_layer_container ()
 
def draftmake.make_layer.getLayerContainer ()
 
def draftmake.make_dimension.make_angular_dimension (center=App.Vector(0, 0, 0), angles=None, dim_line=App.Vector(10, 10, 0), normal=None)
 
def draftmake.make_arc_3points.make_arc_3points (points, placement=None, face=False, support=None, map_mode="Deactivated", primitive=False)
 
def draftmake.make_array.make_array (base_object, arg1, arg2, arg3, arg4=None, arg5=None, arg6=None, use_link=True)
 
def draftmake.make_bezcurve.make_bezcurve (pointslist, closed=False, placement=None, face=None, support=None, degree=None)
 
def draftmake.make_block.make_block (objectslist)
 
def draftmake.make_bspline.make_bspline (pointslist, closed=False, placement=None, face=None, support=None)
 
def draftmake.make_circle.make_circle (radius, placement=None, face=None, startangle=None, endangle=None, support=None)
 
def draftmake.make_circulararray.make_circular_array (base_object, r_distance=100, tan_distance=50, number=3, symmetry=1, axis=App.Vector(0, 0, 1), center=App.Vector(0, 0, 0), use_link=True)
 
def draftmake.make_clone.make_clone (obj, delta=None, forcedraft=False)
 
def draftmake.make_copy.make_copy (obj, force=None, reparent=False, simple_copy=False)
 
def draftmake.make_dimension.make_dimension (p1, p2, p3=None, p4=None)
 
def draftmake.make_drawingview.make_drawing_view (obj, page, lwmod=None, tmod=None, otherProjection=None)
 
def draftmake.make_ellipse.make_ellipse (majradius, minradius, placement=None, face=None, support=None)
 
def draftmake.make_facebinder.make_facebinder (selectionset, name="Facebinder")
 
def draftmake.make_fillet.make_fillet (objs, radius=100, chamfer=False, delete=False)
 
def draftmake.make_label.make_label (target_point=App.Vector(0, 0, 0), placement=App.Vector(30, 30, 0), target_object=None, subelements=None, label_type="Custom", custom_text="Label", direction="Horizontal", distance=-10, points=None)
 
def draftmake.make_layer.make_layer (name=None, line_color=None, shape_color=None, line_width=2.0, draw_style="Solid", transparency=0)
 
def draftmake.make_line.make_line (first_param, last_param=None)
 
def draftmake.make_dimension.make_linear_dimension (p1, p2, dim_line=None)
 
def draftmake.make_dimension.make_linear_dimension_obj (edge_object, i1=1, i2=2, dim_line=None)
 
def draftmake.make_orthoarray.make_ortho_array (base_object, v_x=App.Vector(10, 0, 0), v_y=App.Vector(0, 10, 0), v_z=App.Vector(0, 0, 10), n_x=2, n_y=2, n_z=1, use_link=True)
 
def draftmake.make_orthoarray.make_ortho_array2d (base_object, v_x=App.Vector(10, 0, 0), v_y=App.Vector(0, 10, 0), n_x=2, n_y=2, use_link=True)
 
def draftmake.make_patharray.make_path_array (base_object, path_object, count=4, extra=App.Vector(0, 0, 0), subelements=None, align=False, align_mode="Original", tan_vector=App.Vector(1, 0, 0), force_vertical=False, vertical_vector=App.Vector(0, 0, 1), use_link=True)
 
def draftmake.make_patharray.make_path_twisted_array (base_object, path_object, count=15, rot_factor=0.25, use_link=True)
 
def draftmake.make_point.make_point (X=0, Y=0, Z=0, color=None, name="Point", point_size=5)
 
def draftmake.make_pointarray.make_point_array (base_object, point_object, extra=None, use_link=True)
 
def draftmake.make_polararray.make_polar_array (base_object, number=5, angle=360, center=App.Vector(0, 0, 0), use_link=True)
 
def draftmake.make_polygon.make_polygon (nfaces, radius=1, inscribed=True, placement=None, face=None, support=None)
 
def draftmake.make_dimension.make_radial_dimension_obj (edge_object, index=1, mode="radius", dim_line=None)
 
def draftmake.make_orthoarray.make_rect_array (base_object, d_x=10, d_y=10, d_z=10, n_x=2, n_y=2, n_z=1, use_link=True)
 
def draftmake.make_orthoarray.make_rect_array2d (base_object, d_x=10, d_y=10, n_x=2, n_y=2, use_link=True)
 
def draftmake.make_rectangle.make_rectangle (length, height=0, placement=None, face=None, support=None)
 
def draftmake.make_shape2dview.make_shape2dview (baseobj, projectionVector=None, facenumbers=[])
 
def draftmake.make_shapestring.make_shapestring (String, FontFile, Size=100, Tracking=0)
 
def draftmake.make_sketch.make_sketch (objects_list, autoconstraints=False, addTo=None, delete=False, name="Sketch", radiusPrecision=-1, tol=1e-3)
 
def draftmake.make_text.make_text (string, placement=None, screen=False)
 
def draftmake.make_wire.make_wire (pointslist, closed=False, placement=None, face=None, support=None, bs2wire=False)
 
def draftmake.make_wpproxy.make_workingplaneproxy (placement)
 
def draftmake.make_dimension.makeAngularDimension (center, angles, p3, normal=None)
 
def draftmake.make_array.makeArray (baseobject, arg1, arg2, arg3, arg4=None, arg5=None, arg6=None, name="Array", use_link=False)
 
def draftmake.make_dimension.makeDimension (p1, p2, p3=None, p4=None)
 
def draftmake.make_label.makeLabel (targetpoint=None, target=None, direction=None, distance=None, labeltype=None, placement=None)
 
def draftmake.make_layer.makeLayer (name=None, linecolor=None, drawstyle=None, shapecolor=None, transparency=None)
 
def draftmake.make_patharray.makePathArray (baseobject, pathobject, count, xlate=None, align=False, pathobjsubs=[], use_link=False)
 
def draftmake.make_pointarray.makePointArray (base, ptlst)
 
def draftmake.make_text.makeText (stringlist, point=App.Vector(0, 0, 0), screen=False)
 

Variables

 draftmake.make_clone.clone = make_clone
 
 draftmake.make_bezcurve.makeBezCurve = make_bezcurve
 
 draftmake.make_block.makeBlock = make_block
 
 draftmake.make_bspline.makeBSpline = make_bspline
 
 draftmake.make_circle.makeCircle = make_circle
 
def draftmake.make_drawingview.makeDrawingView = make_drawing_view
 
 draftmake.make_ellipse.makeEllipse = make_ellipse
 
 draftmake.make_facebinder.makeFacebinder = make_facebinder
 
 draftmake.make_line.makeLine = make_line
 
 draftmake.make_point.makePoint = make_point
 
 draftmake.make_polygon.makePolygon = make_polygon
 
 draftmake.make_rectangle.makeRectangle = make_rectangle
 
 draftmake.make_shape2dview.makeShape2DView = make_shape2dview
 
 draftmake.make_shapestring.makeShapeString = make_shapestring
 
 draftmake.make_sketch.makeSketch = make_sketch
 
 draftmake.make_wire.makeWire = make_wire
 
def draftmake.make_wpproxy.makeWorkingPlaneProxy = make_workingplaneproxy
 
 draftmake.make_layer.view_group = App.ParamGet("User parameter:BaseApp/Preferences/View")
 

Detailed Description

Modules with functions to create the custom scripted objects.

Function Documentation

◆ convert_draft_texts()

def draftmake.make_text.convert_draft_texts (   textslist = None)
Convert the given Annotation to a Draft text.

In the past, the `Draft Text` object didn't exist; text objects
were of type `App::Annotation`. This function was introduced
to convert those older objects to a `Draft Text` scripted object.

This function was already present at splitting time during v0.19.

Parameters
----------
textslist: list of objects, optional
    It defaults to `None`.
    A list containing `App::Annotation` objects or a single of these
    objects.
    If it is `None` it will convert all objects in the current document.

Referenced by draftmake.make_text.convertDraftTexts().

◆ convertDraftTexts()

def draftmake.make_text.convertDraftTexts (   textslist = [])
Convert Text. DEPRECATED. Use 'convert_draft_texts'.

References draftmake.make_text.convert_draft_texts().

◆ get_layer_container()

def draftmake.make_layer.get_layer_container ( )
Return a group object to put layers in.

Returns
-------
App::DocumentObjectGroupPython
    The existing group object named `'LayerContainer'`
    of type `LayerContainer`.
    If it doesn't exist it will create it with this default Name.

Referenced by draftmake.make_layer.getLayerContainer(), and draftmake.make_layer.make_layer().

◆ getLayerContainer()

def draftmake.make_layer.getLayerContainer ( )
Get the Layer container. DEPRECATED. Use 'get_layer_container'.

References draftmake.make_layer.get_layer_container().

◆ make_angular_dimension()

def draftmake.make_dimension.make_angular_dimension (   center = App.Vector(0, 0, 0),
  angles = None,
  dim_line = App.Vector(10, 10, 0),
  normal = None 
)
Create an angular dimension from the given center and angles.

Parameters
----------
center: Base::Vector3, optional
    It defaults to the origin `Vector(0, 0, 0)`.
    Center of the dimension line, which is a circular arc.

angles: list of two floats, optional
    It defaults to `[0, 90]`.
    It is a list of two angles, given in degrees, that determine
    the aperture of the dimension line, that is, of the circular arc.
    It is drawn counter-clockwise.
    ::
        angles = [0 90]
        angles = [330 60]  # the arc crosses the X axis
        angles = [-30 60]  # same angle

dim_line: Base::Vector3, optional
    It defaults to `Vector(10, 10, 0)`.
    This is a point through which the extension of the dimension line
    will pass. This defines the radius of the dimension line,
    the circular arc.

normal: Base::Vector3, optional
    It defaults to `None`, in which case the `normal` is taken
    from the currently active `App.DraftWorkingPlane.axis`.

    If the working plane is not available, then the `normal`
    defaults to +Z or `Vector(0, 0, 1)`.

Returns
-------
App::FeaturePython
    A scripted object of type `'AngularDimension'`.
    This object does not have a `Shape` attribute, as the text and lines
    are created on screen by Coin (pivy).

None
    If there is a problem it will return `None`.

Referenced by draftmake.make_dimension.makeAngularDimension().

◆ make_arc_3points()

def draftmake.make_arc_3points.make_arc_3points (   points,
  placement = None,
  face = False,
  support = None,
  map_mode = "Deactivated",
  primitive = False 
)
Draw a circular arc defined by three points in the circumference.

Parameters
----------
points: list of Base::Vector3
    A list that must be three points.

placement: Base::Placement, optional
    It defaults to `None`.
    It is a placement, comprised of a `Base` (`Base::Vector3`),
    and a `Rotation` (`Base::Rotation`).
    If it exists it moves the center of the new object to the point
    indicated by `placement.Base`, while `placement.Rotation`
    is ignored so that the arc keeps the same orientation
    with which it was created.

    If both `support` and `placement` are given,
    `placement.Base` is used for the `AttachmentOffset.Base`,
    and again `placement.Rotation` is ignored.

face: bool, optional
    It defaults to `False`.
    If it is `True` it will create a face in the closed arc.
    Otherwise only the circumference edge will be shown.

support: App::PropertyLinkSubList, optional
    It defaults to `None`.
    It is a list containing tuples to define the attachment
    of the new object.

    A tuple in the list needs two elements;
    the first is an external object, and the second is another tuple
    with the names of sub-elements on that external object
    likes vertices or faces.
    ::
        support = [(obj, ("Face1"))]
        support = [(obj, ("Vertex1", "Vertex5", "Vertex8"))]

    This parameter sets the `Support` property but it only really affects
    the position of the new object when the `map_mode`
    is set to other than `'Deactivated'`.

map_mode: str, optional
    It defaults to `'Deactivated'`.
    It defines the type of `'MapMode'` of the new object.
    This parameter only works when a `support` is also provided.

    Example: place the new object on a face or another object.
    ::
        support = [(obj, ("Face1"))]
        map_mode = 'FlatFace'

    Example: place the new object on a plane created by three vertices
    of an object.
    ::
        support = [(obj, ("Vertex1", "Vertex5", "Vertex8"))]
        map_mode = 'ThreePointsPlane'

primitive: bool, optional
    It defaults to `False`. If it is `True`, it will create a Part
    primitive instead of a Draft object.
    In this case, `placement`, `face`, `support`, and `map_mode`
    are ignored.

Returns
-------
Part::Part2DObject or Part::Feature
    The new arc object.
    Normally it returns a parametric Draft object (`Part::Part2DObject`).
    If `primitive` is `True`, it returns a basic `Part::Feature`.

None
    Returns `None` if there is a problem and the object cannot be created.

◆ make_array()

def draftmake.make_array.make_array (   base_object,
  arg1,
  arg2,
  arg3,
  arg4 = None,
  arg5 = None,
  arg6 = None,
  use_link = True 
)
Create a Draft Array of the given object.

Rectangular array
-----------------
make_array(object, xvector, yvector, xnum, ynum)
make_array(object, xvector, yvector, zvector, xnum, ynum, znum)

xnum of iterations in the x direction
at xvector distance between iterations, same for y direction
with yvector and ynum, same for z direction with zvector and znum.

Polar array
-----------
make_array(object, center, totalangle, totalnum) for polar array, or

center is a vector, totalangle is the angle to cover (in degrees)
and totalnum is the number of objects, including the original.

Circular array
--------------
make_array(object, rdistance, tdistance, axis, center, ncircles, symmetry)

In case of a circular array, rdistance is the distance of the
circles, tdistance is the distance within circles, axis the rotation-axis,
center the center of rotation, ncircles the number of circles
and symmetry the number of symmetry-axis of the distribution.

To Do
-----
The `Array` class currently handles three types of arrays,
orthogonal, polar, and circular. In the future, probably they should be
split in separate classes so that they are easier to manage.

◆ make_bezcurve()

def draftmake.make_bezcurve.make_bezcurve (   pointslist,
  closed = False,
  placement = None,
  face = None,
  support = None,
  degree = None 
)
make_bezcurve(pointslist, [closed], [placement])

Creates a Bezier Curve object from the given list of vectors.

Parameters
----------
pointlist : [Base.Vector]
    List of points to create the polyline.
    Instead of a pointslist, you can also pass a Part Wire.
    TODO: Change the name so!

closed : bool
    If closed is True or first and last points are identical, 
    the created BSpline will be closed.

placement : Base.Placement
    If a placement is given, it is used.

face : Bool
    If face is False, the rectangle is shown as a wireframe, 
    otherwise as a face.   

support : 
    TODO: Describe

degree : int
    Degree of the BezCurve

◆ make_block()

def draftmake.make_block.make_block (   objectslist)
make_block(objectslist)

Creates a Draft Block from the given objects.

Parameters
----------
objectlist : list
    Major radius of the ellipse.

◆ make_bspline()

def draftmake.make_bspline.make_bspline (   pointslist,
  closed = False,
  placement = None,
  face = None,
  support = None 
)
make_bspline(pointslist, [closed], [placement])

Creates a B-Spline object from the given list of vectors.

Parameters
----------
pointlist : [Base.Vector]
    List of points to create the polyline.
    Instead of a pointslist, you can also pass a Part Wire.
    TODO: Change the name so!

closed : bool
    If closed is True or first and last points are identical, 
    the created BSpline will be closed.

placement : Base.Placement
    If a placement is given, it is used.

face : Bool
    If face is False, the rectangle is shown as a wireframe, 
    otherwise as a face.   

support : 
    TODO: Describe

◆ make_circle()

def draftmake.make_circle.make_circle (   radius,
  placement = None,
  face = None,
  startangle = None,
  endangle = None,
  support = None 
)
make_circle(radius, [placement, face, startangle, endangle])
or make_circle(edge,[face]):

Creates a circle object with given parameters. 

Parameters
----------
radius : the radius of the circle.

placement : 
    If placement is given, it is used. 

face : Bool
    If face is False, the circle is shown as a wireframe, 
    otherwise as a face. 

startangle : start angle of the arc (in degrees)

endangle : end angle of the arc (in degrees)
    if startangle and endangle are equal, a circle is created, 
    if they are different an arc is created

edge : edge.Curve must be a 'Part.Circle'
    the circle is created from the given edge

support : 
    TODO: Describe

◆ make_circular_array()

def draftmake.make_circulararray.make_circular_array (   base_object,
  r_distance = 100,
  tan_distance = 50,
  number = 3,
  symmetry = 1,
  axis = App.Vector(0, 0, 1),
  center = App.Vector(0, 0, 0),
  use_link = True 
)
Create a circular array from the given object.

Parameters
----------
base_object: Part::Feature or str
    Any of object that has a `Part::TopoShape` that can be duplicated.
    This means most 2D and 3D objects produced with any workbench.
    If it is a string, it must be the `Label` of that object.
    Since a label is not guaranteed to be unique in a document,
    it will use the first object found with this label.

r_distance: float, optional
    It defaults to `100`.
    Radial distance to the next ring of circular arrays.

tan_distance: float, optional
    It defaults to `50`.
    The tangential distance between two elements located
    in the same circular ring.
    The tangential distance together with the radial distance
    determine how many copies are created.

number: int, optional
    It defaults to 3.
    The number of layers or rings of repeated objects.
    The original object stays at the center, and is counted
    as a layer itself. So, if you want at least one layer of circular
    copies, this number must be at least 2.

symmetry: int, optional
    It defaults to 1.
    It indicates how many lines of symmetry the entire circular pattern
    has. That is, with 1, the array is symmetric only after a full
    360 degrees rotation.

    When it is 2, the array is symmetric at 0 and 180 degrees.
    When it is 3, the array is symmetric at 0, 120, and 240 degrees.
    When it is 4, the array is symmetric at 0, 90, 180, and 270 degrees.
    Et cetera.

axis: Base::Vector3, optional
    It defaults to `App.Vector(0, 0, 1)` or the `+Z` axis.
    The unit vector indicating the axis of rotation.

center: Base::Vector3, optional
    It defaults to `App.Vector(0, 0, 0)` or the global origin.
    The point through which the `axis` passes to define
    the axis of rotation.

use_link: bool, optional
    It defaults to `True`.
    If it is `True` the produced copies are not `Part::TopoShape` copies,
    but rather `App::Link` objects.
    The Links repeat the shape of the original `base_object` exactly,
    and therefore the resulting array is more memory efficient.

    Also, when `use_link` is `True`, the `Fuse` property
    of the resulting array does not work; the array doesn't
    contain separate shapes, it only has the original shape repeated
    many times, so there is nothing to fuse together.

    If `use_link` is `False` the original shape is copied many times.
    In this case the `Fuse` property is able to fuse
    all copies into a single object, if they touch each other.

Returns
-------
Part::FeaturePython
    A scripted object of type `'Array'`.
    Its `Shape` is a compound of the copies of the original object.

None
    If there is a problem it will return `None`.

See Also
--------
make_ortho_array, make_polar_array, make_path_array, make_point_array

◆ make_clone()

def draftmake.make_clone.make_clone (   obj,
  delta = None,
  forcedraft = False 
)
clone(obj,[delta,forcedraft])

Makes a clone of the given object(s).
The clone is an exact, linked copy of the given object. If the original
object changes, the final object changes too.

Parameters
----------
obj :

delta : Base.Vector
    Delta Vector to move the clone from the original position.

forcedraft : bool
    If forcedraft is True, the resulting object is a Draft clone
    even if the input object is an Arch object.

◆ make_copy()

def draftmake.make_copy.make_copy (   obj,
  force = None,
  reparent = False,
  simple_copy = False 
)
make_copy(object, [force], [reparent], [simple_copy])

Make an exact copy of an object and return it.

Parameters
----------
obj :
    Object to copy.

force :
    Obsolete, not used anymore.

reparent :
    Group the new object in the same group of the old one.

simple_copy :
    Create a simple copy of the object (a new non parametric
    Part::Feature with the same Shape as the given object).

◆ make_dimension()

def draftmake.make_dimension.make_dimension (   p1,
  p2,
  p3 = None,
  p4 = None 
)
Create one of three types of dimension objects.

In all dimensions the p3 parameter defines a point through which
the dimension line will go through.

The current line width and color will be used.

Linear dimension
----------------
- (p1, p2, p3): a simple linear dimension from p1 to p2

- (object, i1, i2, p3): creates a linked dimension to the provided
  object (edge), measuring the distance between its vertices
  indexed i1 and i2

Circular dimension
------------------
- (arc, i1, mode, p3): creates a linked dimension to the given arc
  object, i1 is the index of the arc edge that will be measured;
  mode is either "radius" or "diameter".

◆ make_drawing_view()

def draftmake.make_drawingview.make_drawing_view (   obj,
  page,
  lwmod = None,
  tmod = None,
  otherProjection = None 
)
make_drawing_view(object,page,[lwmod,tmod])

This function is OBSOLETE, since TechDraw substituted the Drawing Workbench.
Add a View of the given object to the given page. 

Parameters
----------
lwmod : 
    modifies lineweights (in percent), 

tmod :
    modifies text heights (in percent). 

The Hint scale, X and Y of the page are used.
    TODO: Document it properly

References draftmake.make_drawingview.make_drawing_view(), and ArchPanel.makePanelView().

Referenced by draftmake.make_drawingview.make_drawing_view().

◆ make_ellipse()

def draftmake.make_ellipse.make_ellipse (   majradius,
  minradius,
  placement = None,
  face = None,
  support = None 
)
make_ellipse(majradius, minradius, [placement], [face], [support])

Makes an ellipse with the given major and minor radius, and optionally
a placement.

Parameters
----------
majradius : 
    Major radius of the ellipse.

minradius : 
    Minor radius of the ellipse.

placement : Base.Placement
    If a placement is given, it is used.

face : Bool
    If face is False, the rectangle is shown as a wireframe, 
    otherwise as a face.   

support : 
    TODO: Describe.

◆ make_facebinder()

def draftmake.make_facebinder.make_facebinder (   selectionset,
  name = "Facebinder" 
)
make_facebinder(selectionset, [name])

Creates a Facebinder object from a selection set.

Parameters
----------
selectionset :
    Only faces will be added.

name : string (default = "Facebinder")
    Name of the created object

◆ make_fillet()

def draftmake.make_fillet.make_fillet (   objs,
  radius = 100,
  chamfer = False,
  delete = False 
)
Create a fillet between two lines or Part.Edges.

Parameters
----------
objs: list
    List of two objects of type wire, or edges.

radius: float, optional
    It defaults to 100. The curvature of the fillet.

chamfer: bool, optional
    It defaults to `False`. If it is `True` it no longer produces
    a rounded fillet but a chamfer (straight edge)
    with the value of the `radius`.

delete: bool, optional
    It defaults to `False`. If it is `True` it will delete
    the pair of objects that are used to create the fillet.
    Otherwise, the original objects will still be there.

Returns
-------
Part::Part2DObjectPython
    The object of Proxy type `'Fillet'`.
    It returns `None` if it fails producing the object.

◆ make_label()

def draftmake.make_label.make_label (   target_point = App.Vector(0, 0, 0),
  placement = App.Vector(30, 30, 0),
  target_object = None,
  subelements = None,
  label_type = "Custom",
  custom_text = "Label",
  direction = "Horizontal",
  distance = -10,
  points = None 
)
Create a Label object containing different types of information.

The current color and text height and font specified in preferences
are used.

Parameters
----------
target_point: Base::Vector3, optional
    It defaults to the origin `App.Vector(0, 0, 0)`.
    This is the point which is pointed to by the label's leader line.
    This point can be adorned with a marker like an arrow or circle.

placement: Base::Placement, Base::Vector3, or Base::Rotation, optional
    It defaults to `App.Vector(30, 30, 0)`.
    If it is provided, it defines the base point of the textual
    label.
    The input could be a full placement, just a vector indicating
    the translation, or just a rotation.

target_object: Part::Feature or str, optional
    It defaults to `None`.
    If it exists it should be an object which will be used to provide
    information to the label, as long as `label_type` is different
    from `'Custom'`.

    If it is a string, it must be the `Label` of that object.
    Since a `Label` is not guaranteed to be unique in a document,
    it will use the first object found with this `Label`.

subelements: str, optional
    It defaults to `None`.
    If `subelements` is provided, `target_object` should be provided
    as well, otherwise it is ignored.

    It should be a string indicating a subelement name, either
    `'VertexN'`, `'EdgeN'`, or `'FaceN'` which should exist
    within `target_object`.
    In this case `'N'` is an integer that indicates the specific number
    of vertex, edge, or face in `target_object`.

    Both `target_object` and `subelements` are used to link the label
    to a particular object, or to the particular vertex, edge, or face,
    and get information from them.
    ::
        make_label(..., target_object=App.ActiveDocument.Box)
        make_label(..., target_object="My box", subelements="Face3")

    These two parameters can be can be obtained from the `Gui::Selection`
    module.
    ::
        sel_object = Gui.Selection.getSelectionEx()[0]
        target_object = sel_object.Object
        subelements = sel_object.SubElementNames[0]

label_type: str, optional
    It defaults to `'Custom'`.
    It indicates the type of information that will be shown in the label.
    See the get_label_types function in label.py for supported types.

    Only `'Custom'` allows you to manually set the text
    by defining `custom_text`. The other types take their information
    from the object included in `target`.

    - `'Position'` will show the base position of the target object,
      or of the indicated `'VertexN'` in `target`.
    - `'Length'` will show the `Length` of the target object's `Shape`,
      or of the indicated `'EdgeN'` in `target`.
    - `'Area'` will show the `Area` of the target object's `Shape`,
      or of the indicated `'FaceN'` in `target`.

custom_text: str, or list of str, optional
    It defaults to `'Label'`.
    If it is a list, each element in the list represents a new text line.

    It is the text that will be displayed by the label when
    `label_type` is `'Custom'`.

direction: str, optional
    It defaults to `'Horizontal'`.
    It can be `'Horizontal'`, `'Vertical'`, or `'Custom'`.
    It indicates the direction of the straight segment of the leader line
    that ends up next to the textual label.

    If `'Custom'` is selected, the leader line can be manually drawn
    by specifying the value of `points`.
    Normally, the leader line has only three points, but with `'Custom'`
    you can specify as many points as needed.

distance: int, float, Base::Quantity, optional
    It defaults to -10.
    It indicates the length of the horizontal or vertical segment
    of the leader line.

    The leader line is composed of two segments, the first segment is
    inclined, while the second segment is either horizontal or vertical
    depending on the value of `direction`.
    ::
        T
        |
        |
        o------- L text

    The `oL` segment's length is defined by `distance`
    while the `oT` segment is automatically calculated depending
    on the values of `placement` (L) and `distance` (o).

    This `distance` is oriented, meaning that if it is positive
    the segment will be to the right and above of the textual
    label, depending on if `direction` is `'Horizontal'` or `'Vertical'`,
    respectively.
    If it is negative, the segment will be to the left
    and below of the text.

points: list of Base::Vector3, optional
    It defaults to `None`.
    It is a list of vectors defining the shape of the leader line;
    the list must have at least two points.
    This argument must be used together with `direction='Custom'`
    to display this custom leader.

    However, notice that if the Label's `StraightDirection` property
    is later changed to `'Horizontal'` or `'Vertical'`,
    the custom point list will be overwritten with a new,
    automatically calculated three-point list.

    For the object to use custom points, `StraightDirection`
    must remain `'Custom'`, and then the `Points` property
    can be overwritten by a suitable list of points.

Returns
-------
App::FeaturePython
    A scripted object of type `'Label'`.
    This object does not have a `Shape` attribute, as the text and lines
    are created on screen by Coin (pivy).

None
    If there is a problem it will return `None`.

◆ make_layer()

def draftmake.make_layer.make_layer (   name = None,
  line_color = None,
  shape_color = None,
  line_width = 2.0,
  draw_style = "Solid",
  transparency = 0 
)
Create a Layer object in the active document.

If a layer container named `'LayerContainer'` does not exist,
it is created with this name.

A layer controls the view properties of the objects inside the layer,
so all parameters except for `name` only apply if the graphical interface
is up.

Parameters
----------
name: str, optional
    It is used to set the layer's `Label` (user editable).
    It defaults to `None`, in which case the `Label`
    is set to `'Layer'` or to its translation in the current language.

line_color: tuple, optional
    It defaults to `None`, in which case it uses the value of the parameter
    `User parameter:BaseApp/Preferences/View/DefaultShapeLineColor`.
    If it is given, it should be a tuple of three
    floating point values from 0.0 to 1.0.

shape_color: tuple, optional
    It defaults to `None`, in which case it uses the value of the parameter
    `User parameter:BaseApp/Preferences/View/DefaultShapeColor`.
    If it is given, it should be a tuple of three
    floating point values from 0.0 to 1.0.

line_width: float, optional
    It defaults to 2.0.
    It determines the width of the edges of the objects contained
    in the layer.

draw_style: str, optional
    It defaults to `'Solid'`.
    It determines the style of the edges of the objects contained
    in the layer.
    If it is given, it should be 'Solid', 'Dashed', 'Dotted',
    or 'Dashdot'.

transparency: int, optional
    It defaults to 0.
    It should be an integer value from 0 (completely opaque)
    to 100 (completely transparent).

Return
------
App::FeaturePython
    A scripted object of type `'Layer'`.
    This object does not have a `Shape` attribute.
    Modifying the view properties of this object will affect the objects
    inside of it.

None
    If there is a problem it will return `None`.

References draftmake.make_layer.get_layer_container().

◆ make_line()

def draftmake.make_line.make_line (   first_param,
  last_param = None 
)
makeLine(first_param, p2)

Creates a line from 2 points or from a given object.

Parameters
----------
first_param : 
    Base.Vector -> First point of the line (if p2 is None)
    Part.LineSegment -> Line is created from the given Linesegment
    Shape -> Line is created from the give Shape

last_param : Base.Vector
    Second point of the line, if not set the function evaluates 
    the first_param to look for a Part.LineSegment or a Shape

◆ make_linear_dimension()

def draftmake.make_dimension.make_linear_dimension (   p1,
  p2,
  dim_line = None 
)
Create a free linear dimension from two main points.

Parameters
----------
p1: Base::Vector3
    First point of the measurement.

p2: Base::Vector3
    Second point of the measurement.

dim_line: Base::Vector3, optional
    It defaults to `None`.
    This is a point through which the extension of the dimension line
    will pass.
    This point controls how close or how far the dimension line is
    positioned from the measured segment that goes from `p1` to `p2`.

    If it is `None`, this point will be calculated from the intermediate
    distance betwwen `p1` and `p2`.

Returns
-------
App::FeaturePython
    A scripted object of type `'LinearDimension'`.
    This object does not have a `Shape` attribute, as the text and lines
    are created on screen by Coin (pivy).

None
    If there is a problem it will return `None`.

◆ make_linear_dimension_obj()

def draftmake.make_dimension.make_linear_dimension_obj (   edge_object,
  i1 = 1,
  i2 = 2,
  dim_line = None 
)
Create a linear dimension from an object.

Parameters
----------
edge_object: Part::Feature
    The object which has an edge which will be measured.
    It must have a `Part::TopoShape`, and at least one element
    in `Shape.Vertexes`, to be able to measure a distance.

i1: int, optional
    It defaults to `1`.
    It is the index of the first vertex in `edge_object` from which
    the measurement will be taken.
    The minimum value should be `1`, which will be interpreted
    as `'Vertex1'`.

    If the value is below `1`, it will be set to `1`.

i2: int, optional
    It defaults to `2`, which will be converted to `'Vertex2'`.
    It is the index of the second vertex in `edge_object` that determines
    the endpoint of the measurement.

    If it is the same value as `i1`, the resulting measurement will be
    made from the origin `(0, 0, 0)` to the vertex indicated by `i1`.

    If the value is below `1`, it will be set to the last vertex
    in `edge_object`.

    Then to measure the first and last, this could be used
    ::
        make_linear_dimension_obj(edge_object, i1=1, i2=-1)

dim_line: Base::Vector3
    It defaults to `None`.
    This is a point through which the extension of the dimension line
    will pass.
    This point controls how close or how far the dimension line is
    positioned from the measured segment in `edge_object`.

    If it is `None`, this point will be calculated from the intermediate
    distance betwwen the vertices defined by `i1` and `i2`.

Returns
-------
App::FeaturePython
    A scripted object of type `'LinearDimension'`.
    This object does not have a `Shape` attribute, as the text and lines
    are created on screen by Coin (pivy).

None
    If there is a problem it will return `None`.

References draftmake.make_dimension.make_linear_dimension_obj().

Referenced by draftmake.make_dimension.make_linear_dimension_obj().

◆ make_ortho_array()

def draftmake.make_orthoarray.make_ortho_array (   base_object,
  v_x = App.Vector(10, 0, 0),
  v_y = App.Vector(0, 10, 0),
  v_z = App.Vector(0, 0, 10),
  n_x = 2,
  n_y = 2,
  n_z = 1,
  use_link = True 
)
Create an orthogonal array from the given object.

Parameters
----------
base_object: Part::Feature or str
    Any of object that has a `Part::TopoShape` that can be duplicated.
    This means most 2D and 3D objects produced with any workbench.
    If it is a string, it must be the `Label` of that object.
    Since a label is not guaranteed to be unique in a document,
    it will use the first object found with this label.

v_x, v_y, v_z: Base::Vector3, optional
    The vector indicating the vector displacement between two elements
    in the specified orthogonal direction X, Y, Z.

    By default:
    ::
        v_x = App.Vector(10, 0, 0)
        v_y = App.Vector(0, 10, 0)
        v_z = App.Vector(0, 0, 10)

    Given that this is a vectorial displacement
    the next object can appear displaced in one, two or three axes
    at the same time.

    For example
    ::
        v_x = App.Vector(10, 5, 0)

    means that the next element in the X direction will be displaced
    10 mm in X, 5 mm in Y, and 0 mm in Z.

    A traditional "rectangular" array is obtained when
    the displacement vector only has its corresponding component,
    like in the default case.

    If these values are entered as single numbers instead
    of vectors, the single value is expanded into a vector
    of the corresponding direction, and the other components are assumed
    to be zero.

    For example
    ::
        v_x = 15
        v_y = 10
        v_z = 1
    becomes
    ::
        v_x = App.Vector(15, 0, 0)
        v_y = App.Vector(0, 10, 0)
        v_z = App.Vector(0, 0, 1)

n_x, n_y, n_z: int, optional
    The number of copies in the specified orthogonal direction X, Y, Z.
    This number includes the original object, therefore, it must be
    at least 1.

    The values of `n_x` and `n_y` default to 2,
    while `n_z` defaults to 1.
    This means the array is a planar array by default.

use_link: bool, optional
    It defaults to `True`.
    If it is `True` the produced copies are not `Part::TopoShape` copies,
    but rather `App::Link` objects.
    The Links repeat the shape of the original `base_object` exactly,
    and therefore the resulting array is more memory efficient.

    Also, when `use_link` is `True`, the `Fuse` property
    of the resulting array does not work; the array doesn't
    contain separate shapes, it only has the original shape repeated
    many times, so there is nothing to fuse together.

    If `use_link` is `False` the original shape is copied many times.
    In this case the `Fuse` property is able to fuse
    all copies into a single object, if they touch each other.

Returns
-------
Part::FeaturePython
    A scripted object of type `'Array'`.
    Its `Shape` is a compound of the copies of the original object.

None
    If there is a problem it will return `None`.

See Also
--------
make_ortho_array2d, make_rect_array, make_rect_array2d, make_polar_array,
make_circular_array, make_path_array, make_point_array

◆ make_ortho_array2d()

def draftmake.make_orthoarray.make_ortho_array2d (   base_object,
  v_x = App.Vector(10, 0, 0),
  v_y = App.Vector(0, 10, 0),
  n_x = 2,
  n_y = 2,
  use_link = True 
)
Create a 2D orthogonal array from the given object.

This works the same as `make_ortho_array`.
The Z component is ignored so it only considers vector displacements
in X and Y directions.

Parameters
----------
base_object: Part::Feature or str
    Any of object that has a `Part::TopoShape` that can be duplicated.
    This means most 2D and 3D objects produced with any workbench.
    If it is a string, it must be the `Label` of that object.
    Since a label is not guaranteed to be unique in a document,
    it will use the first object found with this label.

v_x, v_y: Base::Vector3, optional
    Vectorial displacement of elements
    in the corresponding X and Y directions.
    See `make_ortho_array`.

n_x, n_y: int, optional
    Number of elements
    in the corresponding X and Y directions.
    See `make_ortho_array`.

use_link: bool, optional
    If it is `True`, create `App::Link` array.
    See `make_ortho_array`.

Returns
-------
Part::FeaturePython
    A scripted object of type `'Array'`.
    Its `Shape` is a compound of the copies of the original object.

None
    If there is a problem it will return `None`.

See Also
--------
make_ortho_array, make_rect_array, make_rect_array2d, make_polar_array,
make_circular_array, make_path_array, make_point_array

◆ make_path_array()

def draftmake.make_patharray.make_path_array (   base_object,
  path_object,
  count = 4,
  extra = App.Vector(0, 0, 0),
  subelements = None,
  align = False,
  align_mode = "Original",
  tan_vector = App.Vector(1, 0, 0),
  force_vertical = False,
  vertical_vector = App.Vector(0, 0, 1),
  use_link = True 
)
Make a Draft PathArray object.

Distribute copies of a `base_object` along `path_object`
or `subelements` from `path_object`.

Parameters
----------
base_object: Part::Feature or str
    Any of object that has a `Part::TopoShape` that can be duplicated.
    This means most 2D and 3D objects produced with any workbench.
    If it is a string, it must be the `Label` of that object.
    Since a label is not guaranteed to be unique in a document,
    it will use the first object found with this label.

path_object: Part::Feature or str
    Path object like a polyline, B-Spline, or bezier curve that should
    contain edges.
    Just like `base_object` it can also be `Label`.

count: int, float, optional
    It defaults to 4.
    Number of copies to create along the `path_object`.
    It must be at least 2.
    If a `float` is provided, it will be truncated by `int(count)`.

extra: Base.Vector3, optional
    It defaults to `App.Vector(0, 0, 0)`.
    It translates each copy by the value of `extra`.
    This is useful to adjust for the difference between shape centre
    and shape reference point.

subelements: list or tuple of str, optional
    It defaults to `None`.
    It should be a list of names of edges that must exist in `path_object`.
    Then the path array will be created along these edges only,
    and not the entire `path_object`.
    ::
        subelements = ['Edge1', 'Edge2']

    The edges must be contiguous, meaning that it is not allowed to
    input `'Edge1'` and `'Edge3'` if they do not touch each other.

    A single string value is also allowed.
    ::
        subelements = 'Edge1'

align: bool, optional
    It defaults to `False`.
    If it is `True` it will align `base_object` to tangent, normal,
    or binormal to the `path_object`, depending on the value
    of `tan_vector`.

align_mode: str, optional
    It defaults to `'Original'` which is the traditional alignment.
    It can also be `'Frenet'` or `'Tangent'`.

    - Original. It does not calculate curve normal.
      `X` is curve tangent, `Y` is normal parameter, Z is the cross
      product `X` x `Y`.
    - Frenet. It defines a local coordinate system along the path.
      `X` is tangent to curve, `Y` is curve normal, `Z` is curve binormal.
      If normal cannot be computed, for example, in a straight path,
      a default is used.
    - Tangent. It is similar to `'Original'` but includes a pre-rotation
      to align the base object's `X` to the value of `tan_vector`,
      then `X` follows curve tangent.

tan_vector: Base::Vector3, optional
    It defaults to `App.Vector(1, 0, 0)` or the +X axis.
    It aligns the tangent of the path to this local unit vector
    of the object.

force_vertical: Base::Vector3, optional
    It defaults to `False`.
    If it is `True`, the value of `vertical_vector`
    will be used when `align_mode` is `'Original'` or `'Tangent'`.

vertical_vector: Base::Vector3, optional
    It defaults to `App.Vector(0, 0, 1)` or the +Z axis.
    It will force this vector to be the vertical direction
    when `force_vertical` is `True`.

use_link: bool, optional
    It defaults to `True`, in which case the copies are `App::Link`
    elements. Otherwise, the copies are shape copies which makes
    the resulting array heavier.

Returns
-------
Part::FeaturePython
    The scripted object of type `'PathArray'`.
    Its `Shape` is a compound of the copies of the original object.

None
    If there is a problem it will return `None`.

Referenced by draftmake.make_patharray.makePathArray().

◆ make_path_twisted_array()

def draftmake.make_patharray.make_path_twisted_array (   base_object,
  path_object,
  count = 15,
  rot_factor = 0.25,
  use_link = True 
)
Create a Path twisted array.

◆ make_point()

def draftmake.make_point.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.

Parameters
----------
X : 
    float -> X coordinate of the point
    Base.Vector -> Ignore Y and Z coordinates and create the point
        from the vector.

Y : float
    Y coordinate of the point

Z : float
    Z coordinate of the point

color : (R, G, B)
    Point color as RGB
    example to create a colored point:
    make_point(0,0,0,(1,0,0)) # color = red
    example to change the color, make sure values are floats:
    p1.ViewObject.PointColor =(0.0,0.0,1.0)

◆ make_point_array()

def draftmake.make_pointarray.make_point_array (   base_object,
  point_object,
  extra = None,
  use_link = True 
)
Make a Draft PointArray object.

Distribute copies of a `base_object` in the points
defined by `point_object`.

Parameters
----------
base_object: Part::Feature or str
    Any of object that has a `Part::TopoShape` that can be duplicated.
    This means most 2D and 3D objects produced with any workbench.
    If it is a string, it must be the `Label` of that object.
    Since a label is not guaranteed to be unique in a document,
    it will use the first object found with this label.

point_object: Part::Feature or str
    An object that is a type of container for holding points.
    This object must have one of the following properties `Geometry`,
    `Links`, or `Components`, which themselves must contain objects
    with `X`, `Y`, and `Z` properties.

    This object could be:

    - A `Sketcher::SketchObject`, as it has a `Geometry` property.
      The sketch can contain different elements but it must contain
      at least one `Part::GeomPoint`.

    - A `Part::Compound`, as it has a `Links` property. The compound
      can contain different elements but it must contain at least
      one object that has `X`, `Y`, and `Z` properties,
      like a `Draft Point` or a `Part::Vertex`.

    - A `Draft Block`, as it has a `Components` property. This `Block`
      behaves essentially the same as a `Part::Compound`. It must
      contain at least a point or vertex object.

extra: Base::Placement, Base::Vector3, or Base::Rotation, optional
    It defaults to `None`.
    If it is provided, it is an additional placement that is applied
    to each copy of the array.
    The input could be a full placement, just a vector indicating
    the additional translation, or just a rotation.

Returns
-------
Part::FeaturePython
    A scripted object of type `'PointArray'`.
    Its `Shape` is a compound of the copies of the original object.

None
    If there is a problem it will return `None`.

Referenced by draftmake.make_pointarray.makePointArray().

◆ make_polar_array()

def draftmake.make_polararray.make_polar_array (   base_object,
  number = 5,
  angle = 360,
  center = App.Vector(0, 0, 0),
  use_link = True 
)
Create a polar array from the given object.

Parameters
----------
base_object: Part::Feature or str
    Any of object that has a `Part::TopoShape` that can be duplicated.
    This means most 2D and 3D objects produced with any workbench.
    If it is a string, it must be the `Label` of that object.
    Since a label is not guaranteed to be unique in a document,
    it will use the first object found with this label.

number: int, optional
    It defaults to 5.
    The number of copies produced in the polar pattern.

angle: float, optional
    It defaults to 360.
    The magnitude in degrees swept by the polar pattern.

center: Base::Vector3, optional
    It defaults to the origin `App.Vector(0, 0, 0)`.
    The vector indicating the center of rotation of the array.

use_link: bool, optional
    It defaults to `True`.
    If it is `True` the produced copies are not `Part::TopoShape` copies,
    but rather `App::Link` objects.
    The Links repeat the shape of the original `obj` exactly,
    and therefore the resulting array is more memory efficient.

    Also, when `use_link` is `True`, the `Fuse` property
    of the resulting array does not work; the array doesn't
    contain separate shapes, it only has the original shape repeated
    many times, so there is nothing to fuse together.

    If `use_link` is `False` the original shape is copied many times.
    In this case the `Fuse` property is able to fuse
    all copies into a single object, if they touch each other.

Returns
-------
Part::FeaturePython
    A scripted object of type `'Array'`.
    Its `Shape` is a compound of the copies of the original object.

None
    If there is a problem it will return `None`.

See Also
--------
make_ortho_array, make_circular_array, make_path_array, make_point_array

◆ make_polygon()

def draftmake.make_polygon.make_polygon (   nfaces,
  radius = 1,
  inscribed = True,
  placement = None,
  face = None,
  support = None 
)
makePolgon(edges,[radius],[inscribed],[placement],[face])

Creates a polygon object with the given number of edges and radius.

Parameters
----------
edges : int
    Number of edges of the polygon.

radius : 
    Radius of the control circle.

inscribed : bool
    Defines is the polygon is inscribed or not into the control circle.

placement : Base.Placement
    If placement is given, it is used. 

face : bool
    If face is True, the resulting shape is displayed as a face, 
    otherwise as a wireframe.

support : 
    TODO: Describe

◆ make_radial_dimension_obj()

def draftmake.make_dimension.make_radial_dimension_obj (   edge_object,
  index = 1,
  mode = "radius",
  dim_line = None 
)
Create a radial or diameter dimension from an arc object.

Parameters
----------
edge_object: Part::Feature
    The object which has a circular edge which will be measured.
    It must have a `Part::TopoShape`, and at least one element
    must be a circular edge in `Shape.Edges` to be able to measure
    its radius.

index: int, optional
    It defaults to `1`.
    It is the index of the edge in `edge_object` which is going to
    be measured.
    The minimum value should be `1`, which will be interpreted
    as `'Edge1'`. If the value is below `1`, it will be set to `1`.

mode: str, optional
    It defaults to `'radius'`; the other option is `'diameter'`.
    It determines whether the dimension will be shown as a radius
    or as a diameter.

dim_line: Base::Vector3, optional
    It defaults to `None`.
    This is a point through which the extension of the dimension line
    will pass. The dimension line will be a radius or diameter
    of the measured arc, extending from the center to the arc itself.

    If it is `None`, this point will be set to one unit to the right
    of the center of the arc, which will create a dimension line that is
    horizontal, that is, parallel to the +X axis.

Returns
-------
App::FeaturePython
    A scripted object of type `'LinearDimension'`.
    This object does not have a `Shape` attribute, as the text and lines
    are created on screen by Coin (pivy).

None
    If there is a problem it will return `None`.

◆ make_rect_array()

def draftmake.make_orthoarray.make_rect_array (   base_object,
  d_x = 10,
  d_y = 10,
  d_z = 10,
  n_x = 2,
  n_y = 2,
  n_z = 1,
  use_link = True 
)
Create a rectangular array from the given object.

This function wraps around `make_ortho_array`
to produce strictly rectangular arrays, in which
the displacement vectors `v_x`, `v_y`, and `v_z`
only have their respective components in X, Y, and Z.

Parameters
----------
base_object: Part::Feature or str
    Any of object that has a `Part::TopoShape` that can be duplicated.
    This means most 2D and 3D objects produced with any workbench.
    If it is a string, it must be the `Label` of that object.
    Since a label is not guaranteed to be unique in a document,
    it will use the first object found with this label.

d_x, d_y, d_z: Base::Vector3, optional
    Displacement of elements in the corresponding X, Y, and Z directions.

n_x, n_y, n_z: int, optional
    Number of elements in the corresponding X, Y, and Z directions.

use_link: bool, optional
    If it is `True`, create `App::Link` array.
    See `make_ortho_array`.

Returns
-------
Part::FeaturePython
    A scripted object of type `'Array'`.
    Its `Shape` is a compound of the copies of the original object.

None
    If there is a problem it will return `None`.

See Also
--------
make_ortho_array, make_ortho_array2d, make_rect_array2d, make_polar_array,
make_circular_array, make_path_array, make_point_array

◆ make_rect_array2d()

def draftmake.make_orthoarray.make_rect_array2d (   base_object,
  d_x = 10,
  d_y = 10,
  n_x = 2,
  n_y = 2,
  use_link = True 
)
Create a 2D rectangular array from the given object.

This function wraps around `make_ortho_array`,
to produce strictly rectangular arrays, in which
the displacement vectors `v_x` and `v_y`
only have their respective components in X and Y.
The Z component is ignored.

Parameters
----------
base_object: Part::Feature or str
    Any of object that has a `Part::TopoShape` that can be duplicated.
    This means most 2D and 3D objects produced with any workbench.
    If it is a string, it must be the `Label` of that object.
    Since a label is not guaranteed to be unique in a document,
    it will use the first object found with this label.

d_x, d_y: Base::Vector3, optional
    Displacement of elements in the corresponding X and Y directions.

n_x, n_y: int, optional
    Number of elements in the corresponding X and Y directions.

use_link: bool, optional
    If it is `True`, create `App::Link` array.
    See `make_ortho_array`.

Returns
-------
Part::FeaturePython
    A scripted object of type `'Array'`.
    Its `Shape` is a compound of the copies of the original object.

None
    If there is a problem it will return `None`.

See Also
--------
make_ortho_array, make_ortho_array2d, make_rect_array, make_polar_array,
make_circular_array, make_path_array, make_point_array

◆ make_rectangle()

def draftmake.make_rectangle.make_rectangle (   length,
  height = 0,
  placement = None,
  face = None,
  support = None 
)
make_rectangle(length, width, [placement], [face])

Creates a Rectangle object with length in X direction and height in Y
direction.

Parameters
----------
length, height : dimensions of the rectangle

placement : Base.Placement
    If a placement is given, it is used.

face : Bool
    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: 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).

◆ make_shape2dview()

def draftmake.make_shape2dview.make_shape2dview (   baseobj,
  projectionVector = None,
  facenumbers = [] 
)
make_shape2dview(object, [projectionVector], [facenumbers])

Add a 2D shape to the document, which is a 2D projection of the given object. 

Parameters
----------
object : 
    TODO: Describe

projectionVector : Base.Vector
    Custom vector for the projection

facenumbers : [] TODO: Describe
    A list of face numbers to be considered in individual faces mode.

◆ make_shapestring()

def draftmake.make_shapestring.make_shapestring (   String,
  FontFile,
  Size = 100,
  Tracking = 0 
)
ShapeString(Text,FontFile,[Height],[Track])

Turns a text string into a Compound Shape

Parameters
----------
majradius : 
    Major radius of the ellipse.

◆ make_sketch()

def draftmake.make_sketch.make_sketch (   objects_list,
  autoconstraints = False,
  addTo = None,
  delete = False,
  name = "Sketch",
  radiusPrecision = -1,
  tol = 1e-3 
)
make_sketch(objects_list, [autoconstraints], [addTo], [delete],
               [name], [radiusPrecision], [tol])

Makes a Sketch objects_list with the given Draft objects.

Parameters
----------
objects_list: can be single or list of objects of Draft type objects,
    Part::Feature, Part.Shape, or mix of them.

autoconstraints(False): if True, constraints will be automatically added to
    wire nodes, rectangles and circles.

addTo(None) : if set to an existing sketch, geometry will be added to it
    instead of creating a new one.

delete(False): if True, the original object will be deleted.
    If set to a string 'all' the object and all its linked object will be
    deleted.

name('Sketch'): the name for the new sketch object.

radiusPrecision(-1): If <0, disable radius constraint. If =0, add individual
    radius constraint. If >0, the radius will be rounded according to this
    precision, and 'Equal' constraint will be added to curve with equal
    radius within precision.

tol(1e-3): Tolerance used to check if the shapes are planar and coplanar.
    Consider change to tol=-1 for a more accurate analysis.

References DraftVecUtils.angle(), and DraftVecUtils.equals().

◆ make_text()

def draftmake.make_text.make_text (   string,
  placement = None,
  screen = False 
)
Create a Text object containing the given list of strings.

The current color and text height and font specified in preferences
are used.

Parameters
----------
string: str, or list of str
    String to display on screen.
    If it is a list, each element in the list represents a new text line.

placement: Base::Placement, Base::Vector3, or Base::Rotation, optional
    It defaults to `None`.
    If it is provided, it is the placement of the new text.
    The input could be a full placement, just a vector indicating
    the translation, or just a rotation.

screen: bool, optional
    It defaults to `False`, in which case the text is placed in 3D space
    oriented like any other object, on top of a given plane,
    by the default the XY plane.
    If it is `True`, the text will always face perpendicularly
    to the camera direction, that is, it will be flat on the screen.

Returns
-------
App::FeaturePython
    A scripted object of type `'Text'`.
    This object does not have a `Shape` attribute, as the text is created
    on screen by Coin (pivy).

None
    If there is a problem it will return `None`.

◆ make_wire()

def draftmake.make_wire.make_wire (   pointslist,
  closed = False,
  placement = None,
  face = None,
  support = None,
  bs2wire = False 
)
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
a pointslist, you can also pass a Part Wire.

Parameters
----------
pointslist : [Base.Vector]
    List of points to create the polyline

closed : bool
    If closed is True or first and last points are identical, 
    the created polyline will be closed.

placement : Base.Placement
    If a placement is given, it is used.

face : Bool
    If face is False, the rectangle is shown as a wireframe, 
    otherwise as a face.   

support : 
    TODO: Describe

bs2wire : bool
    TODO: Describe

◆ make_workingplaneproxy()

def draftmake.make_wpproxy.make_workingplaneproxy (   placement)
make_working_plane_proxy(placement)

Creates a Working Plane proxy object in the current document.

Parameters
----------
placement : Base.Placement
    specify the p.

◆ makeAngularDimension()

def draftmake.make_dimension.makeAngularDimension (   center,
  angles,
  p3,
  normal = None 
)
Create an angle dimension. DEPRECATED. Use 'make_angular_dimension'.

References draftmake.make_dimension.make_angular_dimension().

◆ makeArray()

def draftmake.make_array.makeArray (   baseobject,
  arg1,
  arg2,
  arg3,
  arg4 = None,
  arg5 = None,
  arg6 = None,
  name = "Array",
  use_link = False 
)
Create an Array. DEPRECATED. Use 'make_array'.

◆ makeDimension()

def draftmake.make_dimension.makeDimension (   p1,
  p2,
  p3 = None,
  p4 = None 
)
Create a dimension. DEPRECATED. Use 'make_dimension'.

◆ makeLabel()

def draftmake.make_label.makeLabel (   targetpoint = None,
  target = None,
  direction = None,
  distance = None,
  labeltype = None,
  placement = None 
)
Create a Label. DEPRECATED. Use 'make_label'.

◆ makeLayer()

def draftmake.make_layer.makeLayer (   name = None,
  linecolor = None,
  drawstyle = None,
  shapecolor = None,
  transparency = None 
)
Create a Layer. DEPRECATED. Use 'make_layer'.

◆ makePathArray()

def draftmake.make_patharray.makePathArray (   baseobject,
  pathobject,
  count,
  xlate = None,
  align = False,
  pathobjsubs = [],
  use_link = False 
)
Create PathArray. DEPRECATED. Use 'make_path_array'.

References draftmake.make_patharray.make_path_array().

◆ makePointArray()

def draftmake.make_pointarray.makePointArray (   base,
  ptlst 
)
Create PointArray. DEPRECATED. Use 'make_point_array'.

References draftmake.make_pointarray.make_point_array().

◆ makeText()

def draftmake.make_text.makeText (   stringlist,
  point = App.Vector(0, 0, 0),
  screen = False 
)
Create Text. DEPRECATED. Use 'make_text'.

Variable Documentation

◆ clone

◆ makeBezCurve

draftmake.make_bezcurve.makeBezCurve = make_bezcurve

◆ makeBlock

draftmake.make_block.makeBlock = make_block

◆ makeBSpline

draftmake.make_bspline.makeBSpline = make_bspline

◆ makeCircle

◆ makeDrawingView

def draftmake.make_drawingview.makeDrawingView = make_drawing_view

◆ makeEllipse

draftmake.make_ellipse.makeEllipse = make_ellipse

◆ makeFacebinder

draftmake.make_facebinder.makeFacebinder = make_facebinder

◆ makeLine

◆ makePoint

draftmake.make_point.makePoint = make_point

◆ makePolygon

draftmake.make_polygon.makePolygon = make_polygon

◆ makeRectangle

draftmake.make_rectangle.makeRectangle = make_rectangle

◆ makeShape2DView

draftmake.make_shape2dview.makeShape2DView = make_shape2dview

◆ makeShapeString

draftmake.make_shapestring.makeShapeString = make_shapestring

◆ makeSketch

draftmake.make_sketch.makeSketch = make_sketch

◆ makeWire

draftmake.make_wire.makeWire = make_wire

◆ makeWorkingPlaneProxy

def draftmake.make_wpproxy.makeWorkingPlaneProxy = make_workingplaneproxy

◆ view_group

draftmake.make_layer.view_group = App.ParamGet("User parameter:BaseApp/Preferences/View")