I WOULD like to place and adjust—with a slider—the position of a rectangle to be drawn and controlled along the Y-axis. The regular “Rectangle” block has at the top left, “P” for Plane, a rectangle base plane and seeks one locally defined value, World ZX.
Despite trying various combinations, I’ve yet to work it out the format for the plane description. This is a basic question I’m hoping someone can answer easily. I’m sure it’s simple. Any answer here could help other beginners as well. We were all beginners once!
(the goal is to loft three or more such rectangles along the Y-axis.)
a plane in GH is comprised of two things:
a point that defines the plane’s origin.
a vector that defines the plane’s orientation.
when you plug a point into a rectangle component, it just assumes that the vector will be the world’s z. (it will interpret it as a plane parallel to the xy plane starting from the point you gave. (bottom case)
So, if I understand correctly, you want to create a rectangle on the xz plane.
in that case, you can either plug a xz plane (=y direction plane) and if you don’t want it to start from the world start, you can additionally plug a point from the start. (top case)
This is slightly redundant as the x and y vectors lock down the z axis. The vectors all have to be unit vectors (i.e. have a length of 1.0), perpendicular to each other and right-hand oriented. Any departure from these rules makes the plane invalid, though not technically unusable.
Rhino itself also has an entity called a “plane equation”, which consists of just 4 numbers. It lacks a custom origin or orientation, but every plane is coincident with a plane equation. Grasshopper does not expose the plane equation type.
I was roughly in the right area and I think I’ve cracked it, with “Unit Y” (in the inline image). At least it does what I want. I hope this is most simple concise way of achieving the desired effect. Now that I can put rectangles anywhere I like, the next task is to ensure that Grasshopper deals with lofting in the right order …
It does work, but I don’t want to be unorthodox if it means starting a bad habit. If you could give me an actual example of what the input ought to look like, to the right of a slider or sliders, I’d be grateful!
I would disagree: there is nothing wrong with being unorthodox. (but I would agree that you have to be conscious of what you are doing and why)
I think it was explained in my first answer: the ‘rectangle’ component expects to receive a plane.
If you give it a point instead of a plane, it interprets it as a horizontal plane with that point as origin.
and as I just learned:
If you give it a vector, it will again ‘see’ it as the origin of a horizontal plane.
for example, in your image, you plugged 127 to a y vector and that to the rectangle.
this was interpreted as a point with coordinates: 0,127,0
if you did the same with a z vector, your rectangle would be drawn at 0,0,127.