Grasshopper

algorithmic modeling for Rhino

Hello,

I've been trying to find a method that will identify the UV bounds for a coordinate point on a surface so that I can use PointAt to produce a list of points.  Suggestions are very welcome.

Views: 1455

Replies to This Discussion

Hi,

Rhino.Geometry.Surface.ClosestPoint() will return u and v surface parameters of the closest point to your test point on surface. Which you can then use at PointAt() method.


Is that what you want?

Djordje,

Thank you for the suggestion but perhaps I should have be clearer: I'm trying to emulate the sDivide component.

The sDivide component uses two sets of int inputs to define u and v coordinates that are then returned as 2D and 3D points so a Point3d input is not desirable. That said an int or double passed directly into a PointAt is also not desirable UNLESS there is a method available to determine the upper bound of each.

A method for finding the upper bounds of a u and v on a surface would be very useful.

You are looking for Surface.Domain() method. Argument integer "0" will return the "u" domain; "1" will return "v" domain of the surface.

There's no direct RhinoCommon method that emulates the "SDivide" component.
You will have to divide the domain you got from the Surface.Domain() method into number of segments (the way you would do with "U" and "V" plugs of "SDivide"). Then feed those uv segments to PointAt() method, and that will return the point coordinates of each of those points on a surface.

Djordje - Thank you very much!

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service