Grasshopper

algorithmic modeling for Rhino

Hi Guys

I was quite exploring grasshopper and it is not bad.
Intuitive to use.

I was curious about the following commands:
- blend surface
- curve network
- fillet

Might those or could those be implemented at one point?

We would consider using GH in Rhino to simulate parametric
modeling approaches.

Views: 13886

Replies to This Discussion

None of these functions are available with the Rhino SDK, which means that David would have to cook up his own solution for them rather than using Rhino's. I'm not sure if there are any plans to add these (for v5 maybe), but I know that developers have made requests for the network and fillet functions to be exposed.
in our area here solidworks is more and more replacing rhino
and the main reason is just parametric modeling.

grasshopper is an interesting approach allowing some sort of
conceptual cad.

if it would feature more functions like blend or fillet it would be
very usable for this approach.
hi damien

so fillet is already out.... RhUtil.RhinoGetFilletPoints
wait what? how do you use it than in GH?
so if you want to fillet surfaces you have to extract the edges of the two surfaces fillet the lines join them and loft them again and you have the new filleted surface... so it is also possible to fillet with variation of the radius.... its the same like the fillet surface works

for scripting just read in the sdk about the RhUtil.RhinoGetFilletPoints function

best to]
"RhUtil.RhinoGetFilletPoints"

These are curve fillets, not surface edge fillets.

Many commands in Rhino are not exposed in the SDK. This is not because we don't want to expose them, it is merely because whoever wrote those commands was too lazy to provide a proper SDK for the functionality.

We'll get functions like NetworkSrf and BlendSrf into the SDK eventually. We've hired another programmer to help out with this process (so that the people who understand how to write complicated commands such as NetworkSrf won't get slowed down by trivial work), but it's a Rhino5 thing.

However, just putting the function in the SDK is often not enough. Many commands feature at least as much UI code as they do geometry code. Sometimes it is very difficult to do something programmatically even when it's easy with the mouse.


--
David Rutten
david@mcneel.com
Seattle, WA
I understand what you mean very well.


Well I hope it will work out at one point.

Rhinos lack of history is a major disadvantage.

Seven years later and what I expected to be there isn't. Still no blend surface, and I can't even Rhino command line script it due to the trivial edge clicking requirement. It's only in the WIP, so if I wanted to use it for a client, really I can't since they will freak out about a weird version of Rhino being needed.

http://discourse.mcneel.com/t/scripting-blendsrf/24635

http://mcneel.myjetbrains.com/youtrack/issue/RH-29978

What you call trivial is the core of your business, the core of your product, meaning Grasshopper user ability to access serious commands or not. This is, after all, one of the most important commands in the entire Rhino universe. Without it, I have to just completely abandon NURBS and edit meshes since I can't join surfaces smoothly so I have to stop using fragments at all and only meshes afford local detail well compared to single NURBS surfaces. Only polysurfaces can mix in little high UV count blends to deal with tight local detail.

I guess I'll switch to the WIP now. Test that, and just tell clients, hey, that's life. It's not exactly easy to find the WIP download, being a hidden "Serengeti" topic on the main Rhino forum, but I can offer the membership link.

http://discourse.mcneel.com/t/how-do-i-actually-download-serengeti/...

http://www.rhino3d.com/download/rhino/wip

I had to manually install IronPython 2.7.5 too, to fix a broken Python system:

http://ironpython.codeplex.com/releases/view/169382

Now, where on Earth do I find the Rhinocommon manual for Rhino 6 WIP?

I guess it's within the main Rhino EditPythonScript editor, though that can't be searched like a normal manual:

CreateBlendSurface(face0: BrepFace, edge0: BrepEdge, domain0: Interval, rev0: bool, continuity0: BlendContinuity, face1: BrepFace, edge1: BrepEdge, domain1: Interval, rev1: bool, continuity1: BlendContinuity) -> Array[Brep]

Makes a surface blend between two surface edges.

face0: First face to blend from.
edge0: First edge to blend from.
domain0: The domain of edge0 to use.
rev0: If false, edge0 will be used in its natural direction. If true, edge0 will be used in the reversed direction.

continuity0: Continuity for the blend at the start.
face1: Second face to blend from.
edge1: Second edge to blend from.
domain1: The domain of edge1 to use.
rev1: If false, edge1 will be used in its natural direction. If true, edge1 will be
used in the reversed direction.

continuity1: Continuity for the blend at the start.
Returns: Array of Breps if successful.

Now I have normal, productive homework, of figuring out how to specify edges from a Python script.

I'll just sell this extra special capability of Rhino 5 WIP from Grasshopper as a cutting edge advanced new feature other lowly consultants can't match, assuming I can get it to work first.

The initial strategy is to Grasshopper create discrete surfaces, blow holes in a parent surface, scale down and move the little surfaces away, and just blend everything together into a polysurface. Then a client won't freak out so badly when I show them how to use meshes instead, since at least there's an alternative straight from NURBS, that maybe isn't as creatively open ended, but will get them out of a bind if their own client freaks out about meshes converted to NURBS via ZBrush ZRemesher run through T-Splines to get a smooth NURBS polysurface surface that looks like odd patchwork.

Alas, the above Rhinocommon blurb is incomplete, lacking info about what values for continuity are defined as, such as position, tangency, or curvature. I guess I'll just use try numbers.

Attachments:

Ah, the Grasshopper Python editor has a new interface in Rhino 6, since Rhino 6 WIP comes with Grasshopper 1.X, a better editor with font options (FINALLY!), and a help system for Rhinocommon that was lacking in the Rhino 5 Grasshopper 0.9.X Python component editor:

The best screen font I've found is called Volter (Goldfish).

It shows up after I type the first (.

I also found BlendContinuity values here:

http://developer.rhino3d.com/api/RhinoCommon/html/T_Rhino_Geometry_...

Position 0

Tangency 1

Curvature 2

However, the command fails with this error unless I use zero, but position is not a blend at all, just a straight loft, though the command with zero gives no output, just an empty brep list.

Runtime error (TypeErrorException): Cannot convert numeric value 1 to BlendContinuity. The value must be zero.

Why do you guys not provide simple examples in the reference? Rhino.Geometry.BlendContinuity has no example of how to use it. If I set b = Rhino.Geometry.BlendContinuity() and print b it says "position." How do I set it to tangency? I have no idea. You can't put a number in the parentheses.

A related command has the same structure:

http://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_...

The trick seems to be to use a dot structure to set the continuity type, but I still get an empty brep array output, despite confirming my brep edges are correct by converting them later to curves using BrepEdgeA.ToNurbsCurve().

BlendBrep = Rhino.Geometry.Brep.CreateBlendSurface(BrepFaceA, BrepEdgeA, Interval, False, Rhino.Geometry.BlendContinuity.Tangency, BrepFaceB, BrepEdgeB, Interval, False, Rhino.Geometry.BlendContinuity.Tangency)

My Death Star is delayed again.

Is my interval wrong? I tried 0.1 or 2.0 etc. with no difference in output. Using the length of the edge curves for interval still outputs nothing.

Here is the unworking script with a cleaner edge since the first one had two edges on the big ball, for whatever reason, made by splitting it with a sphere instead of a plane. The new CreateBlendSurface command gives no output.

I'm worried this command lacks the edge chaining ability of the Rhino command but hopefully I can create clean holes instead.

Attachments:

The interval was indeed wrong. The brep edge intervals had oddly negative to zero numbers so the magic lines are now:

Interval_A = Rhino.Geometry.Interval(BrepA.Edges[1].Domain[0], BrepA.Edges[1].Domain[1])


Interval_B = Rhino.Geometry.Interval(BrepB.Edges[1].Domain[0], BrepB.Edges[1].Domain[1])

Here is Tangency instead of Curvature:

Attachments:

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