In Rhino3D Grasshopper, I just discovered the MD Slider and wanted to utilize its 2-Dimension input for producing a scalable 3D-Box.The MD Slider allows for setting up a domain in X– and Y-direction (just double-click the input parameter icon). Other than its name and the settings suggest a Z-domain can’t be set:
To produce a box I had to extract X and Y via Deconstruct Point …
… and feed X– and Y– outputs into the corresponding inputs of a Rectangle component:
The rectangle turns 3D via Extrude and Cap Holes:
But of course, Extrude needs a Direction input. I used Unit Z (obviously) using half the sum of MD Slider’s X– and Y– output as Factor input:
As you can see I made use of an Expression component which I find convenient often times.
Now basically everything is done. But I wanted to offset my base rectangle so it centers around point(0,0,0). Rectangle’s Plane input is by default set to XY which is fine. But it offsets the rectangle from point(0,0,0) in positive X– and Y– direction.
To center the rectangle around point(0,0,0) I made use of the fact that Rectangle’s Plane input allows for point coordinates. These define the rectangle’s starting corner point. So all I had to do was to take MD Slider’s X and Y outputs, offset them by half their value and feed these results into a Construct Point component. So starting from here …
… I added my little offset definition:
That’s it – moving the MD Slider now let’s you scale the resulting box in all dimensions.
Basic information on Grashopper can be found here.
Grasshopper-ARCHICAD-connection: See here for more information.