@xiix.xoox wrote:
I make align Point and curve by move curve into location of point but i can run this script in 1 of 3 views(top,font,right). I want them can align in Perspective. Point is location doesn’t move
import rhinoscriptsyntax as rs #Initealazer LiP=[] def midpoint(object): #object = rs.GetObject("Select Curve",4) if rs.IsCurve(object): point = rs.CurveMidPoint(object) #print point #rs.AddPoint(point) LiP.append(point) else: rs.MessageBox('Ko phai Arc',6,'Note') def midpointCrvs(): locationP=0 liOj=rs.GetObjects("Chon cuver can di chuyen den:",4) for i in liOj: midpoint(i) LiC=rs.GetObjects("Chon cuver duoc di chuyen",4) for cv in LiC: SPC=rs.CurveStartPoint(cv) #print SPC SP=SPC[0] Pointmove=LiP[locationP] EPP=Pointmove[1] #print EPP LoCP=[SP,EPP,0] EPM=rs.coerce3dpoint(LoCP) #rs.AddPoint(EPM) TM=EPM-SPC dichuyen(TM,cv) locationP+=1 #Di chuyen curve def dichuyen(TM,ID): translation = TM rs.MoveObject(ID, translation) if __name__=='__main__': midpointCrvs()
Posts: 1
Participants: 1