Robotic manufacturing course: Part 1 - Simulating cutting with Grasshopper

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello hello hello and welcome welcome to the first lecture first tutorial for our aahn 15 create a tools course autumn semester of 2021 where we will be using a abb robot together with a hot knife so we will be carving out styrofoam or cutting out pieces of styrofoam to create a wall a three-dimensional wall by using this combination right of of tools and we are going to control that process mostly through grasshopper right with rhino and grasshopper so today is going to be the first tutorial where i'm going to show you how how you can simulate the carving the cutting and i already did a tutorial which you can find on on this youtube channel explaining that procedure but now now since we know exactly what kind of a tool we're going to be using i can be a little bit more precise with how we actually construct the script and uh how we construct the geometry in rhino so that is what we're going to be doing today it's going to be a quick one i promise right so the first thing that i want to do is i want to create some sort of a geometry i want to model out some sort of a geometry that we will be uh simulating the carving off right so first question is how big right how big of a panel or a piece of styrofoam will we will we use and that is 300 by 300 by 300 millimeters right so i'm just going to grab sorry 300 by 300 by 100 millimeters so i'm going to grab a box tool i'll hit uh zero hit enter so that we are we start drawing from zero and then instead of just clicking with my mouse i will type in the length width and height right so as i said before 300 enter 300 enter 100 enter zoom out there we go there's our our box just change this to oops definitely not rendered view shaded view like that we have ourselves a box and why is my box sorry about that just give me uh technical problems please hold my box is dark gray i don't want that i will change this to be that no that there we go and then it asks me for custom material whatever i'll just do a single material for all objects and this one i'll just make it lighter i really don't you know don't don't care about the color that much but uh when you lock an object it becomes darker so when my box was a little bit too dark i started seeing it as being locked right um sorry for that let's continue so this is our styrofoam block that we're going to be using and actually i'm going to what do we do with it i'll probably create a new layer right here and call it um let's say block i'll just write while having this box selected i'll right click on the block layer and change object layer right so i'm basically just moving this geometry into that layer i can now hide it or enable it right so by doing that i can always toggle between actually seeing the you know the the overall styrofoam block and not seeing it enough blabbing let's just start actually modeling right so i'm just going to grab this box right here and holding down the alt key alt key on your keyboard i will just drag it to the side just uh just a tiny bit to make a copy right and this copy i'll actually place to the default layer change object layer and i'll work with it here um i'll basically this is going to be the model with which i'm going to work and once i'm done i'm going to place it back into the 0 0 0 coordinates into this inside of this box and while i'm doing that i will just hide the block layer altogether okay so how do we work with this um let's do something simple right i think we can we can get away by doing something simple i'll just select this box i'll type in silhouette still wet you can see it me writing it i'll hit enter i'll type in now i have like all of the curves where i had the edges i it basically just gives me all of the curves and i can lock them in place and then select the box and delete it so now basically i have the the silhouette to which i can snap and just creating some sort of a initial panel uh let me turn on the object snapping right here in the bottom uh you can't really see it [Music] sorry about that filters bottom 60. something like that should be fine yep yeah so i am going to enable the object snapping in the bottom and i'll choose end snaps to be turned on and then i just draw a line from here to here maybe i'll put a point here and here and just create an arc as well two arcs actually i'm i'm just kind of planning it out as i'm modeling so this is not going to be anything spectacular that's for sure so where's the arc tool i'll just type it on arc enter asks me for the center so there's the center and i'm just going to draw an arc probably yeah let's do from let's do a hundred millimeter nah sorry sorry about that let's actually snap to the mid let's enable the midpoint snap and draw an arc from midpoint here to midpoint here like that yeah that that's a much better one and then again from midpoint to midpoint you can model out anything you want honestly as long as it fits inside of that box so this is just me doing it and i will take the two points and the line tool and i'll just move them m enter vertically v and or i don't even need to do that i can just select them and then click on the gumball um gumball set direction the arrow click on it and type in minus let's say minus 80. so i'm just moving them down by 80 millimeters like that right and now i think we can just go for uh a bunch of lofts so i can loft the point together with the curve here enter okay and you will not see that instead you will see something closer to this there we go and then i can lock between these two there we go and unlocked between these two when you hit enter it repeats the last command and also the right mouse wait right left right mouse click also repeats the last command that you used so it's pretty convenient to just kind of when you need to reload something just click the right mouse wheel we join everything up into this wonderful wonderful shape and i guess i can just select everything and select the shape delete delete everything so i'm deleting the points and the curves right to to not have any trash around and i'm left with with this single poly surface so this single poly surface right here is basically if you if you didn't manage to join it up there might be gaps in between but basically all you need to do is just select all of your surfaces and just type in join um join command and it's going to join it up so this is like the top of my panel like this poly surface right here is the top of my panel and i will just duplicate border dupe select it type in dupe border to create this kind of a [Music] yeah a border [Laughter] right uh around it and then create a rectangle at the base of your um of your styrofoam block like that so i just created a rectangle here and now i'm going to loft between the border and the rectangle in the bottom loft enter enter enter and then i don't need them anymore so i'll just delete them right so now i have the top and i have the sides right so i'll just join up the top of the sides join and i'll cap i'll cap the form so to fill it in to basically give it the base uh the bottom surface right so i just select it and type in cap there it is now it's done right now we have ourselves uh an element a panel right so what's nice about this about this panel um as i was modeling as i was thinking about it it's basically if i were to so i'm just holding the alt key to copy it to the side and if i were to let me let's make one two three three by copy from here to here so i'm using the copy tool um from here to here yeah something like that so what's nice about this panel is that it's continuous right so if i change this to arc arctic view you can actually see it better right it is somewhat continuous but the real nice thing is if i were to select one of these elements let me grab the one in the middle right here and i were to click on this set rotation the arc tool around the z-axis not the arc tool sorry just the arc that shows you the rotation option for rotation i click on it and i type in 90 degrees right so i'm basically just rotating the panel 90 degrees around its center point you can see that it's still connecting perfectly with the remaining panels right so coming back to the arctic view now we have like a wavy line that just turns and i can kind of play around with this quite a bit so if i were to rotate this one like that we get this and yeah you can see you can you can start creating oops that's my bad you can start creating any kind of a cool pattern that that you want i think it's just nice uh a nice aesthetic a nice aesthetic to have come on just just rotate 90 degrees please there we go so that's what we're aiming for but we're aiming for creating this simulated as if it was carved out from styrofoam right so as you're carving out things they are going to have like the surface irregularities and they're going to look cooler than what this is because this is like a perfect mathematical you know surface so this is boring let's get rid of it instead let's actually simulate carving so remember where i when i said that in layers i'm going to keep the block layer in place so now we kind of unhide that layer we take our element and i'm going to copy this element right here uh onto inside of the block so that it fits inside of the block right just like that and i'm going to hide the block again and this time around i want to make sure that i only keep the parts that will be required for the element to be for the carving to be successful now that's that's a crappy way of explaining it let me try again so i am going to delete from this one since this is going to be used as a input into grasshopper for carving simulation i'm going to delete all unnecessary surfaces that are not going to be carved by the tool right for instance the back surface right here that's definitely it has no influence over you know what the tool if if we just disregard it and just keep the top surface the tool is going to still carve out 100 of what needs to be carved out right because this surface and the surface of the block is in line in the same plane right so i'm just deleting that um i shouldn't do that no never mind so uh what i'm going to do is just explode select the element type in explode and select and then select surface by surface and delete it so we delete the bottom we delete the sides right because heights also don't matter because the block already has the sides flush right and what we're left with is these four surfaces here so it's a long way of me saying that you just need the top surface right so we just select the four surfaces join them back up again and we have our carving carving geometry that is kind of stuck inside of the block so now on to the nice part first of all save your geometries so file save as desktop whatever tutorial one hit save hits it that sweet save button and now we are going to start doing cool stuff with uh grasshopper actually simulating it this is what's actually going to be fun so i have here you can run grasshopper i should start from from the scratch sorry you can run grasshopper by just typing in grasshopper in the command line and hitting enter it's going to start up right and what i have here is basically uh the script that i already tested out and you know made sure that it works before i start recording the video that's going to be my notepad my notebook okay so since grasshopper is loaded up for you uh let's begin first thing is the logic right we are using this knife right here right this knife is not a carving tool it's a cutting tool it doesn't carve it cuts that's a very big distinction to make because with a carving tool you can say that one pass as the tool goes through the material as it moves through the material it removes stuff right it carves out stuff when you have a knife as it moves through material it cuts but it doesn't necessarily remove for it to actually remove for you to make sure that it carves you need to make two cuts right look at me uh do i have a bigger yeah there we go so if if if you have a knife right and you're just cutting through the material right just cutting through the material like that it doesn't remove anything it just makes a cut right so to remove something you first you know a surface of there we go so there's your surface of styrofoam right first the knife comes in at an angle like so right and cuts so it goes down i can't cut through my fingers but you get what i mean right it cuts like so and then it cut comes in at another angle and cuts again right so what it basically does it makes this kind of v-shaped cut that acts as carving um so wait camera don't die please no come back so that's what we're going to do so we are going to first of all i really want that zero zero zero point for doing this so we are going to i'll minimize grasshopper for just a bit we are going to enable the preview of this block and also just make sure to unlock the the wires that you have here for your panel unlock so now you should be able to have every uh be able to select everything and just move it to the side anywhere right not too far away though but you know and anywhere to the side something like that should be fine um just because we like modeling in zero zero zero in this little grid right here is um everything's precise and everything's accurate and you can use really kind of simple things in grasshopper when you are anchoring yourself to zero zero zero okay back to back to actually modeling it out so um in top view uh i'll you don't need to do this i'll just explain it again you have the surface right and you this is like a section a section of the block right bam your knife comes in like so makes a cut and then the same knife comes in from a different angle like so and makes a cut right so two cuts two cuts are made so it's basically a v shape right and if i were to [Music] and and the question is how do we specify how how do we create like a negative space that the knife will make as it's doing the two passes of cutting right so my thoughts are if we in perspective view if we just draw out a single line right just a single line nothing nothing more so uh just use the polyline tool start drawing from zero so you start using the polyline tool you hit zero hit enter starts drawing from zero make sure that orthographic snapping is turned on so f8 make sure that that is turned on and let's try and anchor it to the x-axis so the red one so you go along the red axis and we just type in the length of the knife that we will use so the length of the knife that we will use is 120 millimeters 120 hit enter hit enter again hit enter again there we go keep hitting enter until it stops asking questions right so that is your knife and i'm going to do actually we want this to be vertical not horizontal so i'm going to do a little a little bit of rotating just select your curve rotate it minus 90 degrees around the y-axis like that and just m select it hit m for move select the bottom point and then type in zero and hit enter so it basically you just select it uh you say that you're gonna move from the bottom and then you once you type in zero and hit enter it just moves to the zero zero zero again right so this is our blade right or at least the length of our blade so as the robot is going to take the blade and it's going to push it into or use it to cut the the geometry the question is uh what kind of motion does it do right um again let me turn on there we go so does the robot as it's uh wait [Music] as it's using the blade right so imagine my where where is it there we go so imagine my arm is the uh is it is the robot as it's using the blade is it coming in like that that did you know like super rectangular or is it coming in um like a arc curved right or or is it coming in like all shaky wavy and so on right so there's like two um two degrees of attack so to say like degree or two angles of attack angle one is having like the one cut being like so and another cut being being like so right and the second one is as those two v-shaped cuts are happening what's the path of the cut i should put down the the knife um so what's uh how is the path shaped so let me come back here there we go so the path that i'm that i'm talking about is basically let's see this is the position of the knife when it's touching the the what it actually needs to touch right on the surface on on the cutting surface but what's the position of the knife uh when it starts cutting so it's going to be i'll just hold the alt key and copy it to the side and then copy not copy but move it up something like that right so it's going to be something a little bit more like that so first the the knife starts here and then it moves down it makes you know until it reaches the actual point that needs to be cut and then it needs to move up again right so i will probably first let me clean it up with moving actually moving down so i'm thinking maybe we can do maybe we can rotate this around the x-axis by 15 15 degrees like that yeah something like this should be fine and then mirror it so i'm selecting the the curve here and i'm going to mirror it from the 0 0 0 point around along the x axis to the other side right so i have this curve this curve and this curve and basically basically the logic is this is the position of the knife before it makes the cut this is the position of the knife during the cut and this is the position of the knife after it makes the cut and as you can see everything is in a perfect straight line that is fine right and and we want the two cuts right the v shape that is fine we're going to do the v shape with grasshopper rather than rhino in this case this is all we need and i think do we need like one more curve i wonder just a second that's a loft that's boring that's okay we don't we don't need one more curve okay so that this is all that we need time for grasshopper i guess uh i i promise this will make more sense once we actually see it visually right we're all architects we think visually rather than vocally vocally yeah you get what i mean okay so before we begin with grasshopper i need you to install two plugins and those plugins are called uh is it two copper fish yeah i need you to install two plugins i'll show you how don't worry so those two plugins are called pufferfish [Music] double click buffer fish and the second one is called dendro there we go so how do you install plugins two ways first way number one in rhino you type in package manager and here you type in what kind of plugin you need buffer fish [Music] right and twins yeah it looks fine but i wonder looks like this looks and you just click install right and it should work um another one is the dendro let me just check if dendro is there okay great well not great but dendro is not here so i do need to show you the manual way of doing it right so first things first your grasshopper has this file special folders components folder it has this components folder that you open up and basically in that components folder you can see there's a lot of files for me there might not be a lot of files for you this is where all of your add-ons for grasshopper live where they are right so any add-on that you install needs to be copied into this folder right again file special folders components folder and how do you get those add-ons well glad you asked if you just type in a food for four with a number rhino.com foodforrino.com you can see pufferfish is right here or you can just search for it buffer fish come on there we go there's the puffer fish you open it up you scroll down and you just download pufferfish version 3.0 it asks you to log in and just a second the registration is free of course [Music] and they don't send you any spam [Music] come on there we go uh they they don't send you any spam so just create an account and download your pufferfish for instance right it downloads the zip file uh showing folder this zip file right here i will extract it to pufferfish 3.0 right just make sure that you extract it right you open it up open up the folder and here you can see a few files here and there right sometimes you see dlls but the main ones that you need are dll files and the green one the pufferfish one right so you right clock right click on it important step by the way if you right click on it go to properties and make sure that uh here it doesn't say unblock if it says unblock just click on the unblock button hit apply hit ok and then just take it copy it or or cut it and paste it into your file special folders components folder you paste it in here you restart grasshopper restart rhino and it should be there you should have bufferfish plugin running same thing with dendro right download it and it should work okay once you have them let's begin first things first i need to reference in my geometry so i will take this box here that that i have right this is like the main chunk the main styrofoam block and i'll reference it in as a b rep b um wait why vocals it's gonna be easier for you to see so i create a b-rep component i right-click on it set one b-rep select the box it gets referenced once it gets referenced i select the box in rhino and hide it because it's in the way now i'm going to create another b-rep okay i'm gonna do this a little bit quicker set one beer up and set the inner surface the the surface that we're all actually going to try and approximate by you know simulating the cutting once that is done i hide it again and now these three curves these are just curves so i'm just creating a curve component the black hexagon one set multiple curves and this it's important to set it up properly right so you don't want this the middle one to be the first curve on which you click as you're referencing them in so you just go let's see from left to right first one second one third one right start of the cut end of the cut enter you have them referenced okay we have it going first thing that we are going to do is actually creating like working with the curves to create a reference point not a reference point that's that's a bad bad example um right let's say a negative space yeah we're going to create a negative space that a carving tool or or in this case a double cutting tool will generate right so we're basically going to use if you know what boolean difference is right if you have a block you have another block and you have those two blocks intersecting and there is like boolean difference from this block enter with this block enter delete that you can see you know the negative space that was created this is the cutter right the negative space with which you carve out so we are going to do a negative space that the tool makes right um these three curves i will i will i will i will rotate them [Music] rotate them rotate an object in a plane do i want to know i want to use rotate 3d rotate 3d so these three curves are rotated in 3d right the angle the rotation angle is actually it shouldn't be in radians you can see as i hover my mouse it says that it's in radians i want it to be in degrees right so i right click on it and choose degrees so now the angle is in degrees and here i can specify for now let's do 15 degrees right so i'm just double clicking on the canvas and typing in 15 to create a slider connect that to the angle and now i can see that you know as i'm moving that as i'm moving the slider it rotates but it rotates you know in a weird way that's fine we are going to fix it center point of rotation okay so each of these curves each of these curves will need a separate center point of rotation because basically i want what i want to happen is i can actually show you here uh manually you don't need to follow this just look right if i have this curve right here rotate 3d so i'm using rotate 3d i'm using this uh i'm rotating around this axis copy yes 15 degrees right something like that then i'm gonna rotate this one or actually i can rotate both of these around this axis 15 degrees as well and then i'm going to select these three curves i'm going to loft them like that i'm going to mirror this to the opposite side like that join it up so that we have we have ourselves a much more call it like a like a loft type of a type of a thing and then you basically just cap the ends and you fill in the top and it's it's done right easy easy peasy or you can even go uh even easier by just lofting in the v shapes closed off v shapes like triangles but that's that's the basic principle and thus we create the negative space right so we need to rotate these around their bottom points right so these curves and let me just see my notes we have lofted it first for some reason that is super weird i shouldn't have done that okay we are not doing that that that was my bad so we are taking these curves and we are getting their end points and endpoints are you can get endpoints by using and points tool uh where and and basically just connect your curve to the endpoints tool and it gives you the start and the end and you care about the end so you just create a point component point connect the end to the point disable the preview of everything except the point component so in this case the end points and as you can see the yeah as you can see the end points uh are wrong right i i only get the top points i want them to be in the bottom how do you fix that very easy you select the curves where the points are not in the correct position so in my case it's all of them you select all three of them and type in flip in rhino flip them around there you go now they're in the bottom right you just kind of flip flip them around so now we have the end points right here and i think we can do yeah so we use those endpoints as the center right why the hell are is it doing that do we care we don't care no we don't care never mind um so now it's being rotated but it's being rotated in a weird in a super weird way because while the center right now is is correct the axis is not the axis like the axis around which we rotate is not correct we need to fix it and in my case the axis around which we rotate is the y-axis right the green one in your case uh it might be the red one just make sure that you know it's the axis around which the lines are aligned uh so i'm just going to say y unit y that's the a vector basically connect that to the axis and now it works right so now i can use the slider to open open up so basically that v shape i can open or close it with the slider the problem is that it opens only to the only to one side i need to have it on the other side as well so i'm just going to mirror it mirror mirror an object sure geometry output these three lines are going to be mirrored and the mirror plane just works i guess i i mean i should probably to stay pedagogical i should say what kind of mirror plane it is so in my case it's uh why is that no yes it is why is that mirror plane in your case in your case it might be xz right but we are using in this tutorial we're using why set plane right for mirroring so just kind of mirrors it to the other side now on to the weird stuff i am going to um join up these v shaped curves that we have so one side of the curves is here is this output and the other side of the curves is this output i'm going to join them up i'll use merge to just merge them together and all this does it just places uh everything into one list right so here we have six lines in total right one two three four five six right while here we have three lines and here we have three lines so we just kind of placed everything into one list and now we can join use join curves to join curves that actually can be joined if that makes sense so i think after joining curves we will have yeah we have three polyline curves sweet now what we need to do is just make them closed make sure that they are closed so i can do that by a closed curve is that something that we can use that is a part of a puffer fish plugin so we can use that if if you don't have closed curve and you don't want to get the pufferfish pufferfish plugin you can always get the end points [Music] come on and points of these curves create a line align segment between these endpoints right and then merge again and join again like that right and thus thus you get like three triangles or with closed curve all you need to do is do is just connect c to c input here and you get the closed curve so it basically does this right only with one node i guess i'll i'll leave it uh i'll use this one might as well keep keeping it you know vanilla keeping it simple okay so now we have the joint curves i will lock them loft bam that's all you need to do just loft right that is done and now i will cap the ends cap holes bam that's that i basically i'm i'm just selecting everything that except for the cap literally everything except for the cap and i'm disabling preview like i'm just selecting clicking the scroll wheel and clicking on this blindfolded guy icon right so that things are not in the way so now with this thing done i can perfectly control uh the negative uh come on i can control the negative space that that the knife is like two passes of a knife are going to make a line to object wait uh just sorry about that so basically here i can just let's say one centimeter wider here one centimeter wider here let's see the the attack angle is very sharp while the you know it starts cutting really sharply and then the fall off is quite quite long like that maybe the angle here you know the negative angle here is a little bit too narrow i can make it wider like this or i can make it super narrow well not that is super narrow but not not like that something like that right absolutely up to you whatever you want to do so here we have full control uh over our cutting tool and i'm sure going to just group it and you know say that this is done okay next part actually the interesting part is we need to grab this and not this but grab this tool and place it on top of eh of this surface right here right so question is where where do you place it well i am going to just create a random a bunch of random points on the surface populate 3d no sorry popular geometry not properly 3d properly geometry do that connect b rep to geometry input like that and it just creates a bunch of points right and then for the count right now it's using 100 points i'm just going to use uh 101 [Music] the reason why i'm using 101 is because then it gives me a slider that can go between zero and a thousand right um so let's just do for now i'm just gonna do like 50 so that you visually can see what's going on right so 50 points randomly populated other two inputs not important don't care about those those points will need to have alignment information as well not just um you know they they shouldn't be just location information but they also should be alignment information in this case i'm going to keep it simple and i'm just going to use x y planes that i'll place here so everything is flat right so the the alignment is always kind of perfectly vertical like the z direction is always going perfectly up but in terms of like i do want to have a little bit of play here we're going to do that later i'm going to show you how to make it nice but that's going to be a little bit later so for now these planes are fine and we have ourselves a bunch of sorry not a bunch of but we have ourselves this cutting geometry here i want to take it and i want to place it on each of these planes how do we do that we use orient orient uh is it orient or orient an object yes it is orient so it asks me for three things first one is geometry that we're going to orient that is going to be our b-rep but i'm going to do one more thing with it so don't connect it just yet and then there's going to be which plane are we orienting from and which plane are we orienting to so we are going to be orienting from the world oh this is bad i need to actually fix this this goes too much in this is better the attack angle was was too drastic so it went and the loft went in sorry about that um so we are going to orient from the world x y plane to all of these planes right here um by default initial plane is set to world x y and the target plane or final plane are these well it also sex x y plane i i guess that's says it also says xy plane i guess uh it's a little bit weird but uh these are all of these planes right here right so that's our target now for the geometry one last thing that i want to do with the geometry before we actually move it over is to convert it into a mesh the reason why i'm doing that is because meshes are much faster to calculate and it's not going to crash your computers that's that's the only reason i'm going to use mesh b-rep component mesh b-rep just like that and it already looks kind of good you can see the the wires here by the way if you don't see the wires go to display preview mesh edges turn that on and then you will see the wires so the density of the mesh is good but i think we can do better so i'm going to uh for settings i'm going to create custom settings that is not that custom settings or settings in brackets custom connected like so and then for let's go for maximum edge i'm going to say maximum edge should be like five millimeters yeah there we go this is much cleaner you know i like seeing grids where wherever i'm working with meshes so we have ourselves a mesh right here i am going to take this mesh and i'm going to plug it into the orient tool into the geometry and put up the orient tool like so bam a crap ton of meshes yay well not the crapton it's actually only uh 50. we will need more we will need more but even with 50 this is uh um you can see that it it it becomes a little bit dense a little bit dense okay so now actually i'm going to investigate here a little bit if if i'm not and there is the speed component there okay sure so here i am going to um take all of these meshes and i'm going to join them up into one shape one block right so i'm just going to use mesh join mesh join and connect it sometimes this mesh joint component and actually this is super heavy let's tell you what let's get rid of this custom settings shenanigans and just do speed settings speed yeah that's better that's better so this will just make the mesh a little bit more lightweight so back here sometimes this mesh join component will create an invalid mesh even this even mesh b-rep even this geometry sometimes becomes invalid and the tool that fixes that is called uh rebuild mesh and we are going to use that tool later but if you already see um an error pop up uh just make sure that just keep in mind rebuild mesh is your friend and you want to um how is it called rebuild mesh you want to connect your mesh in here and you want to make sure that call unused is turned toggle that is turned true like that and then you just use the rebuilt mesh as your uh orientation mesh okay that's that uh just a small small little note moving on moving on we have a bunch of cutters right we need to cut away from something and that is going to be our b rep right so technically you could use boolean difference or mesh boolean difference to carve out but it will make mistakes it it is going to break it's going to be super heavy it's not going to work trust me so instead we will be using dendro dendro is a voxel based plugin a voxel geometry based plugin which means that it deals with um i will not go into voxels too much and i'm i can't find it there we go i will not go into voxels too much but it's basically a very good way of how to manage complexity in terms of addition and subtraction of geometries with one geometry from another um drawback of it is insane density in terms of meshes the meshes that you get have insane density and also it's it's quite computationally intensive to do but we will talk about dendro a little bit later a little bit more for now that's all you need to know so we've done dendro the workflow is always the same and i'm going to first convert this mesh into a voxelized mesh by using dendrone so convert in dendro you use convert and you will convert mesh to volume like that asks you for two inputs first one is the mesh you have the mesh you just connect it like that and i'll just hide the the preview of the original one and then the next one is the settings right so con again convert create settings here under create settings the only setting that you really care about at this stage is the size the size of the voxels so basically if you know minecraft you know what the voxel is right chunks chunks of space so this is how big a chunk of space is in my case it's one millimeter one by one by one millimeter that's a little bit too small it's gonna be laggy if i do it that precise so i'll start by doing five millimeters so half a centimeter precision and i'm just going to uh create a slider connected to the size input and for the settings i'm gonna connect those to my settings input to mesh to volume and bam it just just works creates a volume and now i'm going to convert that volume back into a mesh to show what's up so i'm going to go to convert volume to mesh place it there volume connects to volume and for settings i'm going to use of course the same ones like that and now you can see well you can't let me do custom preview [Music] is this a little bit better yeah this is a little bit better now you can see that everything is joined into one shape but it's all super blobby and super weird that's the power of voxels it creates a single closed mesh all the time like every time but it is going to cost you in terms of resolution if i were to reduce the voxel size by half or more more by more than half to two millimeters first of all it breaks but you can see that the density increases so it breaks um and here it says invalid mesh right so this is where we actually use that rebuild mesh tool i'm going to copy paste it connect volume mesh output to the mesh input here and connect it to the custom preview input here and now it just fixes it for us and now we can see this is much more precise right i can go even lower let me show you with one millimeter it's gonna take a little bit of i actually it's not that bad one millimeter this is how it looks pretty damn close right pretty damn close okay so this is us approximating our cutting geometry with voxels i'll go back to five millimeters just because i don't want to wait that long every time i change something also the sun has there we go now i'm going to take the box here remember when we referenced in that box grab it drag it over here so somewhere close by i'm going to take that box and i'm going to create a volume from that box so first thing is i need this to become a mesh right or do i maybe i don't let's try mesh to volume let's just see if this is going to work mesh to volume like that so box connects to mesh to volume and then settings connects to settings of course i'm just reusing the same settings for everything seems like it works yeah yeah nice okay so you don't need to really do anything with it you just trade up take the b wrap connect it to mesh to volume like that and then uh you could convert it volume to mesh blah blah but we don't really care what we care about is carving out this box right with um these shapes right here uh you can't see them these shapes right here right so we need to remove from this with this how do we do that well in dendro under intersect there is volume difference we are using that volume difference from the box we remove the cutters and the resulting volume is the one that we're going to be using and and converting back into a mesh let's hide literally everything and for rebuild mesh output let's create a custom preview custom preview with a swatch color swatch that is not white because white is way too bright let me do blue oh that's uh that's a very ugly blue yeah that's fine that's good enough yeah actually no bear with me for a second yeah that's that's a nice blue okay so this is basically the the mesh that's being carved out doesn't look like much now does it but but if we reduce the voxel size to two millimeters i will not do one let's say two millimeters now it actually starts looking like a like like an actual thing right like uh something that is being carved out okay back to five millimeters let's see if we can make it better i am going to change the angle of our cutter remember the angle you know how wide it opens up the angle of attack i'm going to change that to 15 degrees so it's wider it cuts more right and also wherever it says the properly geometry count that's how many times we are carving i'm going to change that to 200. what is this is this is this a form that looks like this form could it be right so we have successfully made it so that uh it approximates the the geometry keep in mind that this these 200 cuts are actually 400 cuts for the robot to make because it needs to go twice right to make a single cut so this would take a very long time a very long time to do indeed but you know maybe maybe maybe it's worth it i don't know we will see i'll increase this though a little bit more let's go for uh 25 millimeters yeah something like that i think that that will look just fine and here i'm going to uh for voxel size i'm going to use two millimeters give it a give it some time now there we go two millimeters you can really start seeing the pattern emerge yay okay back to five millimeters let's do some adjustments last last thing that i want to show you is changing the xy plane and then we're gonna we need to make it pretty of course we do so we're gonna make it pretty first thing x y plane um rotation so i'm going to introduce rotation remember where we used x y planes to orient the cutters right i am going to see what happens if i rotate these planes rotate plane rotate plane like that angle right click we are not nerds we are not using radians we are using degrees degrees like normal people yes so we change this to degrees and we will do double click on the canvas type in minus minus 90 dot dot 90. this will create a slider between -90 and 90. hit enter connect it to the angle like that and now you have a slider with which you can rotate the planes let me zoom in show you come on we rotate them spin spinny spinny spinny okay and then we take the rotate plane output and connect it to the b input right here bam okay so now we're doing that and by just rotating the planes we're basically rotating the cutting angle you know the angle at which the robot cuts so i can do something like i can double click on this on this and i can see minus 45 degrees so that the cutting angle is in line with this line right here with this ridge right here which should make it so voxel size 2 which should make it so that actually it looks pretty sweet looks pretty nice it's a little bit calmer actually it's not that calm is it i'm just changing i've i've just changed it to arctic view so this is at 45 degrees or negative 45 and if we do positive 45 it's going to be come on do it there we go it's going to be like that now you can really see the the ridges right because it this is like the most inconvenient angle for it to use for for cutting but that's what we want so well what we might want so i am going to show you a thing let's do those negative 45 jesus my my camera starts lagging when i when i'm doing these things sometimes grasshopper disappears by the way it doesn't matter let's do -45 let's take our mesh geometry right here bake it out to the default layer hit okay and this is like every two millimeters right yeah it's every two millimeters so it's not going to be that nice uh for the final output i would use one millimeter but this is what we get you will probably see something closer to this but it's the same thing right so these are just mesh wires uh so this is what we get and let's just see if i now copy this 300 300 to the side uh come on 300 300 300 yeah yeah yeah there we go change this to arctic view this is how it looks like right kind of nice dragon skin kind of a dragon skin effect i like it i think it's it's aesthetically pleasing but the problem with it is that whenever i do the rotating thing [Music] the pattern stops matching up it's not nice anymore right so we need to fix that the way we will fix that is quite actually quite easy i'm just going to i am just going to take i'm just going to bake out probably yeah we bake out this version this variation just place it there and i am going to change the angle to 45 degrees from negative 45 right so that it attacks it from from a different angle and i am going to bake it out again default yeah sure whatever layer come on give me there we go and now and now we should be able to play around with these two to make it to make it nice right because basically now um the the angle of attack is not correct for these but if i rotate this one then it is correct right so now i can play start playing uh start playing a game where i will just create a bounding box for this one the bounding box for this one for now i'm just gonna place them in in in boxes so that it's easier for me to copy them around or rather it's easier for me to align them and now i can do 600 mil like that let's do 300 300 here 300 here so see this is this is a line now i'm just gonna repeat this oops my bad 900 i wonder if i can do 90 degree no i can't do 90 degrees i can only do 180 of rotation like that and we get ourselves a little bit of a pattern i think that's cool i mean come on it's it's pretty cool isn't it um so that is yeah that that's that's basically it right that's that's our our little approach so now the task is for every group member to do one of these to test out the script to see what happens right with different geometries with different variations um the things that you shouldn't change are the you know the the cutting length and and so on you shouldn't mess around with that too much just keep in mind that you know robot holding knife cuts away uh your cards away your element in two passes right for each carve um the b-wrap which is carving yeah free-for-all do whatever you want you can even kind of carve through and make holes in it anything right just play around test it out uh anything besides that no nothing more that's it that's that's the whole definition so i really hope you're gonna have fun with this one i'll see you i'll see you when i see you i guess bye [Music]
Info
Channel: Gediminas Kirdeikis
Views: 1,855
Rating: 4.9157896 out of 5
Keywords: kuka, abb, robotic wire cutting, wirecutting, rhino, tutorial, grasshopper, gh, robot, lecture, free, hot, knife
Id: X5_afHsp3IM
Channel Id: undefined
Length: 73min 46sec (4426 seconds)
Published: Wed Sep 08 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.