Grasshopper

algorithmic modeling for Rhino

Hello, I am a rookie of VB scripting. I have a problem for the grammar of "Rhutil.RhinoOffsetCurveOnSrf" as the pic show.

Could you please tell me the meaning of each parameter, and the difference between "double[]"and "double".

So appreciate your help.

Views: 556

Replies to This Discussion

There's a new component on the latest release that does just this.
The square brackets means that those specific arguments require an Array of doubles rather a single value. There are actually three ways (or sets of arguments) that you can use that method, and the one specifically that's in your screen shot is to allow for offsetting the curve different distances at different parts of the curve, so kinda like a variable offset. The two other ways are to supply a through point or just one distance. More likely than not you want the latter one, so that's what I'll explain.

First off you'll need to supply the curve that lies on the surface and the Brep that it lies on. If the curve doesn't lie on the surface than you will not get any results. After that you will need the distance to offset, and then the tolerance of that offset. Lastly, and most importantly, you will have to pass an array that you have created that Rhino will put the resulting curves into.
Thanks a lot for your explanation, I am still confused about the "double[]" and "curve[]". 2D 3D or 4D array, which I should choose for each array, and what 's the exact format to define them?

If possible, could you please give me a complete example for the "Rhutil.RhinoOffsetCurveOnSrf" sentence.

I am modeling a 3D truss based on a fancy surface, a project in Korea.I really find GH so helpful for our works.
I'm not really sure whats so confusing about it needing to be an array. If it needed to be a 2d, 3d, or 4d array I would have said so explicitly. As far as defining an array, that should be a VB 101 type thing, but its as simple as the following

Dim myCurves () as OnCurve

Depending on the complexity of your geometry, you may have to iterate through the offsetting process, once for each face of the brep, in order to get a complete result. It might be best if you post a simple example of the geometry in question with the curve you need to offset.
Thank you, I have found a solution in GH. There is a component "mirror surface" can solve it.
If I need offset the curve from one surf's normal by 2m, I can offset the surf by1m first, and then mirror the curve by the surface, then I get the curve I need

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service