option, after downloading check if .ghuser files are blocked (right click -> "Properties" and select "Unblock"). Then paste them in File->Special Folders->User Object Folder. You can download the example files from here. They act in similar way, Ladybug Photovoltaics components do: we pick a surface, and get an answer to a question: "How much thermal energy, for a certain number of persons can my roof, building facade... generate if I would populate them with Solar Water Heating collectors"? This information can then be used to cover domestic hot water, space heating or space cooling loads:
Components enable setting specific details of the system, or using simplified ones. They cover analysis of domestic hot water load, final performance of the SWH system, its embodied energy, energy value, consumption, emissions... And finding optimal system and storage size. By Dr. Chengchu Yan and Djordje Spasic, with invaluable support of Dr. Willian Beckman, Dr. Jason M. Keith, Jeff Maguire, Nicolas DiOrio, Niraj Palsule, Sargon George Ishaya and Craig Christensen. Hope you will enjoy using the components! References: 1) Calculation of delivered energy: Solar Engineering of Thermal Processes, John Wiley and Sons, J. Duffie, W. Beckman, 4th ed., 2013. Technical Manual for the SAM Solar Water Heating Model, NREL, N. DiOrio, C. Christensen, J. Burch, A. Dobos, 2014. A simplified method for optimal design of solar water heating systems based on life-cycle energy analysis, Renewable Energy journal, Yan, Wang, Ma, Shi, Vol 74, Feb 2015
2) Domestic hot water load: Modeling patterns of hot water use in households, Ernest Orlando Lawrence Berkeley National Laboratory; Lutz, Liu, McMahon, Dunham, Shown, McGrue; Nov 1996. ASHRAE 2003 Applications Handbook (SI), Chapter 49, Service water heating
3) Mains water temperature Residential alternative calculation method reference manual, California energy commission, June 2013. Development of an Energy Savings Benchmark for All Residential End-Uses, NREL, August 2004. Solar water heating project analysis chapter, Minister of Natural Resources Canada, 2004.
4) Pipe diameters and pump power: Planning & Installing Solar Thermal Systems, Earthscan, 2nd edition
5) Sun postion and POA irradiance, the same as for Ladybug Photovoltaics (Michalsky (1988), diffuse irradiance by Perez (1990), ground reflected irradiance by Liu, Jordan (1963))
6) Optimal system and storage tank size: A simplified method for optimal design of solar water heating systems based on life-cycle energy analysis, Renewable Energy journal, Yan, Wang, Ma, Shi, Vol 74, Feb 2015.…
ome work to create a ZScript macro for custom routines, but you can record those in ZBrush and then merely need to edit them into my script, inline, as bulk multiple-lines you just paste in, no problem as long as you strip the ZBrush button definition at the beginning.
ZBrush has a very high initial learning curve because of its non-standard interface. However, it has the world's most powerful quad remeshing and now mesh Booleans too. I needed a replacement for slow and especially non-robust marching cubes (Cocoon/Monolith/Dodo/Aether etc. on Grasshopper) that tended to bog down or blow up. IntraLattice was a step in a good direction but it can't merge fattened lines that merely cross each other with no breaks or that physically overlap on purpose to have many curve on in to a hub. But with $800 ZBrush 4R8, the latest version, that I can create English language ZScripts for, I suddenly have, often in the blink of an eye, or at worst a few seconds, right back into Rhino Grasshopper, a perfectly joined, airtight and smoothed mesh blending of upwards of thousands of input mesh pieces that overlap in ways Rhino will never Boolean union.
There is no complicated installation of anything since it's all done in Python.
The ZBrush program itself pops up while it works, and is then automatically backgrounded to bring you back to Grasshopper. It keeps running though, for fast iterations with no program startup time.
This is a general toolkit to expose myriad very advanced features of ZBrush into being just another Grasshopper plug-in like the rest.
It works by accepting a Grasshopper mesh and writing it to disk as an OBJ file, then incorporates ZBrush settings for a given command into a text format ZScript file, also written to disk from Python based on Grasshopper inputs, then ZBrush is told to run the script via Windows command line, and the exported OBJ output is read back from disk back into a Rhino Grasshopper mesh, in about a hundred lines of code.
Despite a change in mesh definition in Rhinocommon from version 5 to 6, I made it work on both versions.
So far this is only one command, the newly improved mesh Boolean union. It gives quad meshes, but they still look healthy when quickly triangulated in Rhino (as seen on top, above).
The ZBrush ZRemesher is utterly astounding in ability to transform any mesh into a direction following, error free quad mesh that can be converted to NURBS actually, via T-Splines smooth mode. That will be the next port to Grasshopper. I hope architects pick up on this more orderly manner of patterning surfaces than the alien slime of random point Voronoi.
Commercial software has the best code, not open source stuff, so far, so this is serious work to bring world class tools into Grasshopper where we can rapidly prototype computational strategies.
Here is a thread with several examples of ZBrush Boolean union remeshing applied to 3D trusses, compared to both IntraLattice and marching cubes:
http://www.grasshopper3d.com/forum/topics/custom-unit-cell-bug-in-intralattice-plug-in?commentId=2985220%3AComment%3A1828609
The same strategy of generating script files I used to port OpenFlipper, here, for triangle remeshing, which can now be combined with ZBrush Boolean unions of arbitrary assemblies of mesh units:
http://www.grasshopper3d.com/forum/topics/best-uniform-remesher-for-patterning-organic-suraces
UPDATE: I revamped the workflow so now components feed raw ZScript into a sequencer. Then only a single ZScript is assembled and sent to ZBrush so Python never gets ahead of ZBrush (!):
It is easy to DIY roll your own now:
…
Added by Nik Willmore at 6:48am on October 12, 2017
RESENTERS PETER ARBOUR seele KEITH BOSWELL Skidmore Owings & Merrill MARK E. DANNETTEL Thornton Thomasetti LISA IWAMOTO IwamotoScott JASON KELLY JOHNSONFuture Cities Lab/California College of the Arts HAO KO Gensler BILL KREYSLER Kreysler & Associates ANDREW KUDLESS Matsys/California College of the Arts CHRIS LASCH Aranda\Lasch ARNOLD LEE HOK MIC PATTERSON Enclos, Corp. M. MIN RA Front GEOFF ROSSI Element DENNIS SHELDEN Gehry Technologies ANN SMITH Cambridge Architectural MARCELLO SPINAP-A-T-T-E-R-N-S SANJEEV TANKHA Buro Happold BEN TRANEL Gensler PHIL WILLIAMS Webcor Builders & Consulting Group
DIGITAL FABRICATION WORKSHOPS
8 LU/HSW or 8 LU credits (depending upon workshop choice)
Friday, July 27th 2012 9:00 AM – 6:00 PMCalifornia College of the Arts San Francisco, California
PARAMETRIC ENVELOPES WITH GRASSHOPPERANDREW KUDLESS Matsys Design/California College of the Arts
COMPOSITE FACADES IN ARCHITECTUREBILL KREYSLER & JOSHUA ZABEL Kreysler & Associates
RESPONSIVE BUILDING FACADESJASON KELLY JOHNSON Future Cities Lab/California College of the Arts
SCRIPTED FACADESCHRIS LASCH Aranda/Lasch
PARAMETRIC FACADE TECTONICSKEVIN MCCLELLAN & ANDREW VRANA Digital Fabrication Alliance
BIM MODELING WITH REVIT/INTRO TO VASARIGERMAN APARICIO California College of the Arts & Autodesk Fellow
Facade technologies are developing at a more dynamic rate than almost any other issue related to construction today with an impact on performance, sustainability, materials, fabrication, design, delivery and much more. What was once thought impossible is now an everyday reality, and the future promises accelerating change.
Presented by Enclos and The Architect’s Newspaper, COLLABORATION will bring together in a two-day event, the industry, the profession, and the academy to explore the evolution and the issues surrounding today’s high tech building envelope through case studies and lectures presented by foremost
practitioners, as well as panel discussions, and workshops conducted by leaders in the AEC profession.
Aimed at architects, building owners and developers, general contractors, engineers, fabricators, material suppliers, educators, and students, the event’s panels and sessions address the transformative opportunities created by new technologies and resources. From using BIM for communicating effectively with fabricators, to energy modeling, to retrofitting practices and the latest design tools, the COLLABORATION conference offers an unprecedented opportunity to survey the possibilities of designing in the digital age.
Who Should Attend
Architects, designers, engineers, building owners, developers, and facade consultants interested in gaining increased understanding of cutting-edge building envelope technologies.…
re
Minimum principal curvature
by the way, look at this picture.... if I only use surface curvature the result doesn't seems right as well. Maybe I did some mistakes? thanks :)
Gene
import rhinoscriptsyntax as rs
import Rhino as rc
a = []
b = []
if ((u or v) is None):
u = 0.5
v = 0.5
c_u = Srf.IsoCurve(0,u)
c_v = Srf.IsoCurve(1,v)
if (Density < 2 or Density is None):
Density = 2
if Scale is None:
Scale = 6
ScaleFactor = -Scale
for i in range(0, Density+1):
Normal_u = Srf.NormalAt(i/Density, u)
su = Srf.CurvatureAt(i/Density, u)
#s = Srf.CurvatureAt(0.5, 0.5)
#print(s.Kappa(0.5))
Normal_u_length = rs.VectorLength(c_u.CurvatureAt(i/Density))
#Normal_u_length = Normal_u_length*rs.VectorLength(s.Direction(0))
Normal_u_length = Normal_u_length * su.Kappa(0.5)
Normal_u= Normal_u*Normal_u_length
#print(type(Normal_u))
Point_u = c_u.PointAt(i/Density)
a.append(Point_u)
b.append(Point_u + Normal_u*ScaleFactor)
for i in range(Density+1):
Normal_v = Srf.NormalAt(v, i/Density)
sv = Srf.CurvatureAt(v, i/Density)
Normal_v_length = rs.VectorLength(c_v.CurvatureAt(i/Density))
Normal_v_lengthTuple = rs.SurfaceCurvature(Srf, [v,i/Density])
Normal_v_length = Normal_v_length * Normal_v_lengthTuple[7]
Normal_v = Normal_v*Normal_v_length
Point_v = c_v.PointAt((i)/Density)
a.append(Point_v)
b.append(Point_v + Normal_v*ScaleFactor)
mid = int(len(b)/2)
bu = b[:mid]
bv = b[mid:]…
mpiled. The six potential sources are:
Primitive types such as Booleans, Integers, Colors, Strings, etc. Grasshopper uses these types itself a lot.
Other .NET Framework types such as System.Drawing.PointF or System.Collections.Generic.HashSet<T>. Grasshopper does not use these types to during component <-> component communication, but someone else might.
RhinoCommon types such as Point3d, Circle, Plane, Brep, Curve etc. Many of these are used natively, but certainly not all of them.
Types defined in Grasshopper itself.
Types defined in plug-ins for Grasshopper.
Types defined in VB/C#/Python scripts that run inside Grasshopper.
Although clearly some of these are known to the developer during the time of writing, not all of them can be. Yet Grasshopper still needs to be able to interpret and use types it may know nothing about. Some of the things Grasshopper needs to be able to do with data of any type are:
Convert it to text so tooltips and panels can be populated with useful descriptions of data.
Convert it to and from other types.
Duplicate data so we can change it without affecting the original.
Test data for validity.
Save types to *.gh files and load them back in. (note: this works especially poorly at the moment.)
Preview geometric types in the viewport.
Bake geometric types to the Rhino document.
Transform geometric types.
Calculate bounding boxes of geometric types.
Be able to store null states of each type.
To overcome the problem of (A) needing to do so many things while (B) knowing nothing about the types in advance an interface is defined in the Grasshopper SDK and all data which is stored inside parameters must implement this interface. This allows GH to do the things from the second list to all the types from the first list.
The IGH_Goo interface is is usually nothing more than a wrapper around the actual data which provides a bunch of functionality for whatever it wraps. For example take the primitive Boolean (or bool in C#). It's a structure so it can never be null, and it can only exist in either a true or a false state.
GH uses booleans a lot so it provides an IGH_Goo implementation for Boolean. This wrapper class tells GH that a boolean value can be converted into an integer (false -> 0, true -> 1), into a colour (false -> black, true -> white), into a string (false -> "false", true -> "true) and so on. The wrapper class also knows how to write and read boolean values to and from *.gh files, and because we're now dealing with a wrapper class we can have null instances in a collection of boolean values. The wrapper doesn't tell GH how to preview or bake booleans, because booleans are not a geometric type of data.
Because so many data types are not in any way geometric, there is a second interface called IGH_GeometricGoo which extends IGH_Goo with stuff like transforming, bounding-boxing etc.
Almost always component developers and scripters can ignore any of the IGH_Goo types, because they are mostly used for internal bookkeeping. However sometimes a developer will either want to access the functionality that goo provides or they wish to inject a new, previously unknown type of data into a Grasshopper file. In these cases some knowledge of IGH_Goo and its derived interface and classes is required.…
Added by David Rutten at 10:29am on August 11, 2016
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/23846
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.
…
peuvent se diviser une surface avec ne importe quel motif imaginable. 3. Ici, je fournir un moyen de le faire via Lunchbox ... cela fonctionne mais il est fixe et donc nous avons besoin de jouer avec des arbres de données afin de créer le motif approprié par cas. 4. L'autre composante est un joint C # qui fait beaucoup de choses autres que de diviser ne importe quelle collection de points avec de nombreux modèles (voir le modèle ANDRE que je ai fait pour vous). 5. Vous devez décomposer une polysurface en morceaux afin de travailler sur les subdivisions. 6. Je donne une autre définition ainsi que pourrait agir comme un tutoriel sur la façon de traiter des ensembles de points via des composants de GH standards et des méthodes classiques.
Avertissez si tous ceux-ci apparaissent floue pour vous: Si oui, je pourrais écrire une définition utilisant des composants de GH classiques - mais vous perdrez les variations de motifs de division.
mieux, Peter
…
ion of both Ladybug and Honeybee. Notable among the new components are 51 new Honeybee components for setting up and running energy simulations and 15 new Ladybug components for running detailed comfort analyses. We are also happy to announce the start of comprehensive tutorial series on how to use the components and the first one on getting started with Ladybug can be found here:
https://www.youtube.com/playlist?list=PLruLh1AdY-Sj_XGz3kzHUoWmpWDXNep1O
A second one on how to use the new Ladybug comfort components can be found here:
https://www.youtube.com/playlist?list=PLruLh1AdY-Sho45_D4BV1HKcIz7oVmZ8v
Here is a short list highlighting some of the capabilities of this current Honeybee release:
1) Run EnergyPlus and OpenStudio Simulations - A couple of components to export your HBZones into IDF or OSM files and run energy simulations right from the grasshopper window! Also included are several components for adjusting the parameters of the simulations and requesting a wide range of possible outputs.
2) Assign EnergyPlus Constructions - A set of components that allow you to assign constructions from the OpenStudio library to your Honeybee objects. This also includes components for searching through the OpenStudio construction/material library and components to create your own constructions and materials.
3) Assign EnergyPlus Schedules and Loads - A set of components for assigning schedules and Loads from the Openstudio library to your Honeybee zones. This includes the ability to auto-assign these based on your program or to tweak individual values. You can even create your own schedules from a stream of 8760 values with the new “Create CSV Schedule” component. Lastly, there is a component for converting any E+ schedule to 8760 values, which you can then visualize with the standard Ladybug components
4) Assign HVAC Systems - A set of components for assigning some basic ASHRAE HVAC systems that can be run with the Export to OpenStudio component. You can even adjust the parameters of these systems right in Grasshopper.
Note: The ASHRAE systems are only available for OpenStudio and can’t be used with Honeybee’s EnergyPlus component. Also, only ideal air, VAV and PTHP systems are currently available but more will be on their way soon!
5) Import And Visualize EnergyPlus Results - A set of components to import numerical EnergyPlus simulation results back into grasshopper such that they can be visualized with any of the standard Ladybug components (ie. the 3D chart or Psychrometric chart). Importers are made for zone-level results as well as surface results and surfaces results can be easily separated based on surface type. This also means that E+ results can be analyzed with the new Ladybug comfort calculator components and used in shade or natural ventilation studies. Lastly, there are a set of components for coloring zone/surface geometry with EnergyPlus results and for coloring the shades around zones with shade desirability.
6) Increased Radiance and Daysim Capabilities - Several updates have also been made to the existing Radiance and Daysim components including parallel Radiance Image-based analysis.
7) Visualize HBObject Attributes - A few components have been added to assist with setting up honeybee objects and ensuing the the correct properties have been assigned. These include components to separate surfaces based on boundary condition and components to label surfaces and zones with virtually any of their EnergyPlus or Radiance attributes.
8) WIP Grizzly Bear gbxml Exporter - Lastly, the release includes an WIP version of the Grizzly Bear gbXML exporter, which will continue to be developed over the next few months.
And here’s a list of the new Ladybug capabilities:
1) Comfort Models - Three comfort models that have been translated to python for your use in GH: PMV, Adaptive, and Outdoor (UTCI). Each of these models has a “Comfort Calculator” component for which you can input parameters like temperature and wind speed to get out comfort metrics. These can be used in conjunction with EPW data or EnergyPlus results to calculate comfort for every hour of the year.
2) Ladybug Psychrometric Chart - A new interactive psychrometric chart that was made possible thanks to the releasing of the Berkely Center for the Built Environment Comfort Tool Code (https://github.com/CenterForTheBuiltEnvironment/comfort-tool). The new psychrometric chart allows you to move the comfort polygon around based on PMV comfort metrics, plot EPW or EnergyPlus results on the psych chart, and see how many hours are made comfortable in each case. The component also allows you to plot polygons representing passive building strategies (like internal heat gain or evaporative cooling), which will adjust dynamically with the comfort polygon and are based on the strategies included in Climate Consultant.
3) Solar Adjusted MRT and Outdoor Shade Evaluator - A component has been added to allow you to account for shortwave solar radiation in comfort studies by adjusting Mean Radiant Temperature. This adjusted MRT can then be factored into outdoor comfort studies and used with an new Ladybug Comfort Shade Benefit Evaluator to design outdoor shades and awnings.
4) Wind Speed - Two new components for visualizing wind profile curves and calculating wind speed at particular heights. These allow users to translate EPW wind speed from the meteorological station to the terrain type and height above ground for their site. They will also help inform the CFD simulations that will be coming in later releases.
5) Sky Color Visualizer - A component has been added that allows you to visualize a clear sky for any hour of the year in order to get a sense of the sky qualities and understand light conditions in periods before or after sunset.
Ready to Start?
Here is what you will need to do:
Download Honeybee and Ladybug from the same link here. Make sure that you remove any old version of Ladybug and Honeybee if you have one, as mentioned on the Ladybug group page.
You will also need to install RADIANCE, DAYSIM and ENERGYPLUS on your system. We already sent a video about how to get RADIANCE and Daysim installed (link). You can download EnergyPlus 8.1 for Windows from the DOE website (http://apps1.eere.energy.gov/buildings/energyplus/?utm_source=EnergyPlus&utm_medium=redirect&utm_campaign=EnergyPlus%2Bredirect%2B1).
“EnergyPlus is a whole building energy simulation program that engineers, architects, and researchers use to model energy and water use in buildings.”
“OpenStudio is a cross-platform (Windows, Mac, and Linux) collection of software tools to support whole building energy modeling using EnergyPlus and advanced daylight analysis using Radiance.”
Make sure that you install ENERGYPLUS in a folder with no spaces in the file path (e.g. “C:\Program Files” has a space between “Program” and “Files”). A good option for each is C:\EnergyPlusV8-1-0, which is usually the default locations when you run the downloaded installer.
New Example Files!
We have put together a large number of new updated example files and you should use these to get yourself started. You can download them from the link on the group page.
New Developers:
Since the last release, we have had several new members join the Ladybug + Honeybee developer team:
Chien Si Harriman - Chien Si has contributed a large amount of code and new components in the OpenStudio workflow including components to add ASHRAE HVAC systems into your energy models and adjust their parameters. He is also the author of the Grizzly Bear gbxml exporter and will be continuing work on this in the following months.
Trygve Wastvedt - Trygve has contributed a core set of functions that were used to make the new Ladybug Colored Sky Visualizer and have also helped sync the Ladybug Sunpath to give sun positions for the current year of 2014
Abraham Yezioro - Abraham has contributed an awesome new bioclimatic chart for comfort analyses, which, despite its presence in the WIP tab, is nearly complete!
Djordje Spasic - Djordje has contributed a number of core functions that were used to make the new Ladybug Wind Speed Calculator and Wind Profile Visualizer components and will be assisting with workflows to process CFD results in the future. He also has some more outdoor comfort metrics in the works.
Andrew Heumann - Andrew contributed an endlessly useful list item selector, which can adjust based on the input list, and has multiple applications throughout Ladybug and Honeybee. One of the best is for selecting zone-level programs after selecting an overall building program.
Alex Jacobson - Alex also assisted with the coding of the wind speed components.
And, as always, a special thanks goes to all of our awesome users who tested the new components through their several iterations. Special thanks goes to Daniel, Michal, Francisco, and Agus for their continuous support. Thanks again for all the support, great suggestions and comments. We really cannot thank you enough.
Enjoy!,
Ladybug + Honeybee Development Team
PS: If you want to be updated about the news about Ladybug and Honeybee like Ladybug’s Facebook page (https://www.facebook.com/LadyBugforGrasshopper) or follow ladybug’s twitter account (@ladybug_tool).
…
/www.grasshopper3d.com/forum/topics/vb-vs-c-vs-python
http://www.grasshopper3d.com/forum/topics/which-programming-language-should-i-focus-on-vb-or-python
VB.Net and C#
VB.Net and C# both belong to the ".Net" family of languages, and the things you can do with them in Rhino/Grasshopper are nearly 100% equivalent. Grasshopper itself was written in a combination of VB.Net and C#. Some advantages/comments, in no particular order:
Performance - VB.Net and C# scripts tend to execute faster because they are "Just-in-time" compiled as opposed to interpreted.
Autocomplete - both VB.Net and C# have rich autocomplete functionality in their respective script editor components - significantly more so than the python editor. This can be helpful for beginners since you can "hunt" for methods and properties by just typing a "." after an object name and looking at the list of available methods/properties.
Native Component development - If you eventually want to develop GHA assemblies/plug-ins for grasshopper, as of Rhino 5 you will have to use one of these two languages. However, there are plans to introduce python-based plugins in Rhino 6. Even so, the resources around plug-in development are very rich in the C# and VB.Net environments (with c# seeming to be the more popular of the two).
"Strong Typing" - VB.net to some degree, and C# especially, are less "forgiving" languages than python - they require you to know about the data type of the objects you're operating on. This can sometimes result in more verbose code - as you explicitly convert from type to type - but it also promotes good programming practice and helps make errors more understandable.
.Net ecosystem - using a .Net language means you have access to the thousands of libraries publicly available, and the process of referencing these libraries and making use of them is comparatively straightforward relative to python. More on this in the following section.
Resources/Support - At least as of 2012, VB and C# turned up more results on this forum than python, and I think you'll find slightly more expert-level coders in those languages able to help you here.
Which one between the two? C# or VB.Net? - Personally, I greatly prefer C# - I find it to be cleaner and clearer to use. I also have some programming background in C++/Java/Processing so I found the "C family" approach to be more familiar. As David and Damian point out in some of the posts linked above, C# is more popular than either python or VB.net in the rest of the coding world. However, if you are learning without any prior programming experience you may find VB.net to be a bit easier to learn.
Python
Python is, without a doubt, a beautiful and elegant language, which is probably more than can be said for VB.Net/C#. It is very popular with beginner coders, and its syntax is more readily understandable.
Syntax - Python is beautiful to read and write. Its syntax is very clear and free of extraneous punctuation (for example the ";" line endings in c#). It has many very nice language features that make common tasks more concise, like its loop syntax, list comprehensions, list "map" and "filter."
Multiple ways to talk to Rhino/Grasshopper - Python enables two general approaches to interacting with the Rhino/Grasshopper environment: RhinoCommon and RhinoScriptSyntax. If you have prior experience with Rhinoscript, you may find RhinoScriptSyntax to be preferable - it adapts many of the methods you're familiar with to the python language, and simplifies some tasks. A word of caution though - working with Rhinoscriptsyntax can introduce a performance hit relative to RhinoCommon operations. C# and VB.net by contrast can only work with RhinoCommon.
"Goodies" - The Python environment in Grasshopper has some "special features" that the other languages lack. In particular, the "GHPythonLib" library enables the ability to call most Grasshopper components from within your code, and the ability to easily enable parallel processing to improve performance. (A word of caution though - these two features do not seem to "play well" with each other, there may be bugs causing memory leaks that result in increasingly worse performance with each execution).
Cross-Platform - Unlike C#/VB.net, Python can be used natively in Rhino for Windows and Rhino for Mac.
Direct scripting in Rhino - You can also use Python directly in the Rhino environment without the need for Grasshopper if you desire, using the Rhino Python editor.
IronPython / Ecosystem issues - one frustration / potential downside to working with Python for Rhino/GH is that though there is a vast, amazing ecosystem of external libraries for Python, getting these to install/work properly in the Rhino/GH environment can be a real pain - largely because the language is actually "IronPython," a version of python designed to work closely with the .Net ecosystem. Many popular libraries like numpy and scipy are very challenging to get working in Rhino/GH.
Scripting in other programs - Especially in the AEC industry, Python is a popular scripting language for other applications. Tools like Revit, Dynamo, Blender, and ArcGIS all offer their own Python scripting interface - so learning Python in Rhino/GH can give you a leg up in eventually scripting in these other programs.
Python's Stock is Rising - there are currently a number of efforts to improve the "status" of python within the Rhino/GH ecosystem. The python editor in Rhino 6 has a number of improvements, not least of which is the ability to "compile" add-ons for Grasshopper written in python. I'm sure Giulio can speak to other upcoming improvements.
I hope this summary helps you find the right option for you. Ultimately you can't go wrong; concepts from any of the available scripting languages will make it much easier to learn the next one. In my day to day work I use a combination of both C# and python, where appropriate, and I love them both.
I hope others will feel welcome to chime in on this FAQ and add their own thoughts about advantages/disadvantages of these various options! If you have time, read through some of the other posts linked to at the beginning - there's lots of additional great information there. …
e a fundamental failure on my part. On the other hand, Grasshopper isn't supposed to be on a par with most other 3D programs. It is emphatically not meant for manual/direct modelling. If you would normally tackle a problem by drawing geometry by hand, Grasshopper is not (and should never be advertised as) a good alternative.
I get that. That’s why that 3D shape I’m trying to apply the voronoi to was done in NX. I do wonder where the GUI metaphor GH uses comes from. It reminds me of LabVIEW.
"What in other programs is a dialog box, is 8 or 10 components strung together in grasshopper. The wisdom for this I often hear among the grasshopper community is that this allows for parametric design."
Grasshopper ships with about 1000 components (rounded to the nearest power of ten). I'm adding more all the time, either because new functionality has been exposed in the Rhino SDK or because a certain component makes a lot of sense to a lot of people. Adding pre-canned components that do the same as '8 or 10 components strung together' for the heck of it will balloon the total number of components everyone has to deal with. If you find yourself using the same 8 to 10 components together all the time, then please mention it on this forum. A lot of the currently existing components have been added because someone asked for it.
It’s not the primary components that catalyzed this thought but rather the secondary components. I was toying with a component today (twist from jackalope) that made use of three toggle components. The things they controlled are checkboxes in other apps.
Take a look at this jpg. Ignore differences; I did 'em quickly. GH required 19 components to do what SW did with 4 commands. Note the difference in screen real estate.
As an aside, I really hate SolidWorks (SW). But going forward, I’ll use it as an example because it’s what most people are familiar with.
"[...] has a far cleaner and more intuitive interface. So does SolidWorks, Inventor, CATIA, NX, and a bunch of others."
Again, GH was not designed to be an alternative to these sort of modellers. I don't like referring to GH as 'parameteric' as that term has been co-opted by relational modellers. I prefer to use 'algorithmic' instead. The idea behind parameteric seems to be that one models by hand, but every click exists within a context, and when the context changes the software figures out where to move the click to. The idea behind algorithmic is that you don't model by hand.
I agree, and disagree. I believe parametric applies equally to GH AND SW, NX, and so forth, while algorithmic is unique to GH (and GC and Dynamo I think). Thus I understand why you prefer the term. I too tend to not like referring to GH as a parametric modeler for the same reason.
But I think it oversimplifies it to say parametric modelers move the clicks. SW tracks clicks the same way GH does; GH holds that information in geometry components while SW holds it in a feature in the feature tree. In both GH and SW edits to the base geometry will drive a recalculation, but more commonly, it’s an edit to input data, beit equations or just plain numbers, that drive a recalculation.
I understand the difference in these programs. What brought me to GH is that it can create a visual dialog that standard modelers can’t. But as I've grown more comfortable with it I’ve come to realize that the GUI of GH and the GUI of other parametric modelers, while looking completely different, are surprisingly interchangeable. Do not misconstrue that I’m suggesting that GH should replace it’s GUI with SW’s. I’m not. I refrain from suggesting anything specific. I only suggest that you allow yourself to think radically.
This is not to say there is no value in the parametric approach. Obviously it is a winning strategy and many people love to use it. We have considered adding some features to GH that would make manual modelling less of a chore and we would still very much like to do so. However this is such a large chunk of work that we have to be very careful about investing the time. Before I start down this road I want to make sure that the choice I'm making is not 'lame-ass algorithmic modeller with some lame-ass parametrics tacked on' vs. 'kick-ass algorithmic modeller with no parametrics tacked on'.
Given a choice, I'd pick kick-ass algorithmic modeller with no parametrics tacked on.
2. Visual Programming.
I'm not exactly sure I understand your grievance here, but I suspect I agree. The visual part is front and centre at the moment and it should remain there. However we need to improve upon it and at the same time give programmers more tools to achieve what they want.
I'll admit, this is a bit tough to explain. As I've re-read my own comment, I think it was partly a precursor to the context sensitivity point and touched upon other stated points.
This now touches upon my own ignorance about GH’s target market. Are you moving toward a highly specialized tool for programmers and/or mathematicians, or is the intent to create a tool that most designers can master? If it’s the former, rock on. You’re doing great. If it’s the latter, I’m one of the more technically sophisticated designers I know and I’m lost most of the time when using GH.
GH allows the same freedom as a command line editor. You can do whatever you like, and it’ll work or not. And you won’t know why it works or doesn't until you start becoming a bit of an expert and can actually decipher the gibberish in a panel component. I often feel GH has the ease of use of DOS with a badass video card in front.
Please indulge my bit of storytelling. Early 3D modelers, CATIA, Unigraphics, and Pro-Engineer, were unbelievably difficult to use. Yet no one ever complained. The pain of entry was immense. But once you made it past the pain threshold, the salary you could command was very well worth it. And the fewer the people who knew how to use it, the more money you could demand. So in a sense, their lack of usability was a desirable feature among those who’d figured it out.
Then SolidWorks came along. It could only do a fraction of what the others did, but it was a fraction of the cost, it did most of what you needed, and anyone could figure it out. There was even a manual on how to use it. (Craziness!) Within a few short years, the big three all had to change their names (V5, NX, and Wildfire (now Creo)) and change the way they do things. All are now significantly easier to use.
I can tell that the amount of development time that’s gone into GH is immense and I believe the functionality is genius. I also believe it’s ease of use could be greatly improved.
Having re-read my original comments, I think it sounded a bit snotty. For that I apologize.
3. Context sensitivity.
"There is no reason a program in 2014 should allow me to make decisions that will not work. For example, if a component input is in all cases incompatible with another component's output, I shouldn't be able to connect them."
Unfortunately it's not as simple as that. Whether or not a conversion between two data types makes sense is often dependent on the actual values. If you plug a list of curves into a Line component, none of them may be convertible. Should I therefore not allow this connection to be made? What if there is a single curve that could be converted to a line? What if you want to make the connection now, but only later plan to add some convertible curves to the data? What you made the connection back when it was valid, but now it's no longer valid, wouldn't it be weird if there was a connection you couldn't make again?
I've started work on GH2 and one of the first things I'm writing now is the new data-conversion logic. The goal [...] is to not just try and convert type A into type B, but include information about what sort of conversion was needed (straightforward, exotic, far-fetched. etc.) and information regarding why that type was assigned.
You are right that under some conditions, we can be sure that a conversion will always fail. For example connecting a Boolean output with a Curve input. But even there my preferred solution is to tell people why that doesn't make sense rather than not allowing it in the first place.
You bring up both interesting points and limits to my understanding of coding. I’ve reached the point in my learning of GH where I’m just getting into figuring out the sets tab (and so far I’m not doing too well). I often find myself wondering “Is all of this manual conditioning of the data really necessary? Doesn’t most software perform this kind of stuff invisibly?” I’d love to be right and see it go away, but I could easily be wrong. I’ve been wrong before.
5. Components.
"Give components a little “+” or a drawer on the bottom or something that by clicking, opens the component into something akin to a dialog box. This should give access to all of the variables in the component. I shouldn't have to r-click on each thing on a component to do all of the settings."
I was thinking of just zooming in on a component would eventually provide easier ways to access settings and data.
I kinda like this. It’s a continuation of what you’re currently doing with things like the panel component.
"Could some of these items disappear if they are contextually inappropriate or gray out if they're unlikely?"
It's almost impossible for me to know whether these things are 'unlikely' in any given situation. There are probably some cases where a suggestion along the lines of "Hey, this component is about to run 40,524 times. It seems like it would make sense to Graft the 'P' input." would be useful.
6. Integration.
"Why isn't it just live geometry?"
This is an unfortunate side-effect of the way the Rhino SDK was designed. Pumping all my geometry through the Rhino document would severely impact performance and memory usage. It also complicates the matter to an almost impossible degree as any command and plugin running in Rhino now has access to 'my' geometry.
"Maybe add more Rhino functionality to GH. GH has no 3D offset."
That's the plan moving forward. A lot of algorithms in Rhino (Make2D, FilletEdge, Shelling, BlendSrf, the list goes on) are not available as part of the public SDK. The Rhino development team is going to try and rectify this for Rhino6 and beyond. As soon as these functions become available I'll start adding them to GH (provided they make sense of course).
On the whole I agree that integration needs a lot of work, and it's work that has to happen on both sides of the isle.
You work for McNeel yet you seem to speak of them as a separate entity. Is this to say that there are technical reasons GH can only access things through the Rhino SDK? I’d think you would have complete access to all Rhino API’s. I hope it’s not a fiefdom issue, but it happens.
7. Documentation.
Absolutely. Development for GH1 has slowed because I'm now working on GH2. We decided that GH1 is 'feature complete', basically to avoid feature creep. GH2 is a ground-up rewrite so it will take a long time until something is ready for testing. During this time, minor additions and of course bug fixes will be available for GH1, but on a much lower frequency.
Documentation is woefully inadequate at present. The primer is being updated (and the new version looks great), but for GH2 we're planning a completely new help system. People have been hired to provide the content. With a bit of luck and a lot of work this will be one of the main selling points of GH2.
It begs the question that I have to ask. When is GH1.0 scheduled to launch? And if you need another person to proofread the current draft of new primer.
patrick@girgen.com
I can’t believe wikipedia has an entry for feature creep. And I can’t believe you included it. It made me giggle. Thanks.
8. 2D-ness.
"I know you'll disagree completely, but I'm sticking to this. How else could an omission like offsetsurf happen?"
I don't fully disagree. A lot of geometry is either flat or happens inside surfaces. The reason there's no shelling (I'm assuming that's what you meant, there are two Offset Surface components in GH) is because (a) it's a very new feature in Rhino and doesn't work too well yet and (b) as a result of that isn't available to plugins.
I believe it’s been helpful for me to have figured this out. I recently completed a GH course at a local Community College and have done a bunch of online tutorials. The first real project I decided to tackle has turned out to be one of the more difficult things to try. It’s the source of the questions I posted. (Thanks for pointing out that they were posted in the wrong spot. I re-posted to the discussions board.)
I just can't seem to figure out how to turn the voronoi into legitimate geometry. I've seen this exact question posted a few times, but it’s never been successfully answered. What I'm showing here is far more angular than I’m hoping for. The mesh is too fine for weaverbird to have much of an effect. And I haven't cracked re-meshing. Btw, in product design, meshes are to be avoided like the plague. Embracing them remains difficult.
As for offsetsurf, in Rhino, if you do an offsetsurf to a solid body, it executes it on all sides creating another neatly trimmed body thats either larger or smaller than the original. This is how every other app I know of works. GH’s offsetsurf creates a bunch of unjoined faces spaced away from the original brep. A common technique for 3D voronois (Yes, I hit the voronoi overuse easter egg) is to find the center of each cell and scale them by this center. If you think about it, this creates a different distance from the face of the scaled cell to the face of the original cell for every face. As I've mentioned, this project is giving me serious headaches.
Don't get me wrong, I appreciate the feedback, I really do, but I want to be honest and open about my own plans and where they might conflict with your wishes. Grasshopper is being used far beyond the boundaries of what we expected and it's clear that there are major shortcomings that must be addressed before too long. We didn't get it right with the first version, I don't expect we'll get it completely right with the second version but if we can improve upon the -say- five biggest drawbacks (performance, documentation, organisation, plugin management and no mac version) I'll be a happy puppy.
--
David Rutten
Thank you for taking the time to reply David. Often we feel that posting such things is send it into the empty ether. I’m very glad that this was not the case.
And thank you for all of the work you've put into GH. If you found any of my input overly harsh or ill-mannered, I apologise. It was not my intent. I'm generally not the ranting sort. If I hadn't intended to provide possibly useful input, I wouldn't have written.
Cheers
Patrick Girgen
Ps. Any pointers on how to get a bit further on the above project would be greatly appreciated.
…