@xiix.xoox wrote:
I make script get location of surface but don’t exit. How can fix them?
import rhinoscriptsyntax as rs import scriptcontext as sc import Rhino class COT: def __init__(self,loca, txt): self.loca=loca self.txt=txt def getloca(self): return loca def gettxt(self): return txt LitextP=[] def Getlocatxt(): while True: msg="Select suface:" srf_filter=Rhino.DocObjects.ObjectType.Surface rc,objref=Rhino.Input.RhinoGet.GetOneObject(msg,False,srf_filter) if not objref: break #pt = rs.SurfaceAreaCentroid(objref)[0] pt=rs.GetPointOnSurface(objref) Loca = rs.coerce3dpoint(pt) text=str(round(Loca[2])) text=text.split('.') text=text[0] #Tao cot IT=COT(Loca,text) LitextP.append(IT) #rs.AddTextDot("C"+text,Loca) if __name__=="__main__": Getlocatxt() for tp in LitextP: print tp
Posts: 1
Participants: 1
