algorithmic modeling for Rhino
Tags:
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.
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.
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:
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by