algorithmic modeling for Rhino
hey all,
i need to move a box to a new location by adjusting the z value. the Rhino.MoveObject function needs a start point and an end point. the start point is the centroid of the brep but I am having trouble with the end point. I used the PointCoordinates to get the location of the start point but i need to use those to create a new point with the same x and y coordinates but with a new z coordinate.
In psudo code:
Dim box box = Rhino.GetObject("Select objects to move", , , True)
If IsNull(box) Then Exit Sub
Dim start: start= Rhino.SurfaceVolumeCentroid(box)
Dim coord: coord= Rhino.PointCoordinate(start)
Randomize
Dim i :i= int((15*RND) -15)
If 15>i<15 Then print("true")
Dim last: last= Rhino.AddPoints(coord(0),coord(1),coord(2)+i)
Call Rhino.MoveObject(box,start,last)
Any ideas?
Tags:
Hi Nels,
this is RhinoScript code, you'll probably get better answers if you post this on the Rhino developer newsgroup.
--
David Rutten
david@mcneel.com
Seattle, WA
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by