The Draft CubicBezCurve tool was designed by carlopav to behave like the Bezier tool in Inkscape; see Bezier curve tool bug. Currently its icon is the same as the original Draft BezCurve. I took the liberty of adding a new icon, to make it clear this is a 3rd degree Bezier. This is in the wiki already, but it isn't in the FreeCAD repository. Can Yorik add the new icon? Is it ugly? Any other suggestions?
The Draft Edit Improved tool is being developed by carlopav as well, in order to edit nodes; see Draft Edit improvements. I'm still not entirely sure how this tool is supposed to work. As it is in development I believe it currently behaves strangely. Please add the necessary information to the wiki.
Is this tool supposed to replace the normal Draft Edit tool? Or is it supposed to be used alongside it? I also took the liberty of adding a new icon for it on the wiki; I just added a "plus" sign to indicate it is "improved".
----
When the 3rd degree Bezier tool was added, a Draft BezierTools command was also added to serve as a container. This works okay.
Code: Select all
class CommandBezierGroup:
def GetCommands(self):
return tuple(['Draft_BezCurve','Draft_CubicBezCurve'])
def GetResources(self):
return { 'MenuText': QtCore.QT_TRANSLATE_NOOP("Draft_BezierTools",'Bezier tools'),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Draft_BezierTools",'Bezier tools')
}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
FreeCADGui.addCommand('Draft_BezCurve',BezCurve())
FreeCADGui.addCommand('Draft_CubicBezCurve',CubicBezCurve())
FreeCADGui.addCommand('Draft_BezierTools', CommandBezierGroup())
Code: Select all
class CommandArcGroup:
def GetCommands(self):
return tuple(['Draft_Arc','Draft_Arc_3Points'])
def GetResources(self):
return { 'MenuText': QtCore.QT_TRANSLATE_NOOP("Draft_ArcTools",'Arc tools'),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Draft_ArcTools",'Arc tools')
}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
FreeCADGui.addCommand('Draft_Arc',Arc())
FreeCADGui.addCommand('Draft_Arc_3Points',Draft_Arc_3Points())
FreeCADGui.addCommand('Draft_ArcTools', CommandArcGroup())