FreeCAD: Animation and Kinematics using the A2plus workbench

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
for the first part of this video we'll be looking at animating a simple part before moving on to our digger arm now for this you're going to need the a2 plus workbench and we're actually running on freecad version 0.18 and i'm running under ubuntu now to actually install this a2 plus workbench we'll go over to tools add-on manager and you can see here we've got a number of workbenches an a2 plus workbench is actually in here already installed now the a2 plus workbench comes after assembler 2 but before assembler 4 you can't use assembler 4 with freecad 0.18 because it will crash assembler 2 is no longer supported and that's for older versions of freecad 9.19 is still under development at the moment but can can still be installed by their website so i've started a new document here and what we're going to do is first of all we're going to create a small part to allow us to build our skeleton so jump into the part design and i'm going to go create a new body and i'm going to sketch on that body i'm going to make a really simple part on the xy plane and all this part is going to be is basically a link and then we're going to something a bit more complex later so this will just give you the status of actually doing this so i'm going to restrict it to the center point let's use my page up and page down to find the center point there so there's two i'm going to restrict that point constraint there using the constraint and now i'm going to actually restrict the height of this and i'm going to have that as three millimeters or four millimeters and i'm just gonna zoom out gonna restrict the the length and we're gonna use we're gonna use the fix and length of a line and distance okay so i'm going to do that as 100 millimeters so we can see that's fully constrained now all right i'm going to make this a bit smaller i'm going to go 50 millimeters on here so it stays on screen okay let's just do a full screen on this so we can actually see what we're doing so i'm going to close that sketch now so i've gone back into the part design and i can pad that to 10 mil we can okay that now what i should have done is actually put some holes in here but i can actually alter that sketch so i'm going to just jump back into the sketch by clicking on model and click on sketch and i'm going to put some circles i'm going to use as holes in here that we're going to actually constrain to so i'm going to place a circle here hit escape and put constraint on the actual diameter of this circle two millimeter diameter and at the moment it's we can still move it about so i'm going to constrain it to the center point there so we're going green so it's fully constrained i'm going to move over to the other end but first of all i'm going to click it and control c so i copy it see this line so i can use my arrow keys now to move over to here just place it next to to it's pulled pulled the other constraints in with it which just at the moment is a diamond to constraint i'll constrain that to the point there so that's all constrained now let's close that and our pad has now taken on that constraint pad's a bit too thick so i'm gonna bring that down to two mil that'll do that's the linkage we're going to use just to show you the skeleton and how it all connects together i'm going to save that part i'm going to call it uh link 50 millimeters let's call it link 50 millimeters saved it so that's saved got this python console down here which i don't really want get rid of that so that's what we're going to be using for each of the arms so we're going to create a scene first so i'm going to create a new scene and i'm going to jump into the a2 plus version 0.4 workbench i'm going to import that body in to here which we've just designed so this second icon over is add a single shape alpha external geometry file we can also get it to the a2 plus add a single shape alpha external file not the add apart from a stone file and it will say that we have to save the scene first so let's do that i'm just going to save it as a and on file that i've got in there a2 demo yes okay so let's import our parts so add a single shape out of external file and i'm going to go to the link 50 millimeter that we added earlier open that up and what will happen it will say select a shape to be imported and i'm going to choose the body there's nothing else to actually choose in there let's choose that at the moment that's been dumped into our 3d space and that is as a fixed position so if i look at my data import part fixed position there so that stays static we can actually change that if we want we can actually fix the position to force if we so desire but for the time being leave that to true let's fix this position i'm going to rename that link a you see the reason why because otherwise the default name gets a bit confusing otherwise i'm going to import another part now import the same part open that up and it's using the body we choose that and i haven't actually clicked my mouse at the moment but we can actually move that about wherever we want i'm going to move it to about here because you'll see how these snap together in a second and i'm going to call that link b so i'm going to rename that so we've got two parts in there now i want to actually link these together so they actually pivot around these points these circles here now the way you can do that there's multiple ways of doing that but i'm going to use a circular constraint to do that so let's give this a bit more space so we're going to see what we're doing i'm going to just zoom into here use my page up and page down so we've got two in here so if i select those we can actually see these at the top a's at the bottom and i want to connect this circle so i just clicked on that circle and using my alt to actually move the actual window about i haven't actually clicked on the actual scene itself just clicked on the circle so that's still highlighted hold down control and select the other circle so i've taken my finger off control now and using the augment so you can see the circles are selected and you can see these two are highlighted here now along our toolbar you can actually see we've got these two circles if i hover over them it says you can see it says add a circular edge constraint between two parts and you got a bit of a hint there of what she does the reason why i've selected those two is i want to show you something that might happen that might confuse you so if i select select these two icons here or a2 plus constraint and add a circle constraint there circular edge constraint you see that i can because this when this dialogue is open i can still use my all but it looks like they've disappeared but a constraint's been made here but if we click on a link a you can see that if we move this is flashing and there's some green showing through and that's because it's actually inside this object and we can solve that by clicking flip direction and we'll just flip that around or if we hit flip direction again it gives us another option so we can actually keep on hitting flip direction and decide what we want from there so i'm going to go for for that so it's actually partly inside i'm going to set that now we've constrained those two pivot points but if we click on the move the part under raw constraint you'll notice that if we try to move this one it cannot be moved because the position is fixed that's because of our made it static down here so on this one if we look at the data fixed position is true so this one will stay fixed so this one should be able to move so if we move this you can see it's not moving that's because we need another partner to actually allow us to move it in the train this can be moved by using the placement and the angle so if we change the angle of this what will happen is that will actually start to move that's absolutely fine use our up and down keys there to move the angle so that's actually pivoting on that point which is absolutely perfect that's exactly what we want if these points separate there's a rubik's cube over here to solve the constraints so we can actually click on that and that will solve them but let's have a look what's happened over here so we've got link a and link b and there's a constraint that's been made here so circle h001 on link b now if we open up link b we can actually see another constraint in here so that's showing that's linked a to b so in b we've got link a there and we've got this constraint that's sitting outside of link a which is a bit interesting because i would have thought that would have been inside there but that's okay and if we click on the constraint we can actually get some more information up on in the data so let's pull this window out a bit so click on the link be constraint and if we look down here we can actually see the suburb elements that is actually linked so we've got the object that it's linked to which is b underscore link 15 millimeters zero zero one and the other one here object two so those are the internal names that it's giving it when they actually create those objects but we can actually see the actual edge that it's linked to which is edge 18. so we're looking on our edge constraint for link b which is this one here so we'll just get rid of link a by hiding it for a second click on this one so we're looking at age 18. so if we hover over there we can see click on that let's page in there so that circle there look down here hover over you can actually see that says edge 18 and you can see the actual internal name that's given it okay so that's actually create a constraint in there let's bring our a back and add another linkage in here so i'm going to click on the actual add a single shape i have external file and click on the link 50 millimeters again open it up choose the body and we can just place it anywhere i'm going to place it over here for the time being i'm going to rename that to link c rename link see and we're going to do the same so i'm going to move up to this one i'm going to click the circle there i'm going to click the circle on this one hit ctrl first so you can see those two have highlighted in here so we're going to link those together and using the circular edge constraint we'll place them in constraint with each other i'm quite happy that's been placed in the correct constraint i can move this about while this box is still open we can flip this is what we so desire that they set that let's zoom out now now we have this on screen with our free links what i'm going to do is just going to position it i'm going to click on the move the part under rule and what you'll see if i click the top one now so single click the top one we can actually move this about so that's all moving nicely about there so you can see that if this was something like a digger arm we can actually constrain the different objects of the digger arm to these points and allow for movement obviously the top one will need to actually change the placement and the angle to allow the movement we can also do it with the other parts so we can change the angle this one so we call placement at an angle but you'll see that it looks like it's broken after changing that angle just hit the rubik's cube and that will just resolve that and we need to actually allow for that in our python code if we do any coding if we want to animate this but the trouble is if you see my other videos you can actually see which commands are actually seen down here when you actually start rotating these by clicking on the angle here click rotate on here you see that's rotating and we can see that down the bottom we can actually see commands coming in here but you see there but if we click the solve no command has come up here and there is a command that you actually actually use for this we have to actually import the library to do this and allow for the solver to actually solve this it's called app solver and we go into that when we do our python good thing about the a2 plus workbench is that we can actually edit parts while they're actually in our tree if i click on any of these parts because these are all the same i can actually edit one and the effects will be applied to all of them so that's edit one of these parts here how can you actually use the stairs with a edit icon there here edit imported part or can actually select the a2 plus option from the drop-down menu at the top here the good thing about the a2 plus workbench is that i can actually select the part and actually edit that parts file straight from here and have it update all the actual separate parts i made from that file so because this scene is made up of three of the same parts if i edit one the effects will actually be applied to all of them so i can do that by clicking on the part clicking on the edit icon here edit an imported part or from the a2 plus drop down menu at the top here i can edit an imported part here that will drop me into the actual part i can swap between the workbenches so it's the part design i can select my face i can create a sketch on my face and here i can actually add geometry to my face and pad and pocket as i so desire so for instance i'm going to place a piece of geometry along here i'll just manipulate that part i'm just going to do it quickly i'm not going to worry about any constraints at all just want it as a demonstration so that's sufficient for me and close and i'm going to pocket that part all the way through okay that's i'm going to save that control s and save and close that scene because it actually opened it in a new file down the bottom here you can see it hasn't taken effect if i jump over back over to my a2 plus workbench and click the update parts which have been imported to the assembly or use the a2 plus and update parts imported assembly option here you can see now that's been updated but you can see stuff has been broken in there so let's just hit resolve you can see we've got a bit of a problem sometimes this actually happens sometimes linkies will break in there so i'm going to click on this one here which is link c come in here i'm going to delete my constraint i'm just going to have a look at the others so those will okay and i'm just going to constrain one of these circles again i'm going to strain it to this one here holding down control clicking those two have now been highlighted and we reconstrain that let's move this out the way a bit and just change the direction and accept that so that's been reconstrained now and i should be able to move this there we go so that's backing back in context so just watch out for that sometimes the linkage can break but that's how to actually edit those in situ we're going to leave it there for the time being in the next video we're going to actually look at a viewer that's actually created a model that's passed on to me to actually help him to actually animate it and we'll look at actually getting that into the at workbench and actually doing the same as what i've done with the links the python will come in another video because i'm going to go about a different way and actually create a small interface that allows you to control the angles of the different links so we'll have a small window to come up on screen with the buttons in there so we'll actually create a widget rather than a macro and no big control from the macro okay and i'll see you in the next video if you like what you're seeing please subscribe to my site and also i have a kofi site um where you can actually donate a few pence or a few pounds dollars or whatever your currency is and that's at ko hyphen fi.com slash ming0 and there you'll be able to help me fund my site and all the money that i actually get from any funds will actually get pushed back into the channel thanks a lot for watching and subscribing i'll see you next time
Info
Channel: MangoJelly Solutions
Views: 7,906
Rating: undefined out of 5
Keywords: Animation, movemnet, kinematics, ik, bones, 3 CAD, 3CAD, beginners, tutorial, solidworks, aautoCAD
Id: 5yBqe6eSgfk
Channel Id: undefined
Length: 22min 47sec (1367 seconds)
Published: Tue Feb 09 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.