def Draft::array | ( | objectslist, | ||
arg1, | ||||
arg2, | ||||
arg3, | ||||
arg4 = None | ||||
) |
array(objectslist,xvector,yvector,xnum,ynum) for rectangular array, or array(objectslist,center,totalangle,totalnum) for polar array: Creates an array of the objects contained in list (that can be an object or a list of objects) with, in case of rectangular array, xnum of iterations in the x direction at xvector distance between iterations, and same for y direction with yvector and ynum. In case of polar array, center is a vector, totalangle is the angle to cover (in degrees) and totalnum is the number of objects, including the original.
def Draft::cut | ( | object1, | ||
object2 | ||||
) |
def Draft::draftify | ( | objectslist | ) |
def Draft::extrude | ( | obj, | ||
vector | ||||
) |
def Draft::formatObject | ( | target, | ||
origin = None | ||||
) |
formatObject(targetObject,[originObject]): This function applies to the given target object the current properties set on the toolbar (line color and line width), or copies the properties of another object if given as origin. It also places the object in construction group if needed.
def Draft::fuse | ( | object1, | ||
object2 | ||||
) |
def Draft::getGroupContents | ( | objectslist | ) |
def Draft::getSVG | ( | obj, | ||
modifier = 100 , |
||||
textmodifier = 100 , |
||||
linestyle = "continuous" , |
||||
fillstyle = "shape color" , |
||||
direction = None | ||||
) |
getSVG(object,[modifier],[textmodifier],[linestyle],[fillstyle],[direction]): returns a string containing a SVG representation of the given object. the modifier attribute specifies a scale factor for linewidths in %, and textmodifier specifies a scale factor for texts, in % (both default = 100). You can also supply an arbitrary projection vector.
def Draft::getType | ( | obj | ) |
Definition at line 146 of file Draft.py.
Referenced by App::PropertyContainer::isHidden(), and App::PropertyContainer::isReadOnly().
def Draft::makeAngularDimension | ( | center, | ||
angles, | ||||
p3 | ||||
) |
def Draft::makeBlock | ( | objectslist | ) |
def Draft::makeBSpline | ( | pointslist, | ||
closed = False , |
||||
placement = None , |
||||
face = True , |
||||
support = None | ||||
) |
makeBSpline(pointslist,[closed],[placement]): Creates a B-Spline object from the given list of vectors. If closed is True or first and last points are identical, the wire is closed. If face is true (and wire is closed), the wire will appear filled. Instead of a pointslist, you can also pass a Part Wire.
def Draft::makeCircle | ( | radius, | ||
placement = None , |
||||
face = True , |
||||
startangle = None , |
||||
endangle = None , |
||||
support = None | ||||
) |
makeCircle(radius,[placement,face,startangle,endangle]): Creates a circle object with given radius. If placement is given, it is used. If face is False, the circle is shown as a wireframe, otherwise as a face. If startangle AND endangle are given (in degrees), they are used and the object appears as an arc.
def Draft::makeCopy | ( | obj | ) |
def Draft::makeDimension | ( | p1, | ||
p2, | ||||
p3 = None , |
||||
p4 = None | ||||
) |
makeDimension(p1,p2,[p3]) or makeDimension(object,i1,i2,p3) or makeDimension(objlist,indices,p3): Creates a Dimension object with the dimension line passign through p3.The current line width and color will be used. There are multiple ways to create a dimension, depending on the arguments you pass to it: - (p1,p2,p3): creates a standard dimension from p1 to p2 - (object,i1,i2,p3): creates a linked dimension to the given object, measuring the distance between its vertices indexed i1 and i2 - (object,i1,mode,p3): creates a linked dimension to the given object, i1 is the index of the (curved) edge to measure, and mode is either "radius" or "diameter".
def Draft::makeDrawingView | ( | obj, | ||
page, | ||||
lwmod = None , |
||||
tmod = None | ||||
) |
def Draft::makeLine | ( | p1, | ||
p2 | ||||
) |
def Draft::makePolygon | ( | nfaces, | ||
radius = 1 , |
||||
inscribed = True , |
||||
placement = None , |
||||
face = True , |
||||
support = None | ||||
) |
makePolgon(nfaces,[radius],[inscribed],[placement],[face]): Creates a polygon object with the given number of faces and the radius. if inscribed is False, the polygon is circumscribed around a circle with the given radius, otherwise it is inscribed. If face is True, the resulting shape is displayed as a face, otherwise as a wireframe.
def Draft::makeRectangle | ( | length, | ||
height, | ||||
placement = None , |
||||
face = True , |
||||
support = None | ||||
) |
def Draft::makeShape2DView | ( | baseobj, | ||
projectionVector = None | ||||
) |
def Draft::makeText | ( | stringslist, | ||
point = Vector(0,0 , |
||||
screen = False | ||||
) |
makeText(strings,[point],[screen]): Creates a Text object at the given point, containing the strings given in the strings list, one string by line (strings can also be one single string). The current color and text height and font specified in preferences are used. If screen is True, the text always faces the view direction.
def Draft::makeWire | ( | pointslist, | ||
closed = False , |
||||
placement = None , |
||||
face = True , |
||||
support = None | ||||
) |
makeWire(pointslist,[closed],[placement]): Creates a Wire object from the given list of vectors. If closed is True or first and last points are identical, the wire is closed. If face is true (and wire is closed), the wire will appear filled. Instead of a pointslist, you can also pass a Part Wire.
def Draft::move | ( | objectslist, | ||
vector, | ||||
copy = False | ||||
) |
move(objects,vector,[copy]): Moves the objects contained in objects (that can be an object or a list of objects) in the direction and distance indicated by the given vector. If copy is True, the actual objects are not moved, but copies are created instead.he objects (or their copies) are returned.
Definition at line 588 of file Draft.py.
Referenced by CmdSandboxMeshLoaderBoost::activated(), Gui::StatusWidget::adjustPosition(), Gui::MainWindow::loadWindowSettings(), Gui::Flag::mouseMoveEvent(), App::DocumentPy::moveObject(), and PartGui::ViewProviderMirror::unsetEdit().
def Draft::offset | ( | obj, | ||
delta, | ||||
copy = False , |
||||
bind = False , |
||||
sym = False , |
||||
occ = False | ||||
) |
offset(object,Vector,[copymode],[bind]): offsets the given wire by applying the given Vector to its first vertex. If copymode is True, another object is created, otherwise the same object gets offsetted. If bind is True, and provided the wire is open, the original and the offsetted wires will be bound by their endpoints, forming a face if sym is True, bind must be true too, and the offset is made on both sides, the total width being the given delta length.
rotate(objects,angle,[center,axis,copy]): Rotates the objects contained in objects (that can be a list of objects or an object) of the given angle (in degrees) around the center, using axis as a rotation axis. If axis is omitted, the rotation will be around the vertical Z axis. If copy is True, the actual objects are not moved, but copies are created instead. The objects (or their copies) are returned.
Definition at line 670 of file Draft.py.
Referenced by KDL::svd_eigen_Macie().
def Draft::scale | ( | objectslist, | ||
delta, | ||||
center = Vector(0,0 , |
||||
copy = False | ||||
) |
scale(objects,vector,[center,copy]): Scales the objects contained in objects (that can be a list of objects or an object) of the given scale factors defined by the given vector (in X, Y and Z directions) around given center. If copy is True, the actual objects are not moved, but copies are created instead. The objects (or their copies) are returned.
def Draft::select | ( | objs | ) |
Definition at line 274 of file Draft.py.
Referenced by Gui::Flag::contextMenuEvent(), boost::numeric::bindings::lapack::detail::gees(), SketcherGui::TaskSketcherConstrains::onSelectionChanged(), and Gui::View3DInventorViewer::viewSelection().
def Draft::shapify | ( | obj | ) |
def Draft::tolerance | ( | ) |
Definition at line 135 of file Draft.py.
Referenced by Approximate::Approximate(), Approximate::ComputeError(), Approximate::ErrorApprox(), Part::TopoShapePy::isInside(), Part::TopoShapePy::makeOffsetShape(), Part::TopoShapePy::makeShapeFromMesh(), makeSweepSurface(), Part::TopoShapePy::makeThickness(), makeTube(), and Part::TopoShapePy::tessellate().
string Draft::__author__ = "Yorik van Havre, Werner Mayer, Martin Burbaum, Ken Cline, Dmitry Chigrin" |
string Draft::__title__ = "FreeCAD Draft Workbench" |
string Draft::__url__ = "http://free-cad.sourceforge.net" |