will work slightly different from before. Sorry about breaking this, but it proved impossible to improve the selection logic with the fairly ambiguous notation that was implemented already.
Not every change is breaking though and I hope that most simple matching rules will work as before. There will be a McNeel webinar on Wednesday the 6th of November where I discuss the new selection rules (as well as path mapping syntax and relative offsets within one or more data trees). This will be a pretty hard-core webinar aimed at expert users. The event will be recorded so you can always go and watch it later. I figured I'd briefly explain the new selection rules on Ning before I release the update though.
-------------------------------------------------------------------------------
Imagine we have the following data tree, containing a bunch of textual characters:
{0;0} = [a,e,i,o,u,y] {0;1} = [ä,ë,ê,ï,î,ö,ô,õ,ü,û,ÿ,ý] {1;0} = [b,c,d,f,g,h,j,k,l,m,n,p,q,r,s,t,v,w,x,z] {1;1} = [ç,ĉ,č,ĝ,ř,š,ş,ž]
There are a total of four branches {0;0}, {0;1}, {1;0} and {1;1}. The first branch contains all the vowels that are part of the standard English alphabet. The second branch contains all non-standard vowels and branches three and four contain the standard and non-standard consonants respectively.
So what if we want to select from this tree only the standard vowels? Basically include everything in the first branch and disregard everything else. We can use the [Tree Split] component with a selection rule to achieve this:
{0;0}
This selection rule hard-codes the number zero in both tree path locations. It doesn't define an item index rule, so all items in {0;0} will be selected.
If we want all the vowels (both standard and non-standard), then we have several options:
{0;?} = select all branches that start with 0
{0;(0,1)} = select all branches that start with 0 and end in either 0 or 1
{0;(0 to 1)} = ......................................... and end in the range 0 to 1.
Conversely, selecting all standard vowels and consonants while disregarding all non-standard character can be achieved with rules as follows:
{?;0}
{(0,1);0}
{(0 to 1);0}
It is also possible to select items from each branch in addition to limiting the selection to specific branches. In this case another rule stated in square brackets needs to be appended:
{0;?}[0 to 2]
The above rule will select the first three vowels from the standard and the non-standard lists.
Basically, rules work in a very consistent way, but there are some syntax conventions you need to know. The first thing to realize is that every individual piece of data in a data-tree can be uniquely and unambiguously identified by a collection of integers. One integer describes its index within the branch and the others are used to identify the branch within the tree. As a result a rule for selection items always looks the same:
{A;B;C;...;Z}[i] where A, B, C, Z and i represent rules.
It's very similar to the Path Mapper syntax except it uses square brackets instead of parenthesis for the index (the Path Mapper will follow suit soon, but that won't be a breaking change). You always have to define the path selector rule in between curly brackets. You can supply any number of rules as long as you separate them with semi-colons.
The index rule is optional, but -when provided- it has to be encased in square brackets after the path selection rule(s).
The following rule notations are allowed:
* Any number of integers in a path
? Any single integer
6 Any specific integer
!6 Anything except a specific integer
(2,6,7) Any one of the specific integers in this group.
!(2,6,7) Anything except one of the integers in this group.
(2 to 20) Any integer in this range (including both 2 and 20).
!(2 to 20) Any integer outside this range.
(0,2,...) Any integer part of this infinite sequence. Sequences have to be at least two integers long, and every subsequent integer has to be bigger than the previous one (sorry, that may be a temporary limitation, don't know yet).
(0,2,...,48) Any integer part of this finite sequence. You can optionally provide a single sequence limit after the three dots.
!(3,5,...) Any integer not part of this infinite sequence. The sequence doesn't extend to the left, only towards the right. So this rule would select the numbers 0, 1, 2, 4, 6, 8, 10, 12 and all remaining even numbers.
!(7,10,21,...,425) Any integer not part of this finite sequence.
Furthermore, it is possible to combine two or more rules using the boolean and/or operators. If you want to select the first five items in every list of a datatree and also the items 7, 12 and 42, then the selection rule would look as follows:
{*}[(0 to 4) or (6,11,41)]
The asterisk allows you to include all branches, no matter what their paths looks like.
It is at present not possible to use the parenthesis to define rule precedence, rules are always evaluated from left to right. It is at present also not possible to use negative integers to identify items from the end of a list.
If you want to know more, join the Webinar on Wednesday!
--
David Rutten
david@mcneel.com
Seattle, WA…
Added by David Rutten at 8:57pm on November 3, 2013
switch entirely to code for the K2 part.
1. When you have some idea in mind you MUST have always a Plan B (see the 2 stage def as in the other one [bridging]). In fact achieving a "uniform" result is a bit tricky via K (and maybe, just maybe Plan A is a "better" approach). That said NOT all the K2 thingies required are used in this V1.
2. Plan A (stop before K2) can yield some more suitable "conical" "shapes" with an indeterminate Loft profile (NOT included: a challenge for you, he he) like the one used in the bridging example. Notice that Plan A is real-time (and when doing parametric stuff this is the goal Numero Uno).
3. Authenticity of the soap opera series is assured since there's only sardines provided as instance definitions.
…
out of the practice walls.
Anyway get a hint: Hard top-bottom clustering is used (process is STOPPED to the fist level of clustering for clarity: meaning flat clustering):
Cubes are abstarct (spaces, say: "rooms") centroids:
Then clusters are made; Prox K-Means is used here (other methods also available). Cyans are the abstract representation of the flat clustering (for clarity). The decision upon the number of clusters is quite complex and is based on criteria that are not used here (adjacency matrices et all):
Then this:
And finally that:
Obviously the real thing works recursively (kinda like a fractal algo) on the clusters and stops if the predefined number of nodes is reached (say 2 or 3). Then the "flat" red connector shown connects actually (bottom to top) child to child AND child to parent clusters etc etc.
BTW: GH has a component (called quadTree) that - I guess - works "kinda" like a K-Means clustering algo but the fact that GH is a-cyclic by nature ... means that you should use Anemone - if the above are attempted via the component way (not my way anyway).
more soon
…
y combo of anchor points (although using all the peripheral points ... well ... that's a good starting point for your adventures in C# > get a tree: say x: branches and y: items and gimme all the points in the perimeter, he he).
2. There's nothing wrong with the 3dPDF (but I'll mail to you anyway) > maybe you use some archaic Adobe Reader build? Have you configured the Reader properly? Have you ever attempted to exploit a 3dPDF thingy in the past?
3. Most humorous: you mean in the Monty Python way? (WHAT a bunch of genius was that "group" ...).
4. Skype weekends: well , since the MotoGP season is over why not? (ALAS: due to an enormous conspiracy [by Honda] > Hero-Valentino > got the short end of the stick > all that because he kicked someone [is this a big deal?] > why should I live ? > Seppuku ASAP).…
pattern, where pairs of points on a piece of fabric are stitched together(1 to 2, 2 to 3 etc...)
The result is a bas relief puckered surface as seen below
My question is, does anyone have thoughts about components that would simulate the material qualities/behaviors of fabric via a mesh or surface in gh? I have used k2 to constrain curve length, which is similar to what I want to do, however I need to constrain the dimensions of a mesh or surface (fabric) instead. I would also need to be able to dictate what direction the pinched/gathered fabric would go (up vs down)
I don't need any assistance in creating patterns or points for puckered iterations, I have plenty of ideas regarding that. I also don't need to get into minute material quality differences (trying to simulate how silk vs wool puckers) I just want to use the definition to give me a general understanding (pucker shape, direction) of how a 2d surface or mesh "fabric" can be transformed by "stitching" points together. I would be grateful for some component/plugin suggestions. I am exploring meshedit, mesh+, k2, toolbox at the moment.
Many thanks -
-K
Many thanks
…
content from the "bin" folder to the "c:\ladybug\terrain shading mask libraries 64-bit" folder:
So not the very bin folder, but its content.Just do this and the component will work.
Hi Abraham,
But just want to remind that Marios Tsiliakos developed a component for unblocking the LB_HB components and libraries (Unblock All and Unblock).
Thank you for the suggestion. I am aware of that component. I shared an article about it on my facebook account last year, at the time when it was released. It's a great component!There are still two issues with it: It edits the windows registry.I order for it to edit the windows registry it requires an account with administrator's rights.To unblock the file manually you do not need to have an account with administrator's rights.
BTW i installed the release-1800-x64-gdal-2-1-0-mapserver-7-0-1.zip without issues (just unblocking).
Yes, the GDAL 2.x.x and MapServer 7.x.x versions will also work. But I can not install them on my PC, therefor I can not provide support for them. The GDAL 1.x.x and MapServer 6.x.x are sufficient for what the component does.If you intend to seek support for any future issues, please install the latest GDAL 1.x.x and MapServer 6.x.x version as said by the component installation instructions.…
posted rather testifies that. Randomness is the virtue here NOT equality. BTW: forget completely "optimization" of the mount points et all.
2. The thing in pic is airy (quality Numero Uno on that type of stuff, especially for things with no real load bearing capability) meaning minimum profiles ... meaning FORGET wood. Use aluminum tubes (rather cheaper than wood) as follows: screw the Captain Hook "node" in some kind of machined tube end (a humble massif cylinder that is screwed or clued [Araldide 2 part Epoxy] to the tube AND machined with threads for the hook).
NOTE: I could make a simple tube "adjustment" system that could allow you to build that on-the-fly WITHOUT any GH/K or anything: just start connecting variable length tubes ... er ... hmm ... randomly. This is the recommended way to do it anyway: we can't emulate art with software and even if we could: it's the art of pointless.
3. Additionally the whole conceptual aesthetics BEG for some kind of metal instead of wood. The fact that wood is aplenty in Russia doesn't justify killing trees (for any scope), anyway.
4. Using rings to "attach" the hooks ... well that could yield a highly unstable structure for more than obvious reasons. I could provide to you dozens of highly sophisticated bespoke solutions on that matter ... but they are unsuitable for this DIY occasion: I must think on a zero basis on that puzzle - allow me some time to propose the best "adapter" (easy, cheap, stable and allowing some liberties).
5. A Connectivity tree (see for instance Sandbox) can resolve with easy the equal axis worry of yours (thus: FORGET equality, just buy a hack-saw [ aluminum is very easy to "cut", he he]).
All in all: I like that a lot. I'll post soon some examples related with the all overall approach (including the node, he he). You don't need Kangaroo for that (and dare I say no structural analysis IF the structure to be is "similar" in size with the one pictured).
more soon, best, Lord of Darkness…
ruses could follow. Then cones are made and some other things.You can move the cones around via the equivalent slider. If the cones "touch" then ... well .. test it and see what's happening,
2. Interactive capability is not present: assume that you have 666 paths/cones > by what means you think that you could control what's happening? By adding 666 sliders? (not in a million years).
3. Rhino is amusing with regard the solid union Method. Depending on Karma you can get this:
or that :
4. Leaving aside N3 .. if the real-time response goes AWOL with just 8 cones what would be the situation if you add 666 cones? This is the reason for using K to solve this ... obviously with "some" compromises yielding "vault" stuff like this:
or like that (an Alien billiard (C)(Tm)(US patent pending) for planet Zorg):
Moral: stick to the Soap_opera approach.…
it provided that you know how to use it, he he).
Note: prior switching from mesh (via StarlingStar) to brep+holes (via C#) - each one has his own K Engine - stop/kill the Kangaroo animation control mini Dialog otherwise ... you'll have "some" troubles.
djodje:
This thing used (see script in v4b) IS NOT the same as the P thing that you posted (the one that takes 3 arguments where the splitter is a curve).
for David:
Irrelevant with the thread, but a 100% repro case related with the GH inability to internalize data:
This brep is a human figure internalized (but every time when the def is stored and reopened GH reports it as "Null").
So import the man-and-dog.3dm, reference the man (or the doberman), save definition and reopen it.
I'm not sure if Image sampler can store (in file) a thing or two as well:
v5 "soon" (lot's of new stuff and 4.56 divisions by zero) , best, Peter…
rmation?" I know that this can already be accomplished using the brilliant Kangaroo plugin, but I wanted a simpler and faster (yet still accurate) single component that could replicate this unique curve using a variety of inputs: the length of the rod/wire, the width/distance between the endpoints, the height of the bend, and the tangent angle at the start. I also wanted make the unknowns (such as height if only length and width are known) easily accessible for plugging into additional components.
The resulting script, being an all-in-one solution, is somewhat unwieldy, but it could easily be broken down into smaller components (custom .gha's which I don't have the ability to code). If someone wants to tackle this, please do! I'm not an expert coder by any means, and as this was only my second time diving into Grasshopper scripting, if the script seems somewhat strange, that's probably why. I did try to comment the code pretty well though. Here's the full description:
--------------------------------------------------
DESCRIPTION: This beast creates the so-called 'elastica curve', the shape a long, thin rod or wire makes when it is bent elastically (i.e. not permanently). In this case, force is assumed to only be applied horizontally (which would be in line with the rod at rest) and both ends are assumed to be pinned or hinged meaning they are free to rotate (as opposed to clamped, when the end tangent angle is fixed, usually horizontally). An interesting finding is that it doesn't matter what the material or cross-sectional area is, as long as they're uniform along the entire length. Everything makes the same shape when bent as long as it doesn't cross the threshold from elastic to plastic (permanent) deformation (I don't bother to find that limit here, but can be found if the yield stress for a material is known).
Key to the formulas used in this script are elliptic integrals, specifically K(m), the complete elliptic integral of the first kind, and E(m), the complete elliptic integral of the second kind. There was a lot of confusion over the 'm' and 'k' parameters for these functions, as some people use them interchangeably, but they are not the same. m = k^2 (thus k = Sqrt(m)). I try to use the 'm' parameter exclusively to avoid this confusion. Note that there is a unique 'm' parameter for every configuration/shape of the elastica curve.
This script tries to find that unique 'm' parameter based on the inputs. The algorithm starts with a test version of m, evaluates an expression, say 2*E(m)/K(m)-1, then compares the result to what it should be (in this case, a known width/length ratio). Iterate until the correct m is found. Once we have m, we can then calculate all of the other unknowns, then find points that lie on that curve, then interpolate those points for the actual curve. You can also use Wolfram|Alpha as I did to find the m parameter based on the equations in this script (example here: http://tiny.cc/t4tpbx for when say width=45.2 and length=67.1).
Other notes:
* This script works with negative values for width, which will creat a self-intersecting curve (as it should). The curvature of the elastica starts to break down around m=0.95 (~154°), but this script will continue to work until M_MAX, m=0.993 (~169°). If you wish to ignore self-intersecting curves, set ignoreSelfIntersecting to True
* When the only known values are length and height, it is actually possible for certain ratios of height to length to have two valid m values (thus 2 possible widths and angles). This script will return them both.
* Only the first two valid parameters (of the required ones) will be used, meaning if all four are connected (length, width or a PtB, height, and angle), this script will only use length and width (or a PtB).
* Depending on the magnitude of your inputs (say if they're really small, like if length < 10), you might have to increase the constant ROUNDTO at the bottom
REFERENCES: {1} "The elastic rod" by M.E. Pacheco Q. & E. Pina, http://www.scielo.org.mx/pdf/rmfe/v53n2/v53n2a8.pdf {2} "An experiment in nonlinear beam theory" by A. Valiente, http://www.deepdyve.com/lp/doc/I3lwnxdfGz {3} "Snap buckling, writhing and Loop formation In twisted rods" by V.G.A. GOSS, http://myweb.lsbu.ac.uk/~gossga/thesisFinal.pdf {4} "Theory of Elastic Stability" by Stephen Timoshenko, http://www.scribd.com/doc/50402462/Timoshenko-Theory-of-Elastic-Stability (start on p. 76)
INPUT: PtA - First anchor point (required) PtB - Second anchor point (optional, though 2 out of the 4--length, width, height, angle--need to be specified) [note that PtB can be the same as PtA (meaning width would be zero)] [also note that if a different width is additionally specified that's not equal to the distance between PtA and PtB, then the end point will not equal PtB anymore] Pln - Plane of the bent rod/wire, which bends up in the +y direction. The line between PtA and PtB (if specified) must be parallel to the x-axis of this plane
** 2 of the following 4 need to be specified ** Len - Length of the rod/wire, which needs to be > 0 Wid - Width between the endpoints of the curve [note: if PtB is specified in addition, and distance between PtA and PtB <> width, the end point will be relocated Ht - Height of the bent rod/wire (when negative, curve will bend downward, relative to the input plane, instead) Ang - Inner departure angle or tangent angle (in radians) at the ends of the bent rod/wire. Set up so as width approaches length (thus height approaches zero), angle approaches zero
* Following variables only needed for optional calculating of bending force, not for shape of curve. E - Young's modulus (modulus of elasticity) in GPa (=N/m^2) (material-specific. for example, 7075 aluminum is roughly 71.7 GPa) I - Second moment of area (or area moment of inertia) in m^4 (cross-section-specific. for example, a hollow rod would have I = pi * (outer_diameter^4 - inner_diameter^4) / 32 Note: E*I is also known as flexural rigidity or bending stiffness
OUTPUT: out - only for debugging messages Pts - the list of points that approximate the shape of the elastica Crv - the 3rd-degree curve interpolated from those points (with accurate start & end tangents) L - the length of the rod/wire W - the distance (width) between the endpoints of the rod/wire H - the height of the bent rod/wire A - the tangent angle at the (start) end of the rod/wire F - the force needed to hold the rod/wire in a specific shape (based on the material properties & cross-section) **be sure your units for 'I' match your units for the rest of your inputs (length, width, etc.). Also note that the critical buckling load (force) that makes the rod/wire start to bend can be found at height=0
THANKS TO: Mårten Nettelbladt (thegeometryofbending.blogspot.com) Daniel Piker (Kangaroo plugin) David Rutten (Grasshopper guru) Euler & Bernoulli (the O.G.'s)
--------------------------------------------------
Edit: More on the math behind this here.
Cheers,
Will
…
Added by Will McElwain at 4:08pm on February 26, 2014