Draft: Housekeeping: call 'make' functions with new name (3)
This commit is contained in:
@@ -89,7 +89,7 @@ class Draft2Sketch(gui_base_original.Modifier):
|
||||
if not sel:
|
||||
return
|
||||
elif allDraft:
|
||||
_cmd = "Draft.makeSketch"
|
||||
_cmd = "Draft.make_sketch"
|
||||
_cmd += "("
|
||||
_cmd += "FreeCADGui.Selection.getSelection(), "
|
||||
_cmd += "autoconstraints=True"
|
||||
@@ -123,7 +123,7 @@ class Draft2Sketch(gui_base_original.Modifier):
|
||||
_cmd_df += "delete=False"
|
||||
_cmd_df += ")"
|
||||
|
||||
_cmd_sk = "Draft.makeSketch"
|
||||
_cmd_sk = "Draft.make_sketch"
|
||||
_cmd_sk += "("
|
||||
_cmd_sk += "FreeCAD.ActiveDocument." + obj.Name + ", "
|
||||
_cmd_sk += "autoconstraints=True"
|
||||
|
||||
@@ -171,7 +171,7 @@ class Line(gui_base_original.Creator):
|
||||
rot, sup, pts, fil = self.getStrings()
|
||||
|
||||
_base = DraftVecUtils.toString(self.node[0])
|
||||
_cmd = 'Draft.makeWire'
|
||||
_cmd = 'Draft.make_wire'
|
||||
_cmd += '('
|
||||
_cmd += 'points, '
|
||||
_cmd += 'placement=pl, '
|
||||
@@ -347,7 +347,7 @@ class Wire(Line):
|
||||
Gui.addModule("Draft")
|
||||
# The command to run is built as a series of text strings
|
||||
# to be committed through the `draftutils.todo.ToDo` class
|
||||
_cmd_list = ['wire = Draft.makeWire([' + pts + '])']
|
||||
_cmd_list = ['wire = Draft.make_wire([' + pts + '])']
|
||||
_cmd_list.extend(rems)
|
||||
_cmd_list.append('Draft.autogroup(wire)')
|
||||
_cmd_list.append('FreeCAD.ActiveDocument.recompute()')
|
||||
|
||||
@@ -63,7 +63,7 @@ class Draft_WorkingPlaneProxy:
|
||||
if hasattr(App, "DraftWorkingPlane"):
|
||||
App.ActiveDocument.openTransaction("Create WP proxy")
|
||||
Gui.addModule("Draft")
|
||||
_cmd = "Draft.makeWorkingPlaneProxy("
|
||||
_cmd = "Draft.make_workingplaneproxy("
|
||||
_cmd += "FreeCAD.DraftWorkingPlane.getPlacement()"
|
||||
_cmd += ")"
|
||||
Gui.doCommand(_cmd)
|
||||
|
||||
@@ -135,7 +135,7 @@ class Point(gui_base_original.Creator):
|
||||
_cmd_list))
|
||||
else:
|
||||
# Insert a Draft point
|
||||
_cmd = 'Draft.makePoint'
|
||||
_cmd = 'Draft.make_point'
|
||||
_cmd += '('
|
||||
_cmd += str(self.stack[0][0]) + ', '
|
||||
_cmd += str(self.stack[0][1]) + ', '
|
||||
|
||||
@@ -225,7 +225,7 @@ class Polygon(gui_base_original.Creator):
|
||||
_cmd_list)
|
||||
else:
|
||||
# Insert a Draft polygon
|
||||
_cmd = 'Draft.makePolygon'
|
||||
_cmd = 'Draft.make_polygon'
|
||||
_cmd += '('
|
||||
_cmd += str(self.ui.numFaces.value()) + ', '
|
||||
_cmd += 'radius=' + str(self.rad) + ', '
|
||||
|
||||
@@ -87,7 +87,7 @@ class Shape2DView(gui_base_original.Modifier):
|
||||
commitlist = []
|
||||
Gui.addModule("Draft")
|
||||
if len(objs) == 1 and faces:
|
||||
_cmd = "Draft.makeShape2DView"
|
||||
_cmd = "Draft.make_shape2dview"
|
||||
_cmd += "("
|
||||
_cmd += "FreeCAD.ActiveDocument." + objs[0].Name + ", "
|
||||
_cmd += DraftVecUtils.toString(vec) + ", "
|
||||
@@ -97,7 +97,7 @@ class Shape2DView(gui_base_original.Modifier):
|
||||
else:
|
||||
n = 0
|
||||
for o in objs:
|
||||
_cmd = "Draft.makeShape2DView"
|
||||
_cmd = "Draft.make_shape2dview"
|
||||
_cmd += "("
|
||||
_cmd += "FreeCAD.ActiveDocument." + o.Name + ", "
|
||||
_cmd += DraftVecUtils.toString(vec)
|
||||
|
||||
@@ -122,7 +122,7 @@ class ShapeString(gui_base_original.Creator):
|
||||
try:
|
||||
qr, sup, points, fil = self.getStrings()
|
||||
Gui.addModule("Draft")
|
||||
_cmd = 'Draft.makeShapeString'
|
||||
_cmd = 'Draft.make_shapestring'
|
||||
_cmd += '('
|
||||
_cmd += 'String=' + String + ', '
|
||||
_cmd += 'FontFile=' + FFile + ', '
|
||||
|
||||
Reference in New Issue
Block a user