 Hey, what's up folks welcome back to another layer by layer in today's tutorial. We're talking about slide switches So I wanted to talk about slide switches It's one of the most important things I use in projects and in one of my recent enclosures I have this little slide switch here. You can see the way to actuate it is to kind of use your fingernail to turn it on and off One of the things about this thing is that it has a bit of a built-in Endstop so that you can't actually push this all the way in and it's all geometry That's 3d printed and there's no glue or screws that kind of fix this in place So what I wanted to do is show you guys why this is kind of important In one of my recent Projects, let's take a look here. I Went through quite a bit of iterations on this large piece in this large piece has that built-in slide switch But I kept running into little tolerance issues where I kept having to modify it slightly and reprinting this whole piece This whole piece right here. You see the slide switches like at the end of it And so what I recently saw a video from Sophie Wong. It's a collab project with Liz Clark She designed this one piece for just the slide switch in that way She could just iterate on that instead of having to print the entire enclosure. So that got me thinking I really want to do something similar So here I have some little test pieces that I want to share with you folks So what I've done is I've kind of sliced out a piece of an enclosure and then just made it so that the slide switch Can fit into this. So the way the slide switch fits in is that you can pop it out still At an angle and now you can kind of see all the different little pieces that kind of hold it in place So we have these little These two little walls here and the end stop is right there And then here you have a little bit of a bridge and then there's this hole here With some drafted angles so that you can actually get to the little It's a little actuator here that's affixed to the slide switch So this slide switch here is something I've used in so many projects And if we head on over to the Adafruit you can see This is like a very inexpensive tiny little slide switch. Here is a quarter for scale It's breadboard friendly and I've used it in so many projects So many projects in fact that I can show just how many projects here in fusion 360 Because I use the slide switch as an external component I can see all of the projects that it's used in here's the tab it says used in 34 projects And there are a slew of them And you can start to see here that Instead of recreating the geometry over and over and over again, it's a really good idea to have a kind of What would you call it? A kind of a saved reference that you can go back to kind of like this little tester here So I want to design that today and show you folks How I go about making my built-in slide switch holders for these various types of enclosures So yeah, let me jump right into fusion 360 So here is the the component that we're going to design And you can download our 3d models from our github repo I'll have a link for you folks in the description But this is going to be the slide switch that we're using I call it slide switch v2 You can name it to whatever you want, but uh, yeah, that's that's how it is there I also have another version here that is mounted vertically and what's different about this one is that you Can kind of just throw this into a design and I have mounting tabs here But mainly the one I'm going to focus on is this one where it's mounted sort of Horizontally going left and right like that And then here is the enclosure that I shared here the little purple one This shows here how a feather in a battery Couldn't fit in here into this enclosure with the with the slide switch right there at the bottom there So here you can see the the actuator is open and you have Some some drafted angles here and then on the inside you can see that bridge those two walls and this third one here, which is sort of an end stop And uh, that's kind of how the uh, the shape works inside of this enclosure And going back over to the kind of the switch test you can see how this is just like a little slice of that enclosure Um, and then uh, instead of printing this entire enclosure out if you wanted to make modifications You can just modify our little tester here which prints in like under five minutes, which is really cool So, uh, let's go ahead and make a new tab And I'll go ahead and make a new component and I'll call this the the switch holder And because we want to bring it in an external component. I kind of have to save this out So I'm going to save this into one of my layer by layer folders Just scroll down here to lxl and I'll call this the the switch holder All right now hit save Okay, so I want the component to be on the root of the document So I'm going to right click on the the switch holder and hit activate Now I can go ahead and say I want to import this into the current design All right, so there it is now I don't want to have it in this orientation yet And if I turn on my origin I can get an idea of where I am relative to the origin And I kind of want this to be up a little bit and then just rotate it down, uh, 90 degrees So it's facing that way. I don't need to be too accurate about where the placement is just yet I just want to make it so that it's in the right orientation So here's what I want and I'm going to push this over here and I'll just hit okay All right Now I want to start working on the kind of slice of that enclosure because I don't really want to make a whole enclosure Because I just need to print this little tester piece, right? So I'm going to right click on the component that we created hit activate and then Now I can start to make my My first sketch So we click the sketch tool and I actually wanted to sketch on this on this plane right here So I'm going to click on that And I'll use my line tool to kind of create a bit of an L shape, right? So the L shape is kind of going to be like this I'm just going to freehand it And not really worry about what the dimensions are just yet You can kind of use fusions. Um You can roll over different things to kind of make some uh Some edges here And that looks good. Okay next up. I'm going to bring up my user parameters under modify You can do uh change parameters And what I'll do is I'll hit the plus sign and create a Uh a reoccurring uh value that I'm going to keep using over and over again in my dimensions I'm going to call this shell because the shell is actually going to be the uh the thickness of my enclosure And the thickness of my walls and because I'm going to use it so many times it makes sense to make a user parameter It's going to be a 1.5 millimeters Okay, and if I ever need to change that I can change it here and I'll change it across all the designs Or all the all the sketches that use that parameter. So hit okay And I'm going to start to assign it uh to this so I'll use the dimension tool or the dimension hotkey and call this one shell And this one as well shell Like that. All right, and now I can do I can start to move this I kind of want this to be in the middle of this. Uh, I'm going to hide the origin window real quick I'm going to just drag this point into the main Kind of center origin here And then I can start assigning some uh some dimensions to these two lines here So this one will be 10 And this floor here will kind of be 12 All right, I'll hit finish sketch because I'm pretty much done with that. Let me open this up and call this something like a profile Because that's the profile now. I'm going to extrude this So I uh the hot key for that is the letter e on my keyboard And it'll automatically select that shape and I'll start to bring this out with this uh with this arrow I'm going to change the uh the direction See where it's just one-sided. I want this to be symmetric and then for the distance. I'll change this to uh 20 Like that And I'll change the measurement from half length to the whole length. So that 20 will uh go across that Uh symmetric direction. I'll hit okay All right, so I got that first sketch done I'm gonna go ahead and hide it now I want to make another sketch But I want to I want to sketch on top of this surface here on top of the uh the surface of our extrude here And one thing here now that I've created you'll see that there's nothing here yet, but I am on the surface If you go under your name here and go to preferences It's going to take a second here under Design you'll see here scroll over to where it says auto project edges on reference Normally I have that turned off But you might have it turned on And I like to have it off because a lot of the times when I project Uh on surfaces, I don't want to project all of the edges. I just want to pick and choose my edges So this is something if you find in your workflow that you like to automatically have all the edges projected That's fine. But for me, I found it nice to have that off because a lot of the times I just like to use one or two lines instead of the whole thing And if you kind of project so much sometimes you can slow down your designs So This little fair warning here. I have mine turned off, but you can have it turned on if you want So I'm going to hit cancel there So with that out of the way, I want to actually project in some geometry mainly just this line here So I have that line selected. I clicked on it and to project it in There's a hot key that I have assigned uh to make it One of the best hot keys though is the letter s that'll bring up this shortcut window And if you want to do project now, you can just type that in project hit enter And there it is my geometry here. It says I have one selected and that's because I have that line selected And you want to have this project link turned on because it'll reference it whenever you make a change. So hit okay So I have my purple line and now I'm going to do is I'm going to make a rectangle So my rectangle is actually the same width and height How about width and length of uh of my slide switch here? And if I click on any of these edges, you'll see at the bottom here It says length 6.3 and then over here this length is 11.7. So let's go ahead and remember those And uh type that into our little rectangle that we're going to draw here So uh Before even clicking to append it you could just start using um, you just type it in So it was 6.3 On the width and the length is I think it was 11.7 And I'll hit enter. All right So let me just cross-reference again clicking on that component 11.7. Yes. Yes and 6.3. All right looks good Now there's several ways to kind of place this rectangle exactly where I want if I could click it And what I want to do is the easiest way is to select this hold down shift and then select our projected edge I kind of want to be in the exact middle of this line. So I can use a sketch Uh constraint so up here you can see I have my sketch constraints up there But I could also just bring up my um, my design shortcuts So you can see here I have a few of them already kind of pinned to my little window here And I want it to be a midpoint constraint. So if I click on that It'll just move it on over there and it is always in the middle now So if I ever change the extrude length of this, uh Of this little slice of the enclosure It'll just be in the middle forever, which is cool. And it also kind of keeps it, um, right Align to it. So that's really nice So I'll hit finish sketch and now what I want to do is I want to tie this component the switch I want to tie that to the center of this rectangle Uh, because I moved it, uh fusion wants me to either capture the position or revert the position I'm going to hit revert position because I'm going to use a joint instead of capturing the position and I'll show you why So under here, I'm going to hit the design shortcut window and type in joint. There it is So I'll bring that and I'll if you roll over any surface you get these little white dots these little white points And you can use these points as a way to kind of snap Um, the joint to it and I want this bottom surface and I want the center of that So right there it kind of locks it there. So I'll click that now I have to choose the second place and the second place will be the center of our little rectangle that we drew So rolling over to it. That's where I want. I'll click, uh, I'll just click it And then fusion kind of animates it there. There's a under the joint alignment Um section you have all these little offsets that you can do I don't need any right now because the length is the exact same length as the slide switch body So that's really nice. It says it's flipped here, which is nice if it's automatically selected there that that looks fine to me But if you click that you can see how it kind of flips it for you But I'm going to leave it enabled there and hit okay So now you can see that uh, it is it is tied there and I didn't have to do a capture position So if I try to move this you'll see that it kind of moves the whole thing But we don't really need to move anything. So let me Revert that and I kind of want to show you a an important principle about the the sketch constraint here So going back into the sketch. I'll double click it either here or up here in the browser. It doesn't matter where Um, I want to come in here and actually delete that midpoint constraint So to do that, I'm actually going to hide the bodies so I can get a better look at it And this little triangle there if I just delete that you'll see here and hit finish sketch You'll see and then turn on the bodies. You'll see that if I move this sketch My switch is now moving with it and there's no capture position going on. Why is that? It's because that's the way the joint works the joint just knows that I need to always be in the center of that Rectangle regardless of where it is. So that's pretty cool. That's just a good kind of look at how this This thing is different from a capture position if we were doing this Um, with the capture position, you'd have to keep saving it and then you would kind of have this long timeline of a bunch of capture position events, but with one joint It's it's it's very uh flexible in this way. So let me go back into that sketch and again, I will select uh A hold down shift and select both those lines And then in my shortcuts, I can just say I want it to be midpoint constraint And there it goes snaps it back to the middle of that line Very cool. All right So now I uh, I want to start drawing the walls in the end stop uh for our little switch before that What's driving me crazy is these two uh solid bodies kind of have the same Material the same color. So I'm going to use the uh the appearance window. That's the hotkey a I'll bring that up and then I want to go down over here to plastic scroll down to translucent And then pick one of these colors. I like a matte blue color Let's drag that and drop it right onto our our body Right click edit and then why don't we make it a little bit brighter? So that looks better hit done and then hit close And now we have a better color in separation contrast between our two bodies It's really important to me, especially when you're uh when you're designing all day So what I want to do is now edit this sketch name. Let's call this the uh the switch walls Because I'm going to do some walls here and I'll go ahead and double click it All right, so what I want to do is I want to do a wall right here But I only need three lines Because this purple line will kind of create the fourth wall for us our fourth line I'm going to bring this out here just by clicking and dragging it now bring up my line tool right here Or not that one this line tool. That was a spline tool. You could use the hotkey l as well And we're going to do is I'm going to roll over that purple line You can see that x here that lets me know that it's going to be a coincidentally constrained to it Which means it's kind of locked to it So, um, I want this to be a perpendicular with that line so you can see that uh as I roll over I'll get that little um perpendicular icon And I want to bring this out Make it perpendicular and then bring it back in as a perpendicular, uh line here So you can see here that now I can drag these around Drag this one around you see how it kind of locks to that to that purple line. That's what I want I want to apply our shell user parameter to this line so with the the hotkey d I can quickly pull out a sketch dimension Click and then just spell out shell And then hit enter and that'll assign that to that place there Next I want to make a length to this to this line here. I'll go ahead and make this six And then I want this to be a certain distance away from this line here So I can hold down both of these lines with the shift key Select them rather with the shift key and then use the hotkey d to get a dimension And now I only want this to be 0.1 millimeters away from each other. So hit enter and uh there we go I have my first line It is now a complete uh profile that I can select next true But before that I kind of want to mirror these three lines So I want to mirror those three lines over here because I don't want to draw it again So I need to figure out what's the middle of this of this guy here One really easy way to do that is to pull out my uh my line tool And if I roll over this line you'll get this little triangle Right about there and that lets me know that that is in the middle of that line So I'll click and then I'll roll over to the other line there and try to do the same thing You can see that's our triangle Click that and now I know that that is in the exact middle of our uh of our thing here So I'll select that line now and hit uh with it selected See it's blue. I'm going to hit the the the hot key x on my keyboard and that'll turn it into a dashed line Which makes it a construction line. So now when I select this Um, it won't kind of create two profiles It'll just kind of be a line that I can use as a reference point like when I'm creating a mirror So now that I have that line, um, I'm going to double click on one of these lines here that created our wall And that'll select like the chain And then with that selected I'll bring up my design shortcuts And then right here I have a mirror or you could type it in if you don't uh, if you don't have it saved or pinned to your design shortcut Uh, you can you can just type it in and pull it out from this little window here. So mirror Those are the objects that I went to mirror those three lines And then my mirror line will be that construction line And you can even get a preview of uh of your mirror there and I'll hit okay And now I have that so whenever I make a change here Let's say I want to change this 0.1 to 0.5 That other side there, uh changes instantly. So that's really nice. So let's change this back to 0.1 because that's the The value we want And now I just need to make our third wall, which is kind of like our end stop So I'll use the instead of the line. I actually want a rectangle. So I'll hit the r key Which is the hot key for rectangle and then I'll just kind of draw that a rectangle here I want to have the rectangle Have that shell use a parameter because that's the value that I want to use the 1.5 millimeters So shell on that side And then I'll hit tab and then how long do I want it to be? I do want it to be six millimeters. So now I'll uh I'll hit six millimeters and I can Kind of move around and kind of get these sketch dimensions a little bit better placement there Now you'll notice that um, I don't have this rectangle placed anywhere So what I want to do is I want to have some distance from here and here But I want this to be in the exact center Of that line something like that now. I can't quite get it perfect. There's no snapping going on So here's one kind of trick that I like to do. I'll use the line tool Right roll over this edge here. You see that midpoint constraint triangle I got that and then I'll just kind of go to this line and you can see here now I don't get that triangle, but I do know that that is the midpoint So I can just click on that And now I have this line here and I want that line to be horizontally constrained and Thankfully there is a horizontal constraint that we can tie to it So if you could type in horizontal or vertical depending on where the orientation of the line is Fusion will know uh to make it either going straight up and down horizontally or left and right vertically So I'll click on that and you can see it has now made it nice in uh in horizontal vertical All right, so now what I can do with this I'll select it hit the x key on my keyboard so that it is a construction line And then I can use the hotkey d to apply a dimension Now this one only needs to be 0.3 millimeters Which has a little bit more distance than our walls But that ended up being the best value At least in my tests and that's kind of all we need for the our walls So I hit finish sketch and start extruding So I'll go ahead and select these both walls here and I'm going to make these very specific height So that's going to be 4.4 And it's a operation of join because it'll join to uh to our little test piece here And then I'll hit okay. All right Next up I want to extrude our little end stop this one It's actually going to just be the shell user parameter. So that's cool. So I can hit that And now we have our three Walls that kind of hug this thing and keep it from being pressed all the way in So now if we look at it in the front side here in this little front area You can see I now I need to kind of create a hole A hole that will allow this actuator piece to kind of stick out of the hole So with this surface selected I'll go ahead and create another sketch But not yet because I don't have my switch holder selected So let me activate that component because that's what I need to do if I want my sketch to live inside this component Now I can select the surface create sketch and it'll make it inside that component So I kind of want to hide the body so I can get a better look at this uh at this switch component And I'm going to use the hotkey p so I can project in some of these edges I really only need the left and right edges. So this edge here And this edge here of the little nub and then I'll hit okay So now I can do I can bring back the bodies And I can start to make a rectangle. So I'm going to make a rectangle that's going to encompass that I don't really need to set any dimensions yet because I'm just going to kind of drag it to where I want All right, so I got my rectangle and what I want to do is I'm going to select this line And then I'll hold down shift and select this dot here, which is like the center origin Of our kind of sketch plane And I'll bring up my design shortcuts and then I'll use the midpoint constraint to stick it down there in the middle So now if I drag these edges, you'll see that it's in the exact center and the other edges following it because that's the way the Midpoint constraint is working So now I can I can apply a sketch dimension from here from this line to this projected line And I just want to give it a little bit of a gap. So 0.5 millimeters hit enter And then for the top I can say I want this line To have a distance from this Not that I meant to hit the dot. So let me try that again. Click on the line hit d and then click on this dot And now you can see it's going to go distance between those two and that's going to be also 0.5 And that's it for this one. So I hit okay Now what I can do is I can select that that rectangle And hit the the extrude hot key which is e on my keyboard And I want this to be a negative that because I want to go on the inside And because it's a shell Well, I kind of already spoiled it. It's shell That's the value I'm going to use because it's that Thickness that I've been using over and over again. You can see here. It's cutting into Uh the uh the walls And even at the bottom, so I hit okay and you can see now If I select the whole component you can see Um kind of how it's working. I'll hide these two sketches here So you can see it better so you can see that cut at the bottom here in this Bottom wall or bottom floor of our little test piece It's nice to have it cut open and uh because it just lets your fingernail kind of get in there a little bit more The next thing I like to do is to kind of draft these angles here. These these angles draft these edges here or these surfaces rather Because it'll it'll allow your fingernail to get in there even better So here's what I can do. I'll use my design shortcut window s And then I'll type in draft and then there's draft so I can select that I'm going to use the pull direction. Uh this surface here is a good pull direction And then for my faces, I'll click on this And this And then I can start to uh either use this right here or in the little input window I'm just going to put 45 degrees and that's what I want Now I also want to add a drafted angle here But I don't really have a pull direction. So what I'll do is I'll select this edge here And with it selected I'll bring up the the shortcut window and then type in chamf Ur and then hit enter because that's chamfer and then For the value, let's go ahead and type in shell because that's the thickness of our wall And then that makes it nice and even with those two uh those two other surfaces hit enter and there you go So that is uh a nice way uh to get uh more out of this geometry here so you can get your fingernail in there All right, the last thing we kind of need to do is we need to make a little bit of a bridge here A bridge in this surface so that um it won't pop up whenever you're uh whenever you're playing with the Or actuating the little nub here. So um Let me see I want to name this one here the switch Actuator pull That way it's very descriptive and then select that By right click activate or hit that little um radial icon And now I'm going to um click on that Select that surface create a sketch and I'm going to project in Uh this line and this line and that'll just make it easier to uh to kind of snap to it So I'll select those two hold down shift select that one hit the the hotkey p which is the project Uh hotkey you can see here geometry is two selected I remember to keep that projection link selected hit okay Now I got my two purple lines. I'll go ahead and use my rectangle Tool the hotkey for that is r and I can just kind of draw one out like this I'm not even going to tie a uh a dimension to because I I don't need to yet I can hit the escape key and then just click on uh See if that the see if my dots can show up. There we go. Sometimes I need to hide the body And that way I can uh roll over one of these points and then just drop it on uh on that right there And then I'll lock it in there with a coincident constraint And then I'll do the same on this side here So just drag that and if if things get weird, I can just select that Hold down shift select that dot Bring up my design shortcuts and assign the coincident manually like that Just because sometimes fusion selection will be a little bit weird So that's one easy way to do it and that just leaves me with this. How tall do I want this to be? Well, I've been using this value over and over again. So let me assign the shell to that And hit okay now. Let me bring back the bodies And I'm going to extrude this out. How much should I extrude it? Let's do shell again So there's shell and that joins it to there And I will call this the switch roof or the switch bridge Which is a good name for that And that's kind of it for this We can we can do a little bit of uh some fine-tune adjustments. One of the things I like to do is to do the draft I'll select this surface as my pull direction That surface up there As my my face that I want to draft And then I'll do that for the end stop as well. So that will be my Pull direction and then the the faces will be this one This one and this one over here And that kind of makes it a little bit thicker so that it's less likely to snap off if you put too much force on it One last thing. Let's go ahead and add some fillets the hot key for that is f and I can select these two Corners here and add like maybe a one millimeter How about a shell? We're using it so much. Why not use it there and that's kind of it So I will Activate the main root of the document so you can get a better look of everything And that's looking pretty good. So again if you want to add some more Some more clearance to these walls, maybe they print it a little bit too too close Right click on your sketch and hit show dimension Now we can quickly edit your dimensions without having to go back into the sketch in the edit mode So I can double click on this and say I want this to be point zero two And you can see it updates. Let's do something more extreme like zero point five You can see there's way more gap now and because it's a mirror Sketch it will just kind of follow with the uh with the mirror there. Let me turn this back to 0.1 And there you go. So now I can export this out save it out as a 3 mf or an stl and You know, you can print that out in like five minutes and see if everything fits Another thing we can do here just to kind of get a good look out of it As under inspect you can see there's this option called section analysis I use this so much because it allows you to Select the surface and then kind of cut away without damaging it just to kind of visually see Is everything okay here? So you can see here I can now get a better look at the clearance between like the the roof or the bridge And the the switch of the body the surface here. You can see I have 0.4 millimeters of distance Which is just enough to be able to still squeeze the The the body the switch of the the body of the switch into this little cavity here And you can go open this window here Analysis you can just turn that on and off. So that's really easy But that's the recipe I put together for this. You can see it's really just three sketches here It's three sketches and not one sketch because as you saw I'm using projections And that's a really good way because if I ever move anything things would kind of flow with it So that's really nice One example here is if I wanted to add more if I want to add more gap here to this extrude Or not more gap, but like yeah more gap. Let's say we want this to be five millimeters You'll see that the bridge just kind of goes with it because that sketch is using Projected geometry so it'll always kind of follow with it. So let me undo that with control z. You can see it goes back there And yeah, you can see just how many surfaces are kind of Are used to keep this slide switch in place But it still allows it to kind of come out. So that's really nice And then I'll just go back to the enclosure here You can see how it's pretty much similar if I hide the the battery for example You can get a better look here Pretty much the same geometry Um, the only difference here. I think is that it has like a fillet down here on the edge But that's just fine there. It's just for uh For aesthetics and ergonomics really But uh, yeah I do have one more uh switch holder this one here if uh if folks want to see a tutorial on this one Let me know but I think uh I think the vertical one is the one I use the most but this one's really cool because In it allows you to kind of just drop this into another design and you have these mounting tabs So if you just kind of want to Print like a giant part you can just make like a a hole with these two mounting holes and then just allow Um, and then just print this out separately Um, so I think that's kind of cool. It's mounted vertically. Um, so if this is like the bottom of your enclosure Um, if you wanted your enclosure to be like that, that's another option But it's kind of using the same kind of style of stuff. There's walls And there's an end stop here and here. So it's a little bit different, but yeah, let me know I'll share both files. Um In the description of this video so you can have at it both of them if you want to try them out depending on your project But uh, yeah, that's going to do it for this one. I hope you guys learned something. Let me just kind of share This piece the vertical one It's printed out you can see here that this is the bottom of the uh, of the part This is what prints on the on the bed of your printer and it's very similar installation wise You kind of fit this through at an angle like that and then just push it I think kind of squeeze it in be careful not to bend your pens And then as you squeeze that in there You can start to see it um, accessible here and you can use your fingernail To kind of poke that in there And this geometry here Right there will keep it from being pressed all the way. Yeah, and I did bend my my pin. Uh-oh But yeah, it's got a nice tight fit and you can still pull it out like that Let's go ahead and put it in this one. This is the uh The kind of traditional way to have it Right there Insert at an angle. Uh, it's hard to kind of see Um, so let me do that again. So insert at an angle flat down And there you go And then you can access your nub like that And if you try to push it in you can't because this little stopper here will stop it So that's really it. I hope you folks learned something. Let me know how you feel about the slide switch Do you like it? Is it could it be done better? Let me know I'd love to hear your thoughts, but uh, that's gonna do it for this one I hope you guys have uh a good one out there and don't forget to uh make a great day. Bye folks