parameters: (self, closed=False, cont=False)
docstring: Terminate the operation and close the spline if asked.
  
          Parameters
          ----------
          closed: bool, optional
              Close the line if `True`.
docstring_summary: Terminate the operation and close the spline if asked.
docstring_tokens: Terminate the operation and close the spline if asked .
function: def finish(self, closed=False, cont=False):
          """Terminate the operation and close the spline if asked.
  
          Parameters
          ----------
          closed: bool, optional
              Close the line if `True`.
          """
          if self.ui:
              self.bsplinetrack.finalize()
          if not utils.getParam("UiMode", 1):
              Gui.Control.closeDialog()
          if self.obj:
              # Remove temporary object, if any
              old = self.obj.Name
              todo.ToDo.delay(self.doc.removeObject, old)
          if len(self.node) > 1:
              # The command to run is built as a series of text strings
              # to be committed through the `draftutils.todo.ToDo` class.
              try:
                  rot, sup, pts, fil = self.getStrings()
                  Gui.addModule("Draft")
  
                  _cmd = 'Draft.makeBSpline'
                  _cmd += '('
                  _cmd += 'points, '
                  _cmd += 'closed=' + str(closed) + ', '
                  _cmd += 'face=' + fil + ', '
                  _cmd += 'support=' + sup
                  _cmd += ')'
                  _cmd_list = ['points = ' + pts,
                               'spline = ' + _cmd,
                               'Draft.autogroup(spline)',
                               'FreeCAD.ActiveDocument.recompute()']
                  self.commit(translate("draft", "Create B-spline"),
                              _cmd_list)
              except Exception:
                  _err("Draft: error delaying commit")
  
          # `Creator` is the grandfather class, the parent of `Line`;
          # we need to call it to perform final cleanup tasks.
          #
          # Calling it directly like this is a bit messy; maybe we need
          # another method that performs cleanup (superfinish)
          # that is not re-implemented by any of the child classes.
          gui_base_original.Creator.finish(self)
          if self.ui and self.ui.continueMode:
              self.Activated()
function_tokens: def finish ( self , closed = False , cont = False ) : if self . ui : self . bsplinetrack . finalize ( ) if not utils . getParam ( "UiMode" , 1 ) : Gui . Control . closeDialog ( ) if self . obj : # Remove temporary object, if any old = self . obj . Name todo . ToDo . delay ( self . doc . removeObject , old ) if len ( self . node ) > 1 : # The command to run is built as a series of text strings # to be committed through the `draftutils.todo.ToDo` class. try : rot , sup , pts , fil = self . getStrings ( ) Gui . addModule ( "Draft" ) _cmd = 'Draft.makeBSpline' _cmd += '(' _cmd += 'points, ' _cmd += 'closed=' + str ( closed ) + ', ' _cmd += 'face=' + fil + ', ' _cmd += 'support=' + sup _cmd += ')' _cmd_list = [ 'points = ' + pts , 'spline = ' + _cmd , 'Draft.autogroup(spline)' , 'FreeCAD.ActiveDocument.recompute()' ] self . commit ( translate ( "draft" , "Create B-spline" ) , _cmd_list ) except Exception : _err ( "Draft: error delaying commit" ) # `Creator` is the grandfather class, the parent of `Line`; # we need to call it to perform final cleanup tasks. # # Calling it directly like this is a bit messy; maybe we need # another method that performs cleanup (superfinish) # that is not re-implemented by any of the child classes. gui_base_original . Creator . finish ( self ) if self . ui and self . ui . continueMode : self . Activated ( )