Grasshopper

generative modeling for Rhino

Hi,

just took a look in the sdk looking for the Rhino command "patch".

And this is what I found:

Public Function RhinoCreateEdgeSrf(ByRef curves As array) As OnBrep

Since I haven't started to learn how to write VB-code yet, I just wonder if someone could tell me if RhinoCreateEdgeSrf does the same as "patch" - that is, creates a surface from the selected edges.

Views: 1225

Reply to This

Replies to This Discussion

Yes.
All you need is some basic text replacement in the code - see attached definition.

Marc - Thanks for the great work! This is very, very helpful.
Attachments:
how can i remove the script line that automatically bake grasshopper surface into rhino?
I tried to figure out a 07 version,but failed.can anyone help?

Thanks!
anyone help?the "bake" and "select" method drive me crazy....
Hi Blue,

can you be more specific? Which Bake and Select methods?

--
David Rutten
david@mcneel.com
Poprad, Slovakia
...........................
I'm so glad that you replied my question.what I mean is just how to bake GH object to rhino and how to select the object just baked in GH to make it a GH object?

In GH 06,i can write something like this:

..........................................
Dim bakedList As New List(Of MRhinoCurveObject)
For Each Crv As OnCurve In CrvList
Dim newCrv As MRhinoCurveObject = doc.AddCurveObject(crv)
newCrv.Select()

bakedlist.Add(newCrv)
Next
.............................
Dim go As New MRhinoGetObject()
go.EnablePreSelect(True)
go.EnablePostSelect(False)
go.GetObjects(0, 0)
If go.ObjectCount <> 0 Then
Dim objref As MRhinoObjRef = go.Object(0)
Dim objBrep As onBrep = objref.Brep

A = objBrep
............................
but in the new sdk,i just find the right class and method to make it right...

Look forward your answer.

Thank you !!
How would you go to add other options for the -Patch command?

I wanted to add a parameter StartingSurface for the patch, but I can't manage to make it work... something with data types not being the correct ones...

app.RunScript("_-patch PointSpacing=1 Stiffness=.1 AdjustTangency=Yes AtumaticTrim=Yes StartingSurface=" & startingSrf & " uSpans=" & uSpans & " vSpans=" & vSpans & " _Enter")

I pass the starting srf as an input... as OnSurface...

Any insights??
Thanks
Daniel
Great work, thank you very much.

RSS

Translate

Search Grasshopper

Members

© 2012   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service