Grasshopper

algorithmic 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: 12091

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?

Thanks Marc, this is exactly what I was looking for. Great job.

Now a days there's a createpatch method in rhinocommon. No need to use the patch command in rhino (although i find it works a bit better).

A quick way to create a patch today is:
-Place a VB component into the canvas, set the x input as a list of geometrybase connect it to some geometry you want to create the patch from, connect a number to the y input indicating the number of spans (patch resolution) and paste the following code inside:

a = brep.CreatePatch(x.ToArray, y, y, doc.ModelAbsoluteTolerance)

Hi, I tried to input my curves but it just turns up as Null Values and doesn't work...

This seems to be only component that I can find that patches a surface in GH

I am using the newest Grasshopper 0.9 and Rhino 4 SR9

Is this a problem??

Thank you Marc, this works great, I was just wondering if you had a chance to test it with python. On the other note, I want to try it with 6 curves, it does not trim the patch surface and gives me an untrimmed surface, do you know how to fix that?

Thank you,

arman 

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

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service