string may contain any number of curly bracket pairs with non-negative integers in them:
"When {0} brings back {1} days and {2}"
The number inside the brackets refers to the data to insert in that location. In effect, {x} is a placeholder for actual data. The data inserted into a specific bracket pair is the data supplied in the latter part of the function. {0} refers to the first item, {1} to the second, {2} to the third and so on ad infinitum.
If I supply some data the entire expression may look like this:
Format("When {0} brings back {1} days and {2}", "Spring", "blue", "fair")
which will result in the string "When Spring brings back blue days and fair".
If the data you're inserting is a number (or a date) then you have additional formatting flags that you can use. These additional flags appear behind the placeholder index integer separated by a colon.
Format("Pi = {0:0.00} ({0:0.000000})", Pi)
The :0.00 means the number will be formatted using two digits. The other flag will enforce six digits, resulting in: "Pi = 3.14 (3.141593)"
--
David Rutten
david@mcneel.com
Poprad, Slovakia…
Added by David Rutten at 3:00pm on February 3, 2013
n the inability to be a real-life member within a parametric workflow (same kind of issue with Evolute Tools Pro).
As regards strictly AEC matters the main problem with GH is Rhino itself (not feature/constrain driven, not a solid modeler, not AEC oriented by any means and not biased towards assembly/component modeling). Other than that and due to the known GH inability to handle/manage blocks/nested blocks at bake time ... well... I hardly can see how "to set up work flows between different tools such as ..."
I'll post soon 5 - rather "trivial" - AEC cases that are totally undoable (shop drawing level) with anything other than CATIA (or NX).
BTW: since international practices grow and grow in numbers these days (and individuals are dead) I can't see any realistic limitation for creating dedicated teams (kinda like Frank Gerhy did) that can easily deal with the "extremely heavy" nature of the beast.
BTW: this is a job ad (Project Architect role) from one of the biggest US AEC practices (rather a corporation, he he)
How things change these days ... don't you agree?
best, Peter
…
nette for years.. but without the nice GUI. It also allows combining constraints solving to be part of the DAG.
What is parameterics? Or parametric associative as GC has been described. Can't remember. History or procedural modeling? Even constraints solving or rules based solving all use parameters. Is it generative or merely parametric? I guess the difference is a parametric door doe not generate other parameteric doors?
BIM has opened the door to a more data centric view and manipulation of the design model. To old skoolers a wall is a linear construct that can be abstracted into parameters... beginning and end points of wall in plan + height and thickness. But start adding other stuff and need to ineteroperate with others and things get problematic.
Pretty soon, all those abstractions (parametric or otherwise) need to be structured and you end up talking about schemas etc to control the format of the parameters using rules as checks or constraints..so that your parameters can interface with parameters from others without causing data quality issues. It all gets very database thinking like.
So, I would say parametrics as GH does it is more free form and ad hoc and at some point if it goes BIM, the parametrics will be need to be (re)structured..
BIM is dependent on IFC development which is not very fast. IFC4 is only beginning to think about parametrics and 'Design Transfer'.
…
humacher (Zaha Hadid) and in fact most issues of AD (Architecture Design)
The Politics of Parametricism: Digital Technologies in Architecture by Matthew Poole, which is kind of a follow up
In my opinion learning Grasshopper will be enough and there is no need to learn Python to use it successfully. Best to have a deep understanding of Grasshopper and what it can do then to try and learn too many things at once. It will help you in applying the principles to other code and not the other way round (ie. learning the concepts first and then going into grasshopper). The best way to learn the concepts is by applying and trying them in a tool like Grasshopper.
I absolutely recommend that you visit a Grasshopper workshop, as that will teach you a lot more than Youtube videos. If you cant visit a workshop, then I recommend the rese.arch video series on Grasshopper. They're really indepth and go from simple introduction to very advanced. You should ideally buy and complete all of them.
Also there is of course Dynamo and its integration with Revit and BIM, which is something to look at, although Grasshopper covers all of that as well, at least with the integration with ArchiCad. Autodesk products are more common around the world though.
Be aware that a lot of the power of Grasshopper is also in the plugins you can get for it, like Kangaroo (physics simulation), Ladybug&Honeybee (environmental analysis), Karamba (finite element analysis), Hoopsnake or Anemone (looping) and many, many more. You can find them at food4rhino.com.
Good luck!…
2d grid from
grasshopper but in 3d, fully controllable of course. I want to do something
like the image in this web
site:http://news.cnet.com/Photos-Weaving-high-tech-fabrics-of-the-future—page-12/2009-1008_3-5667576-12.html
I figured that connecting points and lines kind of works (point and line input AB command) but the line length changes when I move a
point. What I want to be able to do is to move a point and drag others but keep
the line segments constant, just as a real net.
…
Added by Jesus Garza at 8:28am on February 23, 2010
ehow acquire different settings/are calculated differently. Appears at random “rows” of points, sometimes it all works fine, so I need to do a series for the error to show. See images below.
In the Ladybug fly run the VT of the window changes.
It’s taken me a day and a half to track this error down. Phew.
I get the same error on two different comps.
What is causing this? Does anyone get the same error? Images below created with RADquality set to 2, and 7 cores. Fiddling with Radsettings dont help, I think, except error goes away with very low ab.
…
d the fact that one pipe goes out and one goes in, that the surface normal direction is opposite for the two surfaces? Based on an earlier thread, you should know why by now. The two curves have opposite directions (again!); see the white arrows using Rhino 'Analyze | Direction'?
As before, you can fix that by flipping one curve to match the other. HOWEVER, you connected your curves directly to the 'Divide' components instead of using 'Crv' geometry params - bad form. And as before, you "fixed it" by reversing the list of starting points ('S' input to 'BiArc'). Better like this - 'Crv' params are internalized, no need for Rhino file:
Well, well! That didn't fix the opposite surface normals after all! Trust me, though, using geometry params and being conscious about matching curve directions is "best practice". But I haven't lofted 'BiArc' curves for awhile, it's late and I want to move on. OH! I just noticed that you reversed the 'Z' direction for one half of the 'BiArc' - that explains it:
Moving on... You've basically got it, though I would do it differently - same result, like this:
I haven't really explained surface normal vectors - can you figure it out from here? One more little wrinkle (Normal_2017Mar17b.gh):
…
Added by Joseph Oster at 12:03am on March 18, 2017
ported to Rhino and "set" in Grasshopper, i trim both surfaces from their rectangular bases so that when sDivide is used it creates and distributes the same number of points on each surface.But heres the problems: a) if i use the "trimmed" surfaces with SrfGrid it errors warning: "A point in the grid is null. fitting operation aborted".I'd learned this was caused by "nulls" replacing position Data Items when the rectangular grid(surface base) was trimmed away. So i used Clean Tree which worked removing all nulls, then Shift Paths\Flip Matrix to create line-endpoint pairs for Polyline\Evaluate Curve. I Flattened the last Flip Matrix placing all data items in one source for SrfGrid, like in the working Untrim\CopyTrim definition.This time,.b) SrfGrid errored with: "The UCount value is not valid for this amount of points",.So, i substituted a 356 value, numeric Slider in the Addition B param., and tested its range until a valid UCount was found. Then SrfGrid fitted a surface thru the points, BUT,d) those SrfGrid surfaces are extremely deformed even thought the points preceding it from Evaluate Curve are accurate,SEE: def: "3b-RGH_SurfaceBlend.gh",AND,.a2) if i use Untrim with CopyTrim then SrfGrid works, but since the Jokers limbs WILL be in different surface positions then the blends between the Arm (for example) will rise from its relative FLAT position on the untrimmed Source surface to the Arm on the Target surface, rather than morphing from the Corresponding Arm position on the Source surface,. ..see def.: "4-RGH_SurfaceBlend.gh"So please let me know,..1) how to produce accurate surfaces from SrfGrid in def.: "3b-RGH_SurfaceBlend.gh",. ..(NOTE: BOTH these def's contain 2 indentical, "internalized" surfaces, but if def. 3b can be made to work it will also work with Dis-similar surfaces)2) which component to use or how else to determine the correct UCount value for a specified amount of points(ie:155), re: SrfGrid error: "The UCount value is not valid for this amount of points",.3) how else to force SrfGrid to work with Trimmed surfaces?, AND,..4) how to force intersurface, point-blend correspondence lines: Polylines(PLine) to be connected between correctly! correponding positions (Limbs) on the surfaces?,
Really! appreciate all help, definitions and kind generosity common to this knowledgable membership,
Cheers!,
Jeff…
te some implications and questions so I will go one by one:
"Now I would like to use a single VRay material as a template for creating multiple identical materials"I hope this will work, but as VRay does not expose any SDK, I would not guarantee any specific result.
"Now I need to add them to the document material table"This is done with a reference to a document instance, such as the one you get with the code doc.Materials (both in C# and Vb.Net).
"I'm not going to learn C# to modify his script"That's a pity, it would be nice to pass on this troublemaker to somebody else! :)Btw, C# and Vb.Net are very very similar. This script could be written in Vb.Net too.
"Reference to a non-shared member requires an object reference. (line 96)"This only means that you need to access the Materials property on an instance, not on the type (class) name. Change that line using what is written at point 2.
"Do I understand that the material has to be assigned to a particular object in order to enter the Material Table?"No it does not. But if you call the _Purge command it will be removed if it does not have an object that references it.
"Can I assign it to a Layer instead?"You do not need to. But this would be achieved with doc.Layers[whichLayer].RenderMaterialIndex = materialIndex; in C# or doc.Layers(whichLayer).RenderMaterialIndex = materialIndex in Vb.Net.
"Any ideas? A better way to do this?"If you found a way to bypass the VRay SDK not being there, this should work.
"Giulio's component has a type hint defined as a Material"It does not any longer. The hint was there in earlier versions of Grasshopper, but now the hint has disappeared. This is not so bad, and it is also the only way you would be able to use either a Material instance already or a string for a material name.
"How was that done?"Probably it was done in an older version of Grasshopper. But which version are you using?
"I can't figure out how to cast the input as a Rhino.DocObjects.Material, so you can see that I have cast it as a compatible type in the first 2 lines... is there a cleaner way?"That sounds like a good way actually. Be sure your component responds properly when something wrong is inputted, though.Dim mTemp As Rhino.DocObjects.Material = CType(M, Rhino.DocObjects.Material)in one line might also work. See msdn for more conversion operators and functions.
I hope this helps,
- Giulio_______________giulio@mcneel.com…
edit 29/04/14 - Here is a new collection of more than 80 example files, organized by category:
KangarooExamples.zip
This zip is the most up to date collection of examples at the moment, and collects t