parameters: (objectslist)
return_statement: return base
docstring: mergeCells(objectslist): merges the objects in the given list
      into one. All objects must be of the same type and based on the Cell
      object (cells, floors, buildings, or sites).
docstring_summary: mergeCells(objectslist): merges the objects in the given list
      into one. All objects must be of the same type and based on the Cell
      object (cells, floors, buildings, or sites).
docstring_tokens: mergeCells ( objectslist ) : merges the objects in the given list into one . All objects must be of the same type and based on the Cell object ( cells floors buildings or sites ) .
function: def mergeCells(objectslist):
      '''mergeCells(objectslist): merges the objects in the given list
      into one. All objects must be of the same type and based on the Cell
      object (cells, floors, buildings, or sites).'''
      if not objectslist:
          return None
      if not isinstance(objectslist,list):
          return None
      if len(objectslist) < 2:
          return None
      typ = Draft.getType(objectslist[0])
      if not(typ in ["Cell","Floor","Building","Site"]):
                 return None
      for o in objectslist:
          if Draft.getType(o) != typ:
              return None
      base = objectslist.pop(0)
      for o in objectslist:
          l = base.Components
          for c in o.Components:
              if not c in l:
                  l.append(c)
          base.Components = l
          FreeCAD.ActiveDocument.removeObject(o.Name)
      FreeCAD.ActiveDocument.recompute()
      return base
function_tokens: def mergeCells ( objectslist ) : if not objectslist : return None if not isinstance ( objectslist , list ) : return None if len ( objectslist ) < 2 : return None typ = Draft . getType ( objectslist [ 0 ] ) if not ( typ in [ "Cell" , "Floor" , "Building" , "Site" ] ) : return None for o in objectslist : if Draft . getType ( o ) != typ : return None base = objectslist . pop ( 0 ) for o in objectslist : l = base . Components for c in o . Components : if not c in l : l . append ( c ) base . Components = l FreeCAD . ActiveDocument . removeObject ( o . Name ) FreeCAD . ActiveDocument . recompute ( ) return base