#coding=utf-8
import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino.Geometry as rg
obj = rs.GetObjects("选取多个物体")
new_obj = [rs.coercebrep(j) for j in obj]
pts = [rg.VolumeMassProperties.Compute(i).Centroid for i in new_obj]
print pts
[sc.doc.Objects.AddPoint(i) for i in pts]
sc.doc.Views.Redraw()