Grasshopper

algorithmic modeling for Rhino

Hi all,
I want to have surface form 4 edge and there is no component for that. Do you know how to writ a script in order to load a command forms rhino?
Thank you

Views: 1322

Replies to This Discussion

Hi maysam,


Sub RunScript(ByVal arr_crv As List(Of OnCurve))

Dim arr_nc As New List (Of OnNurbsCurve)

For i As Int32=0 To arr_crv.Count - 1
Dim nurbsCrv As New OnNurbsCurve
arr_crv(i).GetNurbForm(nurbsCrv) 'convert OnCurve to OnNurbsCurve
arr_nc.Add(nurbsCrv)

Next

'create a untrimed surface from 2,3 or 4 edge
A = Rhutil.RhinoCreateEdgeSrf(arr_nc.ToArray())


End Sub


[u
THANK YOU VERY MUCH...little things make the world easier ! ;)
Thank you both, for the question and
obviously for the answer.
Very helpful.
P
If your edge curves aren't planar, Marc Hopperman made a component for creating surfaces that uses the Rhino patch command.

Patch

-taz
Hi taz,

patch is not the same as surface from edge ;-) ...
why do you use the patch? surface from edge also works with not planar curves!

Good point... I was wrong about the planar part.

Using "patch" is just another option, which works with any number of curves...
that's true.. :D
thank you O[u
hi o[U
Thank you for script. It’s very helpful.
But I thought I can easily use your script as base and modify it in order to replace with another command, but it didn’t work. Actually I want to run the Unroll Developable Surface command from rhino. Could you please help me with that?
Thank you
Hi maysam,

this is not that easy like surface from edge ;-)
take a look @ Marc Hoppermans scripts, he still shared a unroll surface script.

thanks to Marc
[u
Hi I tried your solution in GH but it doesnt work
I pasted your code in a VB component and it turned grey, but the input curve makes no surface..
what I'm doing wrong?maybe the wrong type of curve?
please help
thanks
hi ivan

you have to check list and oncurve @ the input variable cause you need 4 curves and this is, as you can read from the script text , an array
- to]

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service