title: Adding faces to an existing mesh with RhinoPython
body: <p>I am using RhinoPython along with RhinoCommon to attempt to add a face to an existing mesh.  Everything seems to work, but the face that is created is not in the same location as the points that I picked.  Could someone explain why the index numbers from the picked points don't seem to be the right ones?</p>
  
  <pre><code>import rhinoscriptsyntax as rs
  import Rhino
  import scriptcontext
  import rhinoscript.utility as rhutil
  
  def AddVertices(me):
      """Add face to a mesh"""
      mesh=rhutil.coercemesh(me)
  
      #select the vertices
      go=Rhino.Input.Custom.GetObject()
      go.GeometryFilter=Rhino.DocObjects.ObjectType.MeshVertex
      go.SetCommandPrompt("Get mesh vertex")
      go.GetMultiple(3,4)
      objrefs = go.Objects()
      point=[item.GeometryComponentIndex.Index for item in objrefs]
      go.Dispose()
  
      if len(point)==4:
          mesh.Faces.AddFace(point[0], point[1], point[2], point[3])
      else:
          mesh.Faces.AddFace(point[0], point[1], point[2])
      #replace mesh delete point
      scriptcontext.doc.Objects.Replace(me,mesh)
      mesh.Dispose()
      scriptcontext.doc.Views.Redraw()
  
  if( __name__ == "__main__" ):
      me=rs.GetObject("Select a mesh to add face")
      AddVertices(me)
  </code></pre>