Understanding FreeCAD: Lesson 4 Automatic Scaling Features with Formula (Beginners tutorial)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi viewers and welcome to the channel and welcome to another episode of the understanding free cad series we're on lesson four and we're looking at formulas so we're going to create a simple object like so and each of these pads are linked together via formula including this feature here so if i come into the pad and change the length of on the sides so this will be the thickness you can see those are changing and also the thickness and depth of this feature here we also can come into that pad and change the length so we've got this length here double click it and set this to something like 50 millimeters and close you can see this has changed as well so we've got this thickness here and we've got the 10 millimeter width walls can come back into the pad and change that to something like two mill and you can see how that's changed you notice that this feature is keeping the same so this feature has been set to be a datum value to be away from these edges but this feature is in relation to the length of this side and also the depth of this edge so this can be quite a quick video to go through these i hope it helps you understand how formulas work so you can take those on to use them in more complex models if you like what you're seeing please subscribe to the site i also have a co-fire or coffee site that you can donate to if you so desire and that's at ko hyphen fi dot com forward slash min g0 also run a patreon where you can subscribe and get extra content and that's at www.patreon.com for slash mango jelly solutions any money that's kindly donated will be used to expand the channel so we've got free cat open we just need to create a new document we'll go up to file new and that's been created in there and we're going to come over to the part design we're going to create a simple square and pad it up so we've got great body here we can come up to the create body and then create a sketch let's use the tasks we're going to create a body and create a sketch and we're looking to place it along the top this plane here the x y plane hit okay so on the x y plane and we're going to create a simple square using create a rectangle in sketch place it into a sketch and i'm going to make these sides these two here equal so i selected those two closing the quality that means when i change this it will be a square so those two sides are equal also making these two sides equal we can center this around this point but we first need some kind of length constraint so i'm going to select the top this one here and create a fixed horizontal distance between two points and we're going to set that one to 100 millimeters because it's a square we could have used this side or any of these sides to do this i'm now going to constrain this to the center so this point is going to be in the center of this square and that will make it fully constrained so i'm going to select one point at this corner here select the other point i'm going to make a symmetry constraint across these two points and this center point so we'll create symmetry between these two straight down now we straight down the middle so coming along here then what will happen select one select the other and then set the last one that we want to play symmetry with this will be fully constrained to the center there let's hit close and we're going to add a pad on there so hit pad we'll come up to part design create an additive feature and hit pad making sure that this is green so it's been selected so come on to the model you can see that sketch has been selected there let's hit pad and just give it a five millimeter pad now take notice of this length here and take notice of the little icon we have at the end we're going to be using this shortly hit okay and this is a hundred millimeter square with five millimeter pad what we're going to do now is create another side so 100 millimeter side here using this top face so i'm going to select the top face and create a sketch upon that top face i'm going to import some of the geometry in this so using this here create an edge link to external geometry or kind of sketch sketch geometries external drop tree and we're going to pull in the vertexes so you can see we can pull in lines we're going to pull in the vertex at the top here and the vertex here like so click on those vertexes we've got those two vertices there i'm going to hit escape to get the mouse pointer back and use the square rectangle tool here we've got the auto constraints on come down here the auto constraints that means when we come in if we roll over this constraint you can see we get a coincidence constraint there so to the right of the pointer you see that coincidence constraint there just click once and move the mouse over to the other side i'm going to drop that somewhere inside here and we're going to do the other coincidence constraint manually hit escape or press the right mouse button to get the points back click both the top constraints and hit coincidence constraint in there so that means that line has gone green so we know this is 100 millimeters line if any of this shape changes in length then this will change as well now we need to create a length in here now remembering that our pad is five millimeters well we need the same for here so what we normally would do come in and select that and use a height constraint and then type in nine millimeters but we don't have to do this we can make a formula that connects up this length with the pad by using the little icon at the end click on it and we can add a formula now remembering that the pad come over to the model let's clear that cancel let's go to the model remember in this pad if you click on it if we look down there's the length there that says five millimeters so we're going to be using that length let's come back in to our sketch and select that length there set the vertical distance come into the formula this little icon on the end and we'll get this formula editor just hit delete and we see fail to pass expression because we haven't got anything in here if i hit uppercase p you can see the pad is there let's select it let's place the dots on the end so now we can press l for length and we get the length there let's click on length and we get five millimeters there so that's taken the length underneath from the pad and added that five millimeters there hit okay and we've got five millimeter pad that's been added you can see it's grayed out and that means it's in the formula if we wanted to enter this menu we just hit clear and we get the formula back let's just okay that and okay and we get the five millimeter pad there this is all fully constrained you can see the constraint has become orange and if we look down the left hand side look at our constraints we can see this constraint in here it's constraint 10 is five millimeters and it's got a little formula on the end there so now when we come out scroll up to the top hit close we can see that sketch is upon there so if we change this pad go into the model go into the pad let's just change that length to the length of that pad i could double click it and change it through here so i'm going to put a 10 millimeter pad on here hit ok you can see that this is all snapped back into position and now we've got a 10 millimeter gap in there let's pad this up let's bring this over here and view over and add a pad to this sketch so click sketch add the pad and well we need to do this 100 millimeters so it's going to be 100 millimeters this way minus the 10 so 90 millimeters well again we can come into this formula here and actually use the formula so what do we need well that's come out there and just leave a 10 millimeter pad for the time being we'd need that to be the same length as this pad now if we come into the original pad which has been hidden here and don't put the sketch we know we've got a hundred millimeter length here so we're going to use this now the way to do that is to double click it and we've got this name option here so i'm going to name this side length notice that the casing will matter so if i did locate side length then they would actually be different constraints casing does matter in here so up code s capital uppercase l on those and hit okay so i've named this now if i hit close and come back into this pad a little clicker we're dealing with this one let's go into the formula and we're looking for our sketch let's sketch here so let's type in ske and click sketch and then start typing constraints see we've got the constraints coming up constraints hit a dot and then type in side length and you can see it's come up 100 millimeters there but we need to minus off the width of this pad so again we can actually edit this hit minus type in p id for the pad then the dot will be added and then length and we've got our 90 millimeters there hit okay and now we've got two the same so this will be 100 millimeters going this way and 100 millimeters going this way hit okay and we can measure that by using the measuring tool so we get 100 millimeters so i selected one point to the other point that's 100 clear all the dimensions and click this one and this one and we get 100 millimeters there as well so you can see those two lengths are the same clear all dimensions and hit close so we know now that if we change our original pad size so we want five millimeters there and okay that then if we go back to this pad press the spacebar then we're going to get the same here the same if we go into our original sketch and change this one say 80 millimeters hit close then the other one's going to be 80 millimeters as well so we've kept those both in union with each other just by using the formula at the end and all of these or most of these if you come in to this not the placement because it's actually attachment there is a formula icon on the end so we can actually change these at will in our model and connect them up to constraints sketches etc i'm going to add a pocket in here now but i only want the pocket halfway through set this face we're going to add a sketch to that face and we're going to use create a slot in sketch i'm going to place it along this line and place it along here hit skate to get the mouse pointer back and i'm going to make this point and this point symmetrical at this point but we're gonna need some length in here because if i tried to do that and hit symmetry then we've still got this to constrain so let's add some length to this so we could come into here this point and this point let's zoom in and make sure we don't select this line here so we need that point and this point and add a distance constraint in there and to get our bearings let's have a look at 50 millimeters so i'm happy with 50 millimeters along here so this is going to be the length of this divided by two so we can come in double click that so come into the formula and type in sketch dot constraints dot side length at the moment it's 80 millimeters so let's divide that by two hit okay hit okay again and that's our pocket that we want to do that slot in there and we can do the same for the width for this as well so i'm going to come into these points here and do a height go into the formula sketch dot constraints dot side length and we'll divide that one by four and hit okay and okay on that so we've got that there so these will keep in proportion when we scale this let's hit close and we're going to pocket this but i only want to pocket halfway through so i'm going to go for pocket i'm going to use the formula again and this one's going to be pad dot length this one here click it and divide that by two yeah okay and we've got that pad length come through divided by two to create that pocket hit okay so now when we come into the original sketch in that pad this one here and change this one to something like 100 millimeters hit close then we get this scaling effect so everything is controlled by the formulas so now we have a few of the formulas set up we still may want to add something like a five millimeter hole here that's around ten millimeters away from the edge we can still do that and use the datum constraints in there it's up to you if you want to add formulas to them but we must remember that if we're using holes through here that we need to take account of the depth so we need to use the right pocketing method to go through here let's add a sketch to the bottom and we're going to import these two vertices using the import geometry tool we'll just click on those vertexes to make them red so we can access them and we're going to add a circle hit escape to get the mouse pointer back and that's set the diameter of that hole or that circle to five mil i'm now going to place this 10 mil away from this point on both the length horizontal and also the height so this point and this point and make a vertical constraint in there of 10 millimeters so that's placed there now if we hit close we can see that circle there now if we try to pocket this using the pocket tool then we must make sure that we don't supply a dimension or if we do we use the pad dimension in here so using the formula again we use the pad dot length in there and hit okay so we've got that in there but the best idea is to use this type and go to first that'll bring out to that first face if we went through all then anything overly in this say if we had another pad going along here will be pocketed through as well so we don't want that we'll make sure that it's through to the first and then we don't have to worry about adding any features in here pad.length pocket or length etc to cater for this width so i okay that and we change the pad again go into the pad i think five you can see that's gone all the way through that face same if we come into the sketch and set this there we go set this to 100 hit close you can see our hole is there so it's up to you if you want these holes exactly five mil ten mil center away from these edges or you want to take a count of the length as a whole and use some kind of fraction value or percentage value in here i'm just going to add another hole so this sketch at the moment is our base sketch so we don't need that one let's come back down to our pocket open that up open that sketch and there's ways of doing this to get it over to this part i could use a part designed mirror to move this across but i'm just going to use this circle ctrl click this line because it's in the center and come over to the symmetrical tool also available on sketch sketch tools symmetry and that pushes it over here this is still mobile as you can see it's not fully constrained so to do that i'm going to use this point in here and click this point in there to make sure they are kept in line with each other using the horizontal constraint and then i can just place in a length in here just move this over a bit down the height we want length and 10 mil from there that's fully constrained now so when i close this those have gone through all as well so it's up to you if you want to use datum or you want this to be formalized as the rest hope that's given you an example of how to use the formulas it's up to you how you want to use them for your application but this gives you a quick overview of how they work with sketches and also pad and pocket features if you like what you're seeing please subscribe to the site i also have a co-fire or a coffee site that you can donate to if you so desire and that's at ko hyphen fi.com for slash min g0 i also run a patreon where you can subscribe and get extra content and that's at www.patreon.com for slash mango jelly solutions any money that's kindly donated will be used to span the channel thanks a lot for watching and subscribing and i'll see you again soon
Info
Channel: MangoJelly Solutions
Views: 529
Rating: undefined out of 5
Keywords: CAD, three, 3D, CNC, Printing, solidworks, autoCAD, freecad 0.19, freecad 19, freecad basics, basic course, fundamentals, learn freecad, freecad beginners
Id: TPRuYuZIlSI
Channel Id: undefined
Length: 22min 22sec (1342 seconds)
Published: Sat Dec 18 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.