algorithmic modeling for Rhino
I am just starting out with GH scripting, and want to move into component development. I am hoping I could keep all logic insular within the script.
My question is - with standard components like - Polygon Center, Deconstruct Brep, Brep Edges etc... how would one get this data within C#/VB script?
Is it possible to invoke those components programmatically?
Tags:
It is not easy to use functionality inside other components, it's often less work (and faster to boot) to just duplicate the functionality.
So would I be correct to for instance - get edges of a surface with something like:
private void RunScript(Surface S, ref object A) {
var ns = S.ToNurbsSurface();
var c1 = ns.InterpolatedCurveOnSurfaceUV(...);
..
}
?
No. A Surface in RhinoCommon doesn't support trimming information, so if you import your shapes as Surface types you lose this data. You'll have to import them as Brep to retain any trimming data. Then you iterate over all the edges in the brep to get the curves out.
If you know you'll never have trims, then you can revert to surfaces. However interpolating curves on a surface is definitely taking the long way round. You can extract isocurves from the surface which (when the UV points are at the surface domain extremes) represent the boundaries. The IsoCurve() method is available on all surfaces, you do not have to convert them to nurbs surfaces first.
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
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by