Grasshopper

algorithmic modeling for Rhino

Hello.

So basically I having a curve created in rhino, afterwards being 'parametrised' in Grasshopper. After wards, this element was oriented on a divided curve (5 times). What I am looking for, is getting different variable for each shape on the curve (whether it is related to the curvature's parameters its not really import, its just that I've been trying out something). Since I am not experienced with Grasshopper, I am wondering whether this is possible, or do I need to create the shape from scratch on Grasshopper?

Views: 3089

Attachments:

Replies to This Discussion

Is it possible at all, considering that the object wasn't made in grasshopper?

 

And another problem I just discovered, anyone knows how to dissociate the 2 planes I got there (the components that comes after the 'Merge')?

Is it the question that is badly formulated, or the the whole thing is too much to bear with ? I would really appreciate any kind of help. I've been trying out getting the different variable for each shape on the curve, for days now, and no result, and today is the deadline :3 there is another script that could be a solution, but I cant figure out how to make it work. (the thing with cones on the curve, each cone having different parameters depending on its position on the curve)

The question is badly formulated - your objective is not clear to me from this: "What I am looking for, is getting different variable for each shape on the curve"?

And your code isn't very clear to me either.  Too many stray copies of GH fragments and unused widgets scattered on the canvas, for one thing.  Your "rail" curve is buried on the far right, there are eight copies of your two station curves, not five as stated in your question.

But you have accomplished something.  Just not clear about what you want vs. what you got?

Did you expect multiple (variable) copies of your station curve from 'Point Deform'?

What I did:

I took 2 polylines, created in rhino, afterwards making possible to modify the shape of those objects, moving the controls points of the polylines. Afterwards, I created a curve, had it divided, and on each point on that curve, I placed those polylines (using perp frame -> orient). 

What I am looking for now is to find a way, so that each polyline on that curve has different variables (or differents shapes (basically different positions of the control points)).

The difficulty is: (besides being rather not experienced with grasshopper) I cant find a way to make this operation, since technically I dont have a 'length' parameter, but basically 'coordinates' of points (because me object is not just a grasshopper shape, but one that I took from rhino, and changed in grasshopper). The result that I am looking for, is having the polyline points, change depending on its emplacement on the curve where the object has been oriented. Or have the shape evolve, depending on where it is on that curve.

Does this clarifies it a bit?  The chaos on the canvas is a result of different tries, for which I am terribly sorry  

Attachments:

Yes, I think a better word might be "variations" of the polyline station curves instead of "variables".  And this has nothing at all to do with creating those initial polylines in Rhino vs. GH (I meant to say that earlier).  What you need to do is generate variations of those two polyline curves (I call them station curves because that's what they're called for the 'Sweep' component), multiple copies that are each unique in some way - the way the code is written now gives you only one variation.

You could create the variations before you orient them along the rail curve or orient them as you have and then modify each one of them, perhaps using random movements of the control points.

I have to do some errands for awhile, will check in again later.  Good luck.

Thought for the moment I am a bit confused, but I might understand what you mean. I'll still try. Thank you anyways.

Well, there are so many ways...  What I came up with may not be quite what you want but perhaps will show you a way forward.

First, there was an enormous amount of extraneous crud in your GH file that I had to sift through, sort out and discard!

Second, because your two station curves have a different number of control points ("Discontinuities"), I kept things simple by using just one of them.

Third, because you want each station curve to be a unique variation of the original, I replaced your 'Gene Pool' sliders with a pair of random number generators (one for angle and one for length).  The total 'Number (N)' is determined by multiplying the number of points (7) by the number of stations you want (the 'num stations' slider).  Then I partitioned those outputs into branches of 7 numbers each.  The number of branches is then the same as 'num stations'; this ultimately results in 'num stations' curves emerging from 'PDeform'.

You will notice that the station curves are twisted in unexpected ways...  This is due to "torsion", an annoying "feature" that affects the 'PFrames'...  It's tempting to write this differently but you'll learn more if you wrestle with this stuff a bit more yourself, I think.

Attachments:

P.S.  Instead of extruding these station curves, you can use 'Sweep1' with the 'rail' curve; reduce 'num stations' (six shown) to minimize kinks due to torsion.  Eliminating the torsion completely is possible but not necessarily trivial...

Drum roll please...

Here is the same code but without torsion affecting the station curves!

I encapsulated the "trick" in a cluster, 'pFramesNT' ("Perp Frames No Torsion"), used by 'Orient' as the 'Target (B)' plane:

And I added a couple of interesting options for creating the 'Source (A)' plane used by 'Orient':

Either 'Point on Curve' (with different results as you move the slider between 0 and 1, the beginning and end of the station curve) or the 'Area (C)' centroid can be used as the plane origin.

A wide range of results are possible by changing the various sliders ('angle', 'Domain End', 'Seed', etc.).

Fun!

Attachments:

Caveat: the frames created by 'pFramesNT' will be perpendicular only if:

  1. The curve ('C') input is planar and
  2. The 'Vertical (V)' vector input is perpendicular to the plane of the curve (default is 'Unit Z' which assumes that the curve 'C' is in the 'World XY' plane or parallel to it).

If these two conditions are not met, the results will be... interesting at the least.

Thank you very much for your help.

However the final object wouldn't be a sweep, but each shape, would be an independent extrude,creating an ensemble of extrusions. Still a useful information for the future.

In the same time in need the two station curves to be on the rail curve, as they are in the square, i tried to do it, but for a reason, it puts all of the  2nd curves in 1 point,(all the variations if it makes more sense)

Would you happen to know what might cause this? 

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service