algorithmic modeling for Rhino
Hello everyone,
The function Point3d.DistanceTo(other_point) measures a straight line between two points.
But I would like to measure the closest distance over a surface between two points.
So imagine a random organic surface with two points on it, how would I calculate the distance between them, while 'traveling' over the surface? Is there already a function in VB for this?
Thanks!
Fernando
Tags:
You'll need to create a geodesic curve. This is not a fast operation but I think it's the only option you have. Have a look at Rhino.Geometry.Surface.Shortpath method. This returns a curve the length of which is the distance you're after.
If your surface is always a sphere, or cylinder or some other simple shape, there may be faster ways to figure out the distance.
--
David Rutten
david@mcneel.com
Seattle, WA
Hi David,
I have looked at the Shortpath method. So do you mean I have to create a curve with this method, then check the length, and adjust the points until I have the correct length?
Thanks!
Yup. Creating a Geodesic and measuring the curve length is the only way to do it without writing a substantial amount of code yourself.
--
David Rutten
david@mcneel.com
Seattle, WA
Okay thanks! That is not a problem, the checking loop can be a bit optimized to keep the checking time down.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by