FreeCAD Assembly4 and animation the easy way

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] in this video we're going to look at how to use assembly 4 and we're going to use it in a scenario of having some parts that we want to put into an assembly so we're not going to do all the modeling in assembly 4 we're going to do the modeling in part design and then i'm going to show you how to take parts take the parts out of those files and put those into an assembly for model and create something with a little bit of animation in it too of course there are other ways to do this otherwise to get to the same end result this works for me i'm hoping it'll work for you and i'm hoping by showing you something simple to help you to understand how it works then you can go ahead and make some great creations of your own but first if you'll do me a favor looks like 80 percent of the people who are watching are not subscribed and i would really appreciate it if you would subscribe click the like button and hit the notification bell so you can watch other great videos like this so to start with i'm going to assume that we made some parts just regular parts in part design and then wanted to assemble them afterwards so that's my mode that i'm working in so i'm just going to create a standard part yes we're okay with that create on the xy plane i'm just going to create a circle and i'm going to constrain that circle because i want to give it a dimension so i know how big it is i'm going to make it 30 millimeters in size close that i'm going to pad that guy to 75 say okay put me in the middle so we can see it there it is and then i just want to do a second sketch just for grins and giggles i am going to do a second circle and hit that guy there remember so we can see our drawing this is the uh allows you to look through a sectional view of the part so you can actually see the drawing on the surface you'll probably remember that from other videos and then i'm just going to give that dimension i'm going to call that 25 just because and i'm going to say close and then i'm going to pocket that one and i'm going to pocket it 65 deep i think and needs to be reversed so it makes a pocket and there you have it so now i've got a tube and a hole in it say okay and that hole doesn't go the whole way through one important point when you're creating this is to have unique names because it gets very confusing when you start putting everything together so i'm gonna call this uh rod body and i'm gonna call this rod pocket i'm going to call that sketch rod sketch one i'm gonna call this pad rod pad i'm gonna call this sketch rod sketch zero okay so i'm just giving everything some unique names i'm gonna save that everything is saved and we're finished with that part for the moment then what i want to do is i'm going to create a new part a new model in fact what i'm going to do is i'm going to close this model so you can see i'm going to create a new model i'm going to call this one master sketch and again i'm going to create on the xy plane say okay let's just create a square or rectangle i should say we're going to constrain that quickly and then what we're going to do is we're going to give that a couple of dimensions and these dimensions are not super important to be honest with you almost dimension that the wrong way i'll make that round number just say 75 and we'll create that one and make it 200 just so that round number and then we want to put some circles in here so i'm going to go with that circle and another circle and if you notice i'm making them highlight in this line because i want it to be attached to that line so that's basically what i'm doing then i'm going to select all of these circles they're all going to be the same size and i want this one this one around that center line to be symmetrical then i want this to be 35 doesn't really matter because this is just a sketch we're not using these parts but we are going to create another part that looks like this so i think it's a good idea to to create how you'd like it and then we're just going to dimension this guy from here to here and we'll call that 50. and that gives us a nice constrained sketch to get started with so i'm going to close that sketch and i'm going to put that sketch in the middle so we can see where it is and then what i'm going to do in this master sketch is i'm going to put some local coordinate systems in that we can locate things now again i'm using this mode because i want to show you how to do it this is not necessarily the most complex assembly as i could do it without the master sketch but i want to show you that technique so that when you're putting things together you can create your own master sketch and you can put things together around that sketch for the local coordinate system then i have to go into assembly 4 and i select the body that has the sketch in it and i select this create new lcs i'm going to create these as circle left and that's going to be this one here and as you can see i have a bunch of options that i can select i want it to be concentric around that circle and just because as you know with a with a local coordinate system the blue one is the z or the z-axis the green one is is the y-axis and the red one is the x-axis i like to have my y-axis going that way and my x-axis going across it's up to you how you want to do it as long as you remember how you've done it everything should be good so what i'm going to do is i'm going to move this axis around the z-axis i'm going to rotate it 90 degrees and i'll put this red part along the x-axis so let's do that so now i have the red the x going this way the y going this way and the z going that way so i'm quite happy with that i'm gonna apply that say okay and whenever these uh check marks come up that means you need to recompute so if you just hit this refresh button up here it recomputes everything and you're good to go again so we're going to do select that body again i'm going to add the next one we're going to call this one circle center so guess what we're going to do here we're going to hit okay we're going to select that guy and we're going to rotate the concentric one rotate it 90 degrees and we're going to say okay to that so now you can see i have a left center and of course you can guess we're going to now put in the right one so same thing i'm going to say circle right and the names are just so that we can keep this all organized so that when we look at what we're adding to when we're adding a part and we want to add a it to an lcs a local coordinate system we can see which one's a which if we just call them one two three we're going to get lost very quickly okay and all of my lcs is the same way the z is in the same direction the x is in the same direction the y is in the same direction everything looks good there so i'm quite happy with that i'm going to recompute i'm going to change this body's name i'm going to rename it to master sketch body you can call it whatever you want but i'm calling it that so that i can keep track of it and then i'm just gonna save that okay and i will close that now i'm gonna go back into part design i'm going to design my other piece that i want to assemble so the other piece is going to look just like that sketch that i just did but i'm going to model it as a a so we're going to call this one main body again on the xy plane zoom out a bit and we're gonna build that guy there's my favorite things where i can switch that back up i always do that i end up twisting this thing when i'm doing a sketch i always use this button just to strain it back up again honestly that's a lifesaver for me because i i do it continually so this is going to be just a sketch of or a model of a body that we can run those cylinders up and down in so i'm going to do something very similar to what we just had i might put some uh chamfers on it and things that i don't have on the sketch so let's have a look here and we want to do three circles so we're gonna go into the middle one here as i make that that line go yellow and it attaches it to the line and we're gonna have the same constraints so we're gonna call that 200 it doesn't have to be the same it can this can be any size because i'm going to link it to the assembly on the center part so that's all we're going to need for this guy and this one we'll do 75 as well and then i want to say this one this one and this one if you miss the line it unselects everything so you can't miss the line so equals and then sometimes i get these two confused now call me old-fashioned but that and that look very very similar so we'll go with that and we're going to make it big enough so we know the the rod was um 30 so we're going to make this 40 and give us a clearance so we can see it moving and then the other thing we need to do is take that one and that one and make them symmetrical around that center and then one more dimension and we should be good to go if you remember this dimension was 50. and there we have it so i'm going to close that and i'm going to pad that i'm going to pad it our rods were 50 tall so i'm going to pad this 45 so be able to see it in there and there it is and i'm just gonna i'm actually just going to run a chamfer around the edge here three we're gonna add some other edges that edge that edge i guess we could do these edges too get all those hedges in there we go and now i'm going to save that now i want to do is to go into assembly 4 so i'm in assembly 4 and i need to add an lcs to this part so again i'll select the body and while we're at it i'm going to rename that to main body i'm gonna select that body i'm gonna add an lcs i'm gonna call this main body lcs i'm going to select that circle i'm going to tell it it's concentric so now i have this in the middle and again i want my i want my x direction to go that way so i'm going to rotate around the z axis the blue axis 90 degrees and there i have it the same now if i want this to sit lower down i could offset this lcs so you can offset in a direction so i could say my z direction drops down but for what i'm doing here that's fine where it is i'm going to leave it there but i could move it up and down left and right whatever i wanted to do from an attachment point of view in this screen okay so i've added that one so i'm going to save that i can't emphasize how much it is important to save files as you go with these assemblies because you will otherwise you'll find yourself in trouble so i'm just going to open the rod again now i'm going to add an lcs to this guy so an assembly four i'm gonna pick my rod body and i'm gonna add an lcs i'm gonna call this rod lcs say okay pick that circle until it's concentric and i'm going to rotate that one i don't really need to rotate because it's circular but i'm going to rotate it just just for completeness and then say okay so now everything has an lcs in it and i'm going to close everything there save everything it's all closed all saved everything has an lcs in now we need to create our assembly so what we're going to do is we're going to create a new file and then we're going to create a model and this model also has this parts folder in it because i created this it's a new assembly model so when i create it has a parts folder and it has the actual model itself the model is empty at the moment other than the lcs and the parts folder is empty now i'm going to save this i'm going to save it as assembly file you call it whatever you want to call it now when you're doing a an assembly you want to assemble your parts or bring your parts together in this parts folder and then you use this um insert a link to a part you insert from here into the model so you can create the model in assembly four go ahead and create a new new part you create a new body create a sketch model it all there but in the mode that i'm showing you i'm assuming you've already made these parts somewhere else and you've decided now that you want to bring them together so that's what i'm looking to do and that's what i'm going to show you how to do this it's how i do it because i don't always know if i'm going to put it in assembly right away i sometimes uh do sometimes i don't it just depends so we're going to assume that those models that i made were made previously and not necessarily um going to be in an in an assembly but i want to put them in an assembly now i will try and keep this as clear as i can because i will admit it confused me when i first tried to do it but now i've done it a few times it seems to be fairly straightforward so what i want to do is i want to open up the models that have all the pieces in it so i'm going to open up my rod file i'm going to open up my main body file and i'm going to open up my master sketch file now what i want to be able to do is in my assembly file is access these i have the option to create links but i don't want to create links because i think that makes it more confusing so what i'm going to do is i'm actually going to take the bodies out of these and i'm going to put them into my assembly and the reason for that is i want to be able to access everything from just the assembly so right now these three are complete as far as i'm concerned we're not going to modify them again in these files so all we're going to do with them is we're going to use them to put in this part so the way we do that is we take the body we just left click on it and drop it onto the the file not in the model or the part but on the file itself we're just dropping it there and then we'll take and actually once i've done that so i've done that one if you look inside the body's gone so i want to close this and i don't want to save it make sure you don't save it at this point because it won't have a body in it so it's gone so i'm going to discard that then i'm going to take the body my main body i'm going to do the same thing i'm dropping it into the assembly file so now i have both of those in the assembly file going to close that file close document discard whatever you do don't hit save or you're gonna lose all the information in it and then take this body i'm gonna drop that one in and go back to this guy and close document discard okay so now those other documents are no longer important to us because those other documents are not going to be linked to this so if we want to make any changes we're going to make them here inside the assembly all of our parts and if you look inside these bodies all the sketches the pads pockets they're all in there so we have everything we need all the lcs everything is all there so this is the bit that that i found confusing to start with but now i sort of i feel like i understand it anyway i'm sure there'll be people who come in with better ways of doing it but this is a way that works this is the way i do it and this works for me so i'm hoping it'll work for you so i take these bodies and i put them in my parts library if you like that that folder is my parts library so i'm going to take them all and just drop them in that parts library so now if i open that you'll see they're all inside the parts library so the parts library if you look at it this way is these are the pieces that you can use to drop into your assembly the model is what's actually in the assembly so although we can see everything in the same space here it's not an assembly yet and what we're going to do is we're going to assemble it around those lcs's so the first thing we're going to do is put the master sketch into the model we do that by hitting this link and we say master sketch body and we can leave that name that came up as master sketch body because there's only one of those so everything's good we're going to insert it and we're going to insert it with this circle center in the part assembly origin so these are the local coordinate systems remember we created the circle left the circle center and the circle right in the master sketch so i've picked the circle center and i'm putting it in the local coordinate system origin of the parent assembly that's the first thing in so i'm going to say okay and now if i turn off the master sketch body in my parts library i still have a master sketch in there because it's here in my assembly now so if i can if i turn off all of the everything that's in the parts is turned off the only thing we have now is the master sketch body inside the assembly so now i want to add a rod body i want to add three rod bodies actually so what i'm going to do is i'm going to say rod body and i'm going to insert this part and i'm going to call this rod body center insert it and i'm going to say the rod lcs so the rod body only has a rod lcs and i want to insert it into my master sketch in the circle center so now the center where i put the lcs on this rod is on that center there so we're going to do that say okay now you can see in my assembly i have my rod my rod is in there let me just there you can see the hole in the bottom of it so he's sitting nicely in my sketch then what i want to do is add another part which is going to be another rod body so i'm going to go link part rod body and i'm gonna cause rod body left and i'm gonna insert that now initially the the rod body's just gone into the the local coordinate system of the assembly so i'm gonna say rod body center it's going into my master sketch and it's going in left now you will notice that left is right and right is left that's because this is up the other way to the way we had it in the sketch so don't be confused by that as long as they're separate doesn't matter if they're called left and right as long as they're separate everything looks good so we'll say okay to that and then we're going to do the same thing again with another rod body this time we'll call it rod body right right g ht and we'll insert that and we're going to insert it by the rods lcs into the master sketch body on the right and we'll say okay now i have an assembly of this master sketch and these three rods and now what we want to do is to drop in our main body and drop that into the same assembly so we're going to do link i'm going to say the main body we can accept this because there's only one insert we're going to say the main body lcs and that's going to go into the sketches lcs in the center and we'll say okay and now we've assembled those rods into that body using that sketch and we know that everything is organized around these local coordinate systems so that is basically how you do an assembly it's that simple now we want to animate this a little bit so let me show you something about how these can move so if i go into the rod body center and i select the rod body center you can now see that it is positioned in our assembly and has an attachment and the attachment has a position and that position has x y and z coordinates so if we take the z coordinate and we say move that one 50 you can see that this is now moved 50. and so we can do the same thing for each of those rods so what we're going to do is we're going to create a variable that we can assign to this position and then we're going to change that variable so we can move these up and down so let's take a look at that so the first thing we want to do is assign a variable so we click on this plus button up here sign a variable and we're going to accept the default float we're going to call the variable transform and we're going to start with a value of 0. honestly none of that really matters as long as you have a name for it it really doesn't matter you can put a description here something that describes what this variable is all about but to be honest you're only going to use this one variable so it's not a big deal so we'll say okay to that now i can go into the z position this is the attachment position now there are two positions so there is the placement which also has a position we don't want to mess with that it's the attachment position the zed one we go in here up pops our little wiggly wiggly and to set a variable you say variables and then transform and we can say okay so now this z position is based around whatever that variable holds so if we go to this anime assembly these little gears plop that up our variable is transform and we can move uh we can move this up and down basically by changing this so so we have a range begin at zero range end at 100 and then we can shift that up and down so i can do it real time and i can run it to make it do its thing so very simple close that now i'm going to take rod body left and once again we're going in the attachment we're going in the position to the z or the z and we're going to say variables and we're going to say transform say ok so now if i use my gears and i say this begins at zero we can move both of them up and down is good but it's kind of odd that they're going both up and down so we don't want that to happen so we can take this one back into our variable and in front of it we can say negative and then we can say okay now if i do the movement you will see that one will go up and one will go down like that and then i'm just going to do the same thing for the right one variables and transform make it negative say okay and start off my animation and i'm going to start my animation at minus 100 and i'm going to go to plus 100 and i'm going to hit this pendulum pendulum makes it swing back and forth like a pendulum i'll say run and you can see it goes all the way through and we have linear movement if i just turn that a little bit this way if you try and rotate it while it's running sometimes it stops but i'll just have a look and see if i can do that well then let me that was a weird looking thing so now you can see the bottoms of them with the hole in it and you can see that the whole thing is moving up and down quite nicely and it's basically running up and down around this variable now one thing i will tell you is when you close that they're going to stay at wherever you left them so if you want to be roughly in the middle you just put them in the middle before you close it and then everything looks fine um can get rid of my sketch and turn my sketch off so finally just pop it up and down run on the pendulum just make sure you have a range that begins and ends at different places that way you can avoid any issues and stop that close to zero and then finally if you wanted to do if it was a rotational assembly that you wanted to do you would just do the same thing um except for where i have it in my position here my my variable set on my position x y and z you can do the same thing on your angle so what you would do is you would set the axis that's rotating so whichever one of these you make one is the axis it'll rotate on so if i have z as one it's going to rotate around z then i would set the variable to this angle and that would have it rotate now i could do that except for these guys around so you're not going to see them rotate one other thing to bear in mind with the animation is there are no there's no ability to set uh physics so you can't say that this will bump into this and then you should stop rotating so if i i made this a rotational piece it would just rotate right through these pieces it won't stop it so there is no physics in blender you can sell physics where you can say it can't rotate through another body that body is solid um and that would be a whole other engine to do that i doubt if blender is going to or if free cat's gonna get to where blender is so maybe in another video we'll take some exports from freecad and we'll put them into blender we'll animate them there and show you how those physics work as well if you're interested in that please leave a comment and i will be sure and put something together if you've enjoyed this video please hit the like button and if you haven't already done so please give us a subscribe uh we're just getting close to the 1000 subscriber mark and for those of you who don't know that's quite a big deal with youtube once you get to a thousand and four thousand watch hours not only can you monetize but you actually get access to other features of the youtube partner program so if you enjoy these videos and you want to see more please go ahead and subscribe give this video a like if you drop a comment too then more people will see this video because the more comments you put on there the better is for the algorithm and then people will get to see the video because i've found that some people don't know that i have other videos because youtube do not present them to them unless there's a bunch of comments on them and likes so appreciate all your help appreciate you watching the video thanks for everything see you in the next one
Info
Channel: Adventures in creation
Views: 89,504
Rating: undefined out of 5
Keywords: FreeCAD, CNC, CAD, CAM, CNC routing, Design, DIY, woodworking, 3D printing, maker, creativity, art, crafts
Id: KffHu3M5gEY
Channel Id: undefined
Length: 37min 5sec (2225 seconds)
Published: Sat Feb 27 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.