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

This commit is contained in:
Roy
2022-02-17 16:29:20 +01:00
committed by Chris Hennes
parent a7e356c865
commit fae36b2da0
6 changed files with 13 additions and 13 deletions

View File

@@ -199,7 +199,7 @@ void DraftDxfRead::OnReadDimension(const double* s, const double* e, const doubl
Base::Interpreter().runStringArg("p1=FreeCAD.Vector(%f,%f,%f)",s[0]*optionScaling,s[1]*optionScaling,s[2]*optionScaling);
Base::Interpreter().runStringArg("p2=FreeCAD.Vector(%f,%f,%f)",e[0]*optionScaling,e[1]*optionScaling,e[2]*optionScaling);
Base::Interpreter().runStringArg("p3=FreeCAD.Vector(%f,%f,%f)",point[0]*optionScaling,point[1]*optionScaling,point[2]*optionScaling);
Base::Interpreter().runString("Draft.makeDimension(p1,p2,p3)");
Base::Interpreter().runString("Draft.make_dimension(p1,p2,p3)");
}
}

View File

@@ -38,7 +38,7 @@ import draftfunctions.rotate as rotate
def array(objectslist, arg1, arg2, arg3, arg4=None, arg5=None, arg6=None):
"""
This function creates an array of independent objects.
Use makeArray() to create a parametric array object.
Use make_array() to create a parametric array object.
Creates an array of the given objects (that can be an object or a list
of objects).

View File

@@ -86,7 +86,7 @@ class Array(gui_base_original.Modifier):
if Gui.Selection.getSelection():
obj = Gui.Selection.getSelection()[0]
Gui.addModule("Draft")
_cmd = 'Draft.makeArray'
_cmd = 'Draft.make_array'
_cmd += '('
_cmd += 'FreeCAD.ActiveDocument.' + obj.Name + ', '
_cmd += 'FreeCAD.Vector(1, 0, 0), '

View File

@@ -51,8 +51,8 @@ def make_array(base_object,
Rectangular array
-----------------
make_array(object,xvector,yvector,xnum,ynum,[name])
makeArray(object,xvector,yvector,zvector,xnum,ynum,znum,[name])
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
@@ -60,14 +60,14 @@ def make_array(base_object,
Polar array
-----------
makeArray(object,center,totalangle,totalnum,[name]) for polar array, or
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
--------------
makeArray(object,rdistance,tdistance,axis,center,ncircles,symmetry,[name])
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,

View File

@@ -33,10 +33,10 @@ import draftutils.gui_utils as gui_utils
def make_copy(obj, force=None, reparent=False, simple_copy=False):
"""makeCopy(object, [force], [reparent])
"""make_copy(object, [force], [reparent], [simple_copy])
Make an exact copy of an object and return it.
Parameters
----------
obj :
@@ -49,7 +49,7 @@ def make_copy(obj, force=None, reparent=False, simple_copy=False):
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
Create a simple copy of the object (a new non parametric
Part::Feature with the same Shape as the given object).
"""
if not App.ActiveDocument:
@@ -59,7 +59,7 @@ def make_copy(obj, force=None, reparent=False, simple_copy=False):
newobj = None
if simple_copy and hasattr(obj, 'Shape'):
# this was the old implementation that is actyally not used by default
# this was the old implementation that is actually not used by default
_name = utils.get_real_name(obj.Name)
newobj = App.ActiveDocument.addObject("Part::Feature", _name)
newobj.Shape = obj.Shape

View File

@@ -884,7 +884,7 @@ class svgHandler(xml.sax.ContentHandler):
p2 = Vector(float(p2[0]), -float(p2[1]), 0)
p3 = data["freecad:dimpoint"]
p3 = Vector(float(p3[0]), -float(p3[1]), 0)
obj = Draft.makeDimension(p1, p2, p3)
obj = Draft.make_dimension(p1, p2, p3)
self.applyTrans(obj)
self.format(obj)
self.lastdim = obj