Curve Brep attractor: Adding brep attractor

Grasshopper Code: Transforming Simple Geometry Grasshopper: Curve/Brep Attractor Transformation
2 minutes
Share the link to this page
Copied
  Completed
Adding box in rhino as an attractor, by referencing it as a brep in grasshopper.

Transcript

1 00:00:11,460 --> 00:00:16,080 Unknown: Hey, it's great you made it this far. Let's begin 2 00:00:16,080 --> 00:00:21,090 adding our new code. First we will create our attractor which 3 00:00:21,090 --> 00:00:29,040 is a box in Rhino, and we will reference it in grasshopper. We 4 00:00:29,040 --> 00:00:32,490 will want to find the closest points to our box to define the 5 00:00:32,490 --> 00:00:36,420 direction at which our vectors will be pointing. I would want 6 00:00:36,420 --> 00:00:40,200 to find the distances to use in the magnitude of movement, 7 00:00:40,650 --> 00:00:44,910 factor scaling and degree of rotation. So in order to do 8 00:00:44,910 --> 00:00:50,760 that, we will add bread closest point component, connect the 9 00:00:50,760 --> 00:00:52,140 breath to its prep input 10 00:00:53,760 --> 00:00:55,710 and the grid points to its points input.

11 00:00:57,299 --> 00:01:00,929 Now we have the closest points and the distance As output 12 00:01:02,970 --> 00:01:04,260 we will then add two 13 00:01:04,260 --> 00:01:07,860 more components a minimum maximum bounce component, which 14 00:01:07,860 --> 00:01:10,860 you already know what it does and the other is a number of 15 00:01:10,860 --> 00:01:12,900 components which basically accepts 16 00:01:12,900 --> 00:01:14,760 and pass floating point numbers. 17 00:01:17,879 --> 00:01:20,939 We will connect the points output of the brep closest 18 00:01:20,939 --> 00:01:22,049 points component 19 00:01:22,379 --> 00:01:25,349 to the new point components we created last lecture. 20 00:01:29,879 --> 00:01:32,759 Then we connect with distance output to the minimum maximum 21 00:01:32,759 --> 00:01:35,309 bounds and also to the number of components. 22 00:01:36,930 --> 00:01:38,910 Now, we want to connect the outputs. 23 00:01:39,150 --> 00:01:42,990 So, we will connect the minimum maximum bounce output to the 24 00:01:42,990 --> 00:01:45,990 three source domain inputs of the remap 25 00:01:46,050 --> 00:01:48,540 components in movement, scaling and rotation.

26 00:01:52,560 --> 00:01:55,260 And we will connect the number component to the value to the 27 00:01:55,260 --> 00:01:59,190 map in bits also in the remap component in the three parts of 28 00:01:59,190 --> 00:01:59,670 the code 29 00:02:01,499 --> 00:02:02,159 Now that 30 00:02:02,159 --> 00:02:05,459 we are done with this first part, we will move to the vector 31 00:02:05,459 --> 00:02:07,889 two points component and the rotation part. 32 00:02:08,249 --> 00:02:10,439 We will connect our grid points to point a 33 00:02:12,420 --> 00:02:15,390 to define the base points of where our vectors will begin. 34 00:02:16,800 --> 00:02:19,560 And we already have point the explained and connected before. 35 00:02:22,530 --> 00:02:26,280 Now we can preview our route aid 3d and preview off all the rest 36 00:02:26,280 --> 00:02:29,910 of components. And now we have our points transformed according 37 00:02:29,910 --> 00:02:33,930 to our brep attractor.

In the coming lecture, we're going to 38 00:02:33,930 --> 00:02:37,050 build on this tutorial I'm going to show you how to use line as 39 00:02:37,050 --> 00:02:38,550 an attractor instead of rip.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.