Grasshopper

algorithmic modeling for Rhino

Hi guys, I'm currently working on a "V" structure for a project, and I want it to incrementally scale its size along a curve. Wat I did was copying it several times then scale all of them (see attached picture 1), but the thing is that the center of the scale must be at the end of every curve so it can be continous and not overlapping each other.

 I also tried to do the same thing but scaling them between two boundary curves (see attached picture 2 from rhino), but I guess I first need to know the logic of the proportional scaling process, so I hope somebody can help me out with this problem.

Any comment would be apreciated. Thanks!

Views: 9224

Attachments:

Replies to This Discussion

'open image in new tab' yields only the small preview image, not the large original.  'open link in new tab' yields the large original of the 2nd image (the viewport), not the first one (the icons).

Why not just post the GH code?

Or at least an image that uses labels instead of cryptic icons?

oops, you are right...

I guess we'll have to wait for Eric to re-upload it...

Some people in the forum prefer images vs names and, although I disagree, they do have some valid points (there are a few cases where 2 components display the same name...)

cheers,

nikos

Cross posted from another thread, though started here:

This one uses two more appropriate section curves for seating:

  1. seat surface and back (both angled), 3" ledge at top
  2. seat bottom and back - an arbitrary curve joined to a horizontal bottom line

The image and code note that the 'Steps' slider (sections in yellow) cannot be changed without affecting the scale...  So 'PFrames' are used to get as many sections as you want (blue).

P.S.  'Cap Planar Holes' works in this case!

Attachments:

Previous code had errors... this version probably does too.

The original question suggested geometry scaled with distance, which makes sense when using solids; bigger boxes must be farther apart.  When lofting, though, it makes perfect sense to scale sections independently from the distance between them.

For practical use, I found the graph mapper clumsy; too course and approximate.  So I adapted the code I wrote here (Maths + Divide Curve) so that a list of numbers drives the spacing and, optionally(!), the scaling.

  • When 'Scale by Distance' is false, the numbers in the list determine scaling; '1' is actual size, '0.5' is half size, '2' is twice the size, etc.
  • When 'Scale by Distance' is true, the distance between the points is used for scaling.  This is an indirect effect of the list of numbers (which determines point spacing) and the size of the original shape relative to the curve length.
  • 'Tangent 0' is the curve tangent at each point.  It works well for lofting.
  • 'Tangent 1' is the vector between each point and its successor.  It works well for orienting solids.

There are still some mysteries... ("Where there is mystery, there is no mastery.")

Lofting doesn't always work well, 'Cap Planar Holes' doesn't work anymore...

I had hoped that this sequence, ".5,1,2,1,.5", would result in:

  • two half size shapes, one at each end of the curve.
  • two full size ("1") and one double size ("2") shapes, spaced appropriately.

But I have a mental block about how to achieve that...?  :(  Instead, I settled for the last of the five shapes being one point short from the end of the curve, and the spacing is off.

Even so, I find this approach easier to use on a practical basis than the graph mapper.

Attachments:

P.S.  I get better lofting results by using a single curve as input, joining the top and bottom curves that make the seat profile beforehand instead of lofting them separately:

Attachments:

Just for grins, I wired the 'Graph Mapper' back in but made it optional; there is a switch next to it, 'Use Graph Mapper', default is 'False'.  It toggles a 'Stream Filter' to get the sequence of numbers from either a panel connected to 'Split Text' or from the graph.

One difference: 'Scale by Distance' is still an option, using either one.

By the way, can anyone tell me why the 'Unit' vector component is needed in the 'Orient Scaled Copies to Curve Points' group?  Without it, the scale is affected - why?

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service