guages I'd recommend all use the RhinoCommon SDK and thus all have access to the same functionality.
How long would it take me to understand and write my own code?
If you already know how to program, it probably won't take too long. If you're past the hurdle of what it means to declare and assign variables, how conditionals and loops work and what scope is, you've already rounded the hardest corner.
Is it even worth it?
That really depends. "Learn programming" is clearly not blanket good advice. Most people out there do not have to learn programming to be happy with their lives and successful in their careers. For some people it can make a small difference, and for a few people it can make a huge difference. If you feel you're in the 'some' category then this is indeed a question you have to answer. Note that the investment for learning programming is a continuous process. Unless you keep up your skills and learn about new stuff that becomes available, you'll lose the ability to write successful code over time.
Where do I start?
Step 1 is to answer the previous question. It is unlikely that anyone besides yourself can answer it, but you can start by making a list of things you do manually now that may be programmable. Then make a list of the things you are unable to do now but which you might be able to do with programming. If while looking at these lists your reaction is: "meh", the answer is probably no.
Step 2 is to pick a language. This is again a very personal thing; there's no wrong answer, because there's no right answer.
Step 3 is to start learning this language. My experience is that the best way to learn a programming language is to try and solve a real problem that you understand very well. If the problem statement is nebulous or poorly understood, you'll be learning two things and that's a recipe for unnecessary frustration.
Here are my thoughts on language:
Python: I don't use Python myself, I can sort of read it while moving my lips. I don't particularly like Python though. The indentation sensitiveness stresses me out, and I find the lack of type-safety disturbing. However it is a good language for mathematical/scientific programs. There are lots of additional code libraries you can easily import that will ease the development of mathematically intense algorithms.
C#: I like C# very much, but it does suffer from geekerosis. A lot of the keywords used in the language are not self-explanatory (abstract, sealed, virtual). For me this is no longer a problem as I've memorised what they all mean. C# is designed to be an efficient language to write, rather than an easy one to learn.
The great thing about C# though is that there's a huge amount of material out there for learning it. It is one of the most popular, mature and modern languages you can hope to pick.
VB: I learned VBScript as my first language, and then moved on to VB5, VB6 and VB.NET. It is somewhat more friendly than C#, and functionally it is almost identical. The switch from VB to C# is reasonably low-threshold and there are excellent tools for translating VB code to C# and vice versa.
Since you already know some Python, it probably makes the most sense to continue on that path. If you want to switch, C# is more like Python than VB, so C# would be my next suggestion.
As for where to get information... you have 4 major options when developing code for Rhino.
If it's a question about the language itself, StackOverflow is a great resource. It can be a pretty hostile place for beginner questions, but I find that mostly the questions I'm asking have been asked already and the answers on SO tend to be good. In fact usually when I google my questions, the first few hits are always SO posts.
If it's a question about the Rhino SDK or Grasshopper, you can ask it either on the GH forums (where we are now), or on Discourse. We're not as quick on the draw as SO, but we do know about Rhino.
If you're looking for a basic explanation of what a keyword or a type is for, perhaps with an example, MSDN is the best first choice. In fact if you google the name a of a .NET type, the first hit is almost always an MSDN page.…
Added by David Rutten at 2:03pm on December 3, 2014
umbrella of Urban Heat Island (UHI) and I am going to try to separate them out in order to give you a sense of the current capabilities in LB+HB.
1) UHI as defined as a recorded elevated air temperature in an urban area:
If you have access to epw files for both an urban area and a rural area, you can use Ladybug to visualize and deeply explore the differences between the two weather files. Ladybug is primarily a tool for weather file visualization and analysis and it can be very helpful for understanding the consequences of UHI on strategies for buildings or on comfort. This said, if you do not have both rural and urban recorded weather data or you want to generate your own weather files based on criteria about urban areas (as it sounds like you want to do), this definition might not be so helpful.
2) UHI defined by air elevated air temperature but viewed as a computer model-able phenomenon resulting primarily from urban canyon geometry, building materials, and (to a lesser degree) anthropogenic heat:
This definition seems to fit more with they type of thing that you are looking for but it is unfortunately very difficult and computationally intensive such that we do not currently have anything within Ladybug to do this right now. I can say that the state-of-the art for this type of modeling is an application called Town Energy Budget (TEB) and this is what all of the advanced UHI researches that I know use (http://www.cnrm.meteo.fr/surfex/spip.php?article7). Unfortunately for those trying to use it in professional practice, it can take a while to get comfortable with it and it currently runs exclusively on Linux (this does mean that it is open source, though, and that you can really get deep into the assumptions of the model). A couple years ago, a peer of mine translated almost all of TEB into Matlab language making it possible to run it on Windows if you have Matlab. He wrapped everything together into a tool called the Urban Weather Generator (UWG), which can take an epw file of a rural area and warp it to an urban area based on inputs that you give of building height, materials, vegetation, anthropogenic heat, etc. I would recommend looking into this for your project, although, bear in mind that is it not open source like the original TEB tool and that you may need to get a (very expensive) copy of MATLAB (http://urbanmicroclimate.scripts.mit.edu/uwg.php).
3) UHI as defined by a thermal satellite image of an urban area depicting an elevated average radiant environment that reaches a maximum a the city center and changes by land use:
This is the definition of UHI that I am most familiar with and was the basis of much of my past research. I feel that it is also a definition of UHI that is a bit more in line with where a lot of contemporary UHI research is headed, which is away from the notion of UHI as a macro-scale meteorological phenomena that is averaged as an air temperature over a huge area towards one that accepts that different land uses have different microclimates and (importantly) different radiant environments. While the air temperature difference between urban and rural areas usually does not change more than 1-4 C, the radiant environment can be very different (on the order of 10-15 C differences). The best way to understand UHI in this context is with Thermal satellite images, for which there is ha huge database of publicly available data on NASA's glovis website (http://glovis.usgs.gov/) or their ECHO website (http://reverb.echo.nasa.gov/reverb/#utf8=%E2%9C%93&spatial_map=satellite&spatial_type=rectangle). I tend to use thermal data from LANDSAT 5-8 and ASTER satellites in my research. Unfortunately, there is a lot f bad data with a lot of cloud cover mixed in with the really good stuff and it can take some time to find good images. Also, there aren't too many programs that read the GeoTiff file format that you download the data as. I know that ArcGIS will read it, a program called ENVI will read it (I think that the open source QGIS can also red it). I have plans to write a set of components to bring this type of data into Rhino and GH (I may get to it a few months down the line).
4) UHI as a computer model-able notion of "Urban Microclimate" with consideration of local differences and the local radiant environment:
This is where a lot of my research has lead and, thankfully, is an area that Honeybee can help you out a lot with. EnergyPlus simulations can output information on outside building surface temperatures and these can be very helpful in helping get a sense of the radiant environment around individual buildings. Right now, I am focusing just on using this data to fully model the indoor environments of buildings as you see in this video:
https://www.youtube.com/watch?v=fNylb42FPIc&list=UUc6HWbF4UtdKdjbZ2tvwiCQ
I have plans to move this methodology to the outdoors once I complete this initial application to the indoors. For now, you can use the "Surface result reader" and the "color surfaces based on EP result" components to get a sense of variation in the outside temperature of your buildings.
I hope that this helped,
-Chris
…
via MIDI controllers.
my idea is to link PureData to GH via UDP. why pure data? cause' i can relate data like GH to generate numeric relations (and link it to audio generation)
so far i got PD and Processing to talk, but i can't get to grasshopper.
i use this definitions to make pd and processing to talk http://ubaa.net/shared/processing/udp/ and this GHX to get the data to GH http://www.grasshopper3d.com/forum/attachment/download?id=2985220%3...
i got this data from this post but the GH definition doesn't work for me. i have tried LAN definitions and "the engine" as well but they both freeze, even if i send data thru processing or PD.
i have a lot of questions at this time
1.- why processing tells me that i am getting the data from diferent ports, while i'm using 6000?
2.- why in the UDP definition i get no data out, even if it should say something like "waiting fordata/port/etc.." that's defined in the C# capsule
3.- is there a direct way to get midi data (key and CC) to GH
i also tried to use firefly to get the data via COM port. i know you can do this trick in processing but i just don't know how.
well. if anyone could help me i would share the results here (since it's a magister, results shoud be very interesting)
UDP has allways been a unsolved issue on other posts. maybe we could work it out ;)
Thanks…
Added by jota aldunce at 8:43am on September 28, 2010
ts in extreme aliasing effects that carry into the 3D realm as regular steps along what should be smooth surfaces.
On sleeping on it, I realized I hadn't yet tried fast Unary Force on fine quad meshes from the standard Grasshopper meshing system that includes the meshing options component.
Bingo! It's fast now. Workable. I don't need super fine meshing since I'm not running from aliasing. I can still use rather fine local meshes since Unary Force lets Kangaroo do a simple thing just in the Z direction rather than a full 3D force.
After only a minute or so of Kangaroo initialization that slows the interface, each of a dozen needed cycles takes half a second, FOR THE ENTIRE GRAPHIC.
I just set the timer to 1 second so I can move around the interface, and I double click the Windows taskbar timer shut-off to enjoy the result.
WHILE RUNNING VIA TIMER, IF I CHANGE A SPRING/FORCE SETTING IT SUFFERS NO DELAY AT ALL AND JUST ALTERS THE OUTPUT OVER TIME. I can change Unary Force from 20 to 100 and immediately see the bigger areas balloon like crazy:
It's fast enough overall to play with, yet the individual steps are slow enough that it's fun to watch the hysteresis as it overshoots back from 100 to 20 Unary Force, going concave in the middle of bulges then back to more shallow hills.
A force of 1000 is a bit disturbing, I wonder if I can tamp it down with greater spring strength or will that just give me the same result as before?
Looks like it's the same, just the ratio matters. Makes sense I guess. At one point it blew up though. Hitting the reset button...a minute later it blows up again...and just doesn't like huge numbers, so I don't see an advantage playing with bombs. The high mesh strength is pulling the mesh apart.
With low Unary Force and moderate mesh tension, you get flat tops, as if the overall force on the mesh fighting its anchored edge vertices, is enough to displace it, but the surface itself is too stiff to care about local gravity.
Then you have less flat areas as you increase Unary Force:
Weird, there *is* some sort of absolute effects, rather than just relative, between Unary Force and spring stiffness, since now I'm getting flat tops even in the extreme:
Oh, wait, strike that, I may be seeing but a single step with the timer off, subject to hysteresis. With the timer back on...it can sit there a minute...not locked up but just idling...until you see the Display > Widgets > Profiler time start cycling to near half minute numbers...makes you want to hit the reset button...and indeed that locks the interface for another initialization...and yes, it was merely hysteresis, not an equilibrium result. My former flat tops may have been due to that too, due to my use of the Windows taskbar timer disabler. The lesson is that you can obtain different results by using a long timer setting and just stopping it before it equilibrates.
This script is a keeper, fast and fun after the relatively mild Kangaroo initialization period is over.
The uniform mostly quad meshing is all done in Grasshopper too, from any flat surface with holes, especially from images of shapes that are traced with potrace to give surfaces with holes.
Could I switch to hex meshes from triangular meshes to do the same thing with fewer vertices?
Are there other forces I can add to smooth the bulging? Letting things bulge is not so bad if you then just scale down the result in Z afterwards (though perhaps the same result could be had with lesser force):
Also, can this same thing be done with possibly faster Kangaroo 2?…
Added by Nik Willmore at 10:02pm on February 21, 2016
and I here is what I have to share:
Thanks! Thank you for being awesome! When I released Ladybug two years ago I could never imagine how this project will take over my life! It has been such an invaluable experience for me so far and it wasn’t possible without you - so thank you so much.
What’s next? Recently I get this question more and more and here is my fairly long answer! Chris is pushing the boundaries with comfort tools. Chien Si is working on HVAC systems integration. Chris, Anton and Alejandra will figure out how to effectively get natural ventilation to be modeled. Patrick, Sandeep, Michal and Boris are working on their developments. I’m working on getting 3 Phase method integrated, and Butterfly will be out at some point, but... they are not going to be what makes the next step. The next step is up to you. It is what you will do with the development. So go ahead and let us know what’s next!
If you can help someone on the group please do! Doing so you are not only helping another person (and potentially yourself) but also the developers. The more you can help each other here the more we will have time for development and documentation.
Best place to send your questions is this group. If you are using the latest version from github then you may want to sent it to github. Please consider emails as the last option. Go back to number 3 again! Thanks.
Don’t be nice to us! Well, I mean don’t just be nice to us. I love your nice comments like anybody else and please keep them coming ;) but what we also need next to nice comments is your critiques, wishes and insight. I feel that recently we are getting less wishes and critiques than what it used to be. You can post them here in the group or on github and either way we will know about it. Thank you to all of you who has already done this.
Thanks again! Before I let you go I want to specially thank all of you who contributed to the project by your development, thoughts and support. You are great and I can’t thank you enough.
David Weinberger in his book “Too Big to Know” says: “When an expert network is functioning as its best, the smartest person in the room is the room itself.” Reading some of the discussions on the group gives me the feeling of staying inside a smart room. Thank you and let’s keep the room growing!
Cheers,
Mostapha
PS: To avoid sending another post, I just post the updates about the two upcoming workshops here:
I will lead a workshop in LA next Friday (Feb. 6) and there is still few seats left. If you want to learn more about energy and daylighting simulation with Honeybee here is your chance. Here is more information who to register: (http://www.facadesplus.com/technology-workshops/).
Chris will lead a 3 days intense and comprehensive Ladybug and Honeybee workshop in Mexico City this March. You have probably watched Chris’s tutorials and already know what you can expect from a workshop with Chris so I don’t have to speak for that! I would take this workshop if I was around that area. If you are around Mexico City or know a friend who might be interested please let them know. Here is more information about the workshop: (https://www.facebook.com/LadyBugforGrasshopper/photos/a.442320969114095.107084.413910668621792/919318878080966).
…
mainly quads and sometimes triangles if some lines are not connected. As half sections are quite whatever you want it could be possible to make watertigh model with some smooth exterior and with interiors fins in order to have a better rigidity and a low weight. The script provided contains many examples of use.
As inputs
Necessary
* Points (P)
* Connection between points (LP)
* Point to points connection (PP)
* and a minimum one width (WidtsAtPoint), or a width (radius) for each point.
Optional
* NormalsAtPoint, you could provide one normal per point in order to orient sections
* Number of sections is the number of sections used to generate the mesh (minimum 2)
* Striction a numeric value between -3. and 3 used to modify striction of nodes
* The sections definitions is given through to same size list of double
* Lateral coordinates : first and last lateral coodinate must be 0.0 for watertight mesh
* Height coordinates
Output :
* Many meshes which could be joined
P/LP/PP comes from topology of network, you could use SandBoxTopology plugin or mine component
…
what they really mean by that, as in what buttons to push, so I assume it's a Windows Path entry?
2.) Modify PATH
Add the install location on the path, this is usually: C:\Program File\IronPython 2.7
But on 64-bit Windows systems it is: C:\Program File (x86)\IronPython 2.7
As a check, open a Windows command prompt and go to a directory (which is not the above) and type:
> ipy -V PythonContext 2.7.0.40 on .NET 4.0.30319.225
Tutorial on setting a Windows environmental variable (path):
http://www.computerhope.com/issues/ch000549.htm
But this fails to point out that path contains many entries already separated by semicolons so if I merely add a new variable called "path" it's likely that I will destroy existing program function. There's no info on how to just tack on another entry, and the Windows 7 edit box doesn't even show the whole collection, but one item (!), so I copied the existing path into a text editor to see the whole collection successfully and added the C:\Program Files (x86)\IronPython 2.7 entry after an added semicolon, correcting for an Enthought page typo of no 's' on the end of "Program Files". I also checked the others and many pointed to old missing directories so I deleted those entries.
...and the test fails and "ipy" is not recognized as a command, even though the path now shows up using "path" in the Windows CMD window, that is if I copy all by right clicking and pasting the stuff into a text editor to really view it all. I can run it from the source directory just fine.
The rabbit hole was indeed deep. Using the Task Manager (control-alt-delete) to kill Explorer and then Run in the menu to restart "Explorer," along with restarting the Windows CMD window however, worked. I can now invoke Iron Python ("ipy") via command line from any directory. For the "path" I edited path in the System Variables and not the User Variables. No, you don't have to type that whole crazy line above just to test the path variable, just "ipy" (and control-Z to quite IronPython) in the CMD window invoked by typing "cmd" into the Start menu search box.
From the CMD line this step did work fine:
3.) ironpkg
Bootstrap ironpkg, which is a package install manager for binary (egg based) Python packages. Download ironpkg-1.0.0.py and type:
> ipy ironpkg-1.0.0.py --install
Now the ironpkg command should be available:
> ironpkg -h(some useful help text is displayed here)
But of course Step 4 fails, giving pages of what seem to be error messages;
C:\Users\Nik>ironpkg scipy
Traceback (most recent call last):
File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\enstaller\utils.
py", line 92, in write_data_from_url
File "C:\Program Files (x86)\IronPython 2.7\Lib\urllib2.py", line 126, in urlo
pen
File "C:\Program Files (x86)\IronPython 2.7\Lib\urllib2.py", line 397, in open
File "C:\Program Files (x86)\IronPython 2.7\Lib\urllib2.py", line 509, in http
_response
...
Why can't I just download Numpy as a normal file and thus also have it easy for other users to install it when they use my scripts? This is just crazy and lazy. The Enthought developer has turned this into a computer game, with a missing registration link and then the last step spits out errors with utterly no information on how to fix it manually.
This Step 4 error is covered here:
http://discourse.mcneel.com/t/trying-to-import-numpy-in-rhino-python-but-im-getting-this-error-cannot-import-multiarray-from-numpy-core/12912/16…
Added by Nik Willmore at 2:36pm on October 11, 2015
the daylighting and energy sim with Nat Vent create many complex questions.
Daylighting :
1. Adding shading to energy AND daylight simulation: Can I add HBconext to Honeybee_run daylight simulation HBobject input ?
Looking at the results it seems like daylight simulation doesn't recognize HBcontext, or maybe the difference is minute. Am I doing this correctly? Is there a possible error due to redundancy ? (meaning I am introducing the HBcontext twice, one time to the Honeybee_run daylight simulation AND energy simulation)
2. One of the component, Honeybee_Read annual result 1 keeps failing and says that ''1. Solution exception:index out of range: 0." I read here input needs to be internalize data but maybe there is a better solution?
Shading :
I want to study life cycle perspective of
A) Optimal ratio of fixed vs dynamic louvers for economic implementation,
B) Assess whether it makes more sense for the dynamic louvers to functions as light shelvs or the fixed ones for economic reasons
C) Simulate dynamic/fixed hybrid louver system schedule, and show it in a manner similiar to lighting schedule.
For this I would need to simulate the effect of dynamic and-or fixed shades in reducing annual lighting cost while reducing cumulative heat gain.
3_How to introduce Dynamic shading schedule for custom shades? Is this done with EPtranschedule input of the HB EP context component? I would like to keep the louvers branched so that it is possible to assign different modes i.e. fixed or dynamic
Light Shelf:
4_Is the lighting schedule effected by light shelves introduced in the annual daylighting simulation?
5_Does energy simulation take account of additional heat gain from light shelvs ?
6_When I use Honeybee_createHBSrfs with Honeybee_radiance Mirror material, it crashes rhino. The geometry input is not branched. Any report similar crashes?
Nat Vent:
I want to design to combine passivhaus principles with Natural ventilation.
My goal to simulate the energy performance of passivhaus house like building system with Bouyancy driven Nat Vent design which maximizing the percentage of the year Nat Vent takes care of ventilation and cooling, and in cloud days heat exchanger with fans kicks in.
using a trombe roof that heats air and using a vertical shaft that recirculate air, want to minimize the use of fans, Ducts, Heating etc. and I want to use the HB Set_Air flow component to evaluate such system if I can.
while I have heard that bouncy driven system may only be reserved for tall buildings, I still would to simulate the effectiveness for mid rizes and podium- types. I am skeptical whether there will be enough pressure difference for effective ventilation of 1.5ms so I would like to test.
How to set up models to evaluate bouyancy driven ventilation :
7 About HB Set_Air Flow, with Natural ventilation, If I use the HB Set_air the honeyzone output is null. I am not sure why, no error messages.
8_ When using the HB Set Air component to include Nat Vent with bouyancy,
does the result of reduced temperature to take effect into the cooling/equipment/ventilation schedule of the Honeybee_set Energy plus zone schedules?
Additionally I want to incorporate Nat vent analysis with the light shelf, since both would effect indoor temperature.
A wish list: as if it were all this has been not.
9_I wish there is something like a deconstruct honeybee zone component that basically breaks down all the options (mechanically ventilated or not) that is associated with the honeybee zones so that it is easy to document all the properties in text.…
ity...? How to define this parameters and simulate them? How to simulate and evaluate form? How to work with Evolutionary Solver inside Grasshopper3d? How to evaluate end data and choose the fittest geometry? How to optimize geometry to increase overall energy efficiency of project!?
»»» Rhinoceros 5 + Grasshopper 3D & Sub-Plugins *required grasshopper plugins: Elk, LadyBug + Honeybee, Mesh edit (uto tools), Mesh+, Weaverbird, Human, TT Toolbox, Lunchbox, Horster tools, Exoskeleton & Cytoskeleton
>>>Please download and install Rhino + GH3D & Sub-Plugins before workshop start!<<<
with Igor Mitrić
DIGITAL FABRICATION BASICS - 3D SCANNING AND 3D PRINTING
Workshop would provide overview of current state of technologies for 3D scanning and 3D printing with those affordable and practical devices for research and development new design projects. Attendees would use 3D scanner to generate 3D model in virtual computer space, remodel, and prepare for 3D printer.
with Roberto Vdović
OPTIONAL FIELD TRIP - ON SITE ENERGY MEASUREMENTS (19.6.2015)
with Benedikt Borišič and Veronika Madritsch
Participants will receive CERTIFICATES of knowledge acquired at the workshop for each section. Participation is FREE! The number of places is LIMITED!
MORE INFORMATION AND APPLICATION WWW.LIVECONST.EU
WORKING SCRITPS
Day 1 City.gh
Day 2 Lady Bug.gh
Day 3 Galapagos
Record Galapagos.gh
Day 3_First Half.gh
Day 3 Second Half.gh
Tower from any Curve.gh
…