def getSVG(obj, scale=1, linewidth=0.35, fontsize=12, fillstyle="shape color", direction=None, linestyle=None, color=None, linespacing=None, techdraw=False, rotation=0, fillSpaces=False, override=True): """Return SVG string of the object. DEPRECATED. Use 'get_svg'.""" utils.use_instead("get_svg") return get_svg(obj, scale=scale, linewidth=linewidth, fontsize=fontsize, fillstyle=fillstyle, direction=direction, linestyle=linestyle, color=color, linespacing=linespacing, techdraw=techdraw, rotation=rotation, fillspaces=fillSpaces, override=override)
def makeLayer(name=None, linecolor=None, drawstyle=None, shapecolor=None, transparency=None): """Create a Layer. DEPRECATED. Use 'make_layer'.""" utils.use_instead("make_layer") return make_layer(name, linecolor, shapecolor, draw_style=drawstyle, transparency=transparency)
def getGroupContents(objectslist, walls=False, addgroups=False, spaces=False, noarchchild=False): """Return a list of objects from groups. DEPRECATED.""" utils.use_instead("get_group_contents") return get_group_contents(objectslist, walls, addgroups, spaces, noarchchild)
def makeAngularDimension(center, angles, p3, normal=None): """Create an angle dimension. DEPRECATED. Use 'make_angular_dimension'.""" utils.use_instead("make_angular_dimension") ang1, ang2 = angles angles = [math.degrees(ang2), math.degrees(ang1)] return make_angular_dimension(center=center, angles=angles, dim_line=p3, normal=normal)
def makePathArray(baseobject, pathobject, count, xlate=None, align=False, pathobjsubs=[], use_link=False): """Create PathArray. DEPRECATED. Use 'make_path_array'.""" utils.use_instead('make_path_array') return make_path_array(baseobject, pathobject, count, xlate, pathobjsubs, align, use_link)
def makeLayer(name=None, linecolor=None, drawstyle=None, shapecolor=None, transparency=None): """Create a Layer. DEPRECATED. Use 'make_layer'.""" utils.use_instead("make_layer") if not drawstyle: drawstyle = "Solid" if not transparency: transparency = 0 return make_layer(name, line_color=linecolor, shape_color=shapecolor, draw_style=drawstyle, transparency=transparency)
def makeLabel(targetpoint=None, target=None, direction=None, distance=None, labeltype=None, placement=None): """Create a Label. DEPRECATED. Use 'make_label'.""" utils.use_instead("make_label") _name = "makeLabel" subelements = None if target: try: utils.type_check([(target, (tuple, list))], name=_name) except TypeError: _err( translate( "draft", "Wrong input: must be a list of two elements. For example, [object, 'Edge1']." )) return None # In the old function `target` is the original parameter, # a list of two elements, the target object itself, and the subelement. # If the list is a single element, it is expanded to two elements # with the second being empty # target = [object] # target = [object, ] # target = [object, []] # target = (object, ) # target = (object, ()) # Parentheses can be used as well except a single pair # target = (object) target = list(target) if len(target) == 1: target.append([]) target_object = target[0] subelements = target[1] return make_label(target_point=targetpoint, placement=placement, target_object=target_object, subelements=subelements, label_type=labeltype, direction=direction, distance=distance)
def getText(plane, techdraw, tcolor, fontsize, fontname, angle, base, text, linespacing=0.5, align="center", flip=True): """Get the SVG representation of a textual element. DEPRECATED.""" utils.use_instead("get_text") return get_text(plane, techdraw, tcolor, fontsize, fontname, angle, base, text, linespacing, align, flip)
def getPath(obj, plane, fill, pathdata, stroke, linewidth, lstyle, fill_opacity, edges=[], wires=[], pathname=None): """Get the SVG representation from a path. DEPRECATED.""" utils.use_instead("get_path") return get_path(obj, plane, fill, pathdata, stroke, linewidth, lstyle, fill_opacity, edges=edges, wires=wires, pathname=pathname)
def getOvershoot(point, shootsize, color, linewidth, angle=0): """Get the SVG representation of a dimension line overshoot. DEPRECATED.""" utils.use_instead("get_overshoot") return get_overshoot(point, shootsize, color, linewidth, angle)
def getArrow(obj, arrowtype, point, arrowsize, color, linewidth, angle=0): """Get the SVG representation from an arrow. DEPRECATED.""" utils.use_instead("get_arrow") return get_arrow(obj, arrowtype, point, arrowsize, color, linewidth, angle)
def getPattern(pat): """Get an SVG pattern. DEPRECATED.""" utils.use_instead("get_pattern") return get_pattern(pat)
def getDXF(obj, direction=None): """Return DXF string of the object. DEPRECATED. Use 'get_dxf'.""" utils.use_instead("get_dxf") return get_dxf(obj, direction=direction)
def getCircle(plane, fill, stroke, linewidth, lstyle, edge): """Get the SVG representation from a circular edge.""" utils.use_instead("get_circle") return get_circle(plane, fill, stroke, linewidth, lstyle, edge)
def getMovableChildren(objectslist, recursive=True): """Return a list of objects with child objects. DEPRECATED.""" utils.use_instead("get_movable_children") return get_movable_children(objectslist, recursive)
def getEllipse(plane, fill, stroke, linewidth, lstyle, edge): """Get the SVG representation from an elliptical edge. DEPRECATED.""" utils.use_instead("get_ellipse") return get_ellipse(plane, fill, stroke, linewidth, lstyle, edge)
def getDiscretized(edge, plane): """Get a discretized edge on a plane. DEPRECATED.""" utils.use_instead("get_discretized") return get_discretized(edge, plane)
def makeText(stringlist, point=App.Vector(0, 0, 0), screen=False): """Create Text. DEPRECATED. Use 'make_text'.""" utils.use_instead("make_text") return make_text(stringlist, point, screen)
def convertDraftTexts(textslist=[]): """Convert Text. DEPRECATED. Use 'convert_draft_texts'.""" utils.use_instead("convert_draft_texts") return convert_draft_texts(textslist)
def getLayerContainer(): """Get the Layer container. DEPRECATED. Use 'get_layer_container'.""" utils.use_instead("get_layer_container") return get_layer_container()
def getLineStyle(linestyle, scale): """Return a Line style. DEPRECATED. Use get_line_style.""" utils.use_instead("get_line_style") return get_line_style(linestyle, scale)
def getGroupNames(): """Return a list of group names. DEPRECATED.""" utils.use_instead("get_group_names") return get_group_names()
def makePointArray(base, ptlst): """Create PointArray. DEPRECATED. Use 'make_point_array'.""" utils.use_instead('make_point_array') return make_point_array(base, ptlst)
def getProj(vec, plane=None): """Get a projection of a vector. DEPRECATED.""" utils.use_instead("get_proj") return get_proj(vec, plane)