Today, I'm going to share some of my favorite hard-earned tips, tricks and strategies for creating sketches in Onshape.
I'm Evan, a partner at the product development firm Ovyl.
This channel exists to teach professional and advanced users how to utilize the full power of Onshape. So even if you're an absolute animal [phonetic 01:15] and Onshape sketch tools, I think you're going to learn some new things. And if you're a beginner, this video will let you know what to work toward, let's get to it!
I'm using the line tool, if you just activate the tool and click, you'll get multiple lines, you can hit Escape to complete it. If you just want a single line, if you click and hold down, when you let go, you'll just have one line drawn.
When creating sketch constraints on Onshape, you can first grab your constraint and then grab your objects to constraint and it will reactivate the tool. So that's a quick way to come in and apply the same constraint to a lot of different geometry.
When you're creating new geometry, you'll mouse over an object, you'll see it highlight orange, and you can drag out from there to automatically generate a horizontal constraint. So you don't have to add one later. If you find that that behavior is frustrating.
And it's snapping to things that you don't want, you can simply hold Shift, and you will get no constraints while you're work and this includes... if I'm dragging out a line, and I don't want to be horizontal, but it's going to be close, I can hold shift. One constraint type that I actually find is pretty helpful from time to time is the ability to use a midpoint constraint using only points as the inputs.
You can see that I've box selected these and they're all constrained to each other. This is a quick way to add symmetry without using a construction line. And also could be really handy to find the midpoint of a face by just grabbing the diagonal corners and setting the point to the midpoint. Sketch patterns and Onshape are a really powerful way to add a lot of detail to your design.
For example, I can just drop in the pattern here, I can drag out a second direction if I want it. And all of this is probably already familiar to you.
But what you may not be aware of is, how much you can modify the instances once the pattern is already laid down. For example, if I want to unconstrained the instance distances, I can just delete those dimensions or set them to driving. And now I can freely drag around this pattern, which could be handy if I want it to dimension to the total length of the pattern, for example.
Another thing that you can do is modify the vertical and horizontal lines, they do not need to be vertical and horizontal, you can remove that constraint. And now this pattern can move off to the side, which would allow me for example, to create a hexagonal pattern by adding an extra construction line and setting all 3 of them to equal. You can see we've got a nicely constrained hexagonal pattern. But it doesn't stop there. This pattern, I can still add instances to it on both directions. And once I've done that, even if I come in here, and I delete one of the instances, it will still maintain the integrity of the pattern, I can set them to construction geometry if I want to. And I can even trim them without messing the pattern up... I'm using the M-key to activate the trim tool. And even once that's done, I can still come in and modify the instance count.
Now you will see that if I reduced beyond where those modifications were, and I bring it back. They're all restored. But you can modify instances and maintain the integrity of your pattern.
A common thing that I run into when I am dimensioning objects, I love using variables. And if you drop this out here, drop this rectangle, it activates this box here. And I could just type 100 and get a dimension. But if I tried to start typing a variable-- For my height, for example, it starts grabbing hotkeys and doing everything all weird.
Let me show you a way that you can do that from that quick dialog box. This is one of those things that can eek out-- Just a couple more seconds off of your total modeling time. If you start to type a number, it will open that box and wake it up and then you can backspace and start to enter [phonetic 03:40] type your variable. So again, 5 backspace type. That's one way without your fingers leaving the keyboard for you to add variables to your dimensions when you're creating an object. This isn't an Onshape specific tip, but it is a sketch related tip. So I thought I would share.
I commonly run into issues where I have aesthetically unpleasing fillets because I'm driving the fillet by the radius, but the faces to which they are applied are really different angles. So this angle is very obtuse, this angle is perpendicular, and these fillets have the same radius. But you can see that they don't look similar. They're not very well related to one another.
For aesthetic reasons, I prefer to drive the fillets instead by the width of the chord. Let me show you what I mean by that.
I'm going to swap out some fillets here. And yes, completed. And because I created them all at once, they all have equal constraints. So I'll just go through here and get rid of those and I also don't need the radius value.
The next step for me is to come in with 'L' for 'Line', 'Q' for 'Construction', and I will create a chord across each one of these fillets. We're going to do is we're going to set the chord link to equal and what that will do is force the fillets to visually resemble each other more even though the radii can vary more wildly. [Phonetic 05:06]
Last thing I'm going to do is drive these by the dimension of the chord. You can see how even though the radii here are very different; visually you get a more unified look.
When working with rotationally symmetric objects, it's really helpful to be able to use a diametric dimension. However, if I am working with a closed region which you need to, for the revolve feature, then if I come and grab this, I am just getting the length dimension I'm which it represents the radius of my revolved part.
So, if I want to get the diametric dimension, I need a construction line. But if I come in and add that, I am able to get a dimension-- If I drag it on the other side of my centerline, I can get that dimension.
But then my revolve feature will fail. The nice thing is if you convert back to a normal geometry, you can keep your dimension, so this is something I find myself doing frequently is I'll convert my centerline to construction just to add dimensions and then convert back.
When mirroring in a sketch. It's typical to use construction geometry, I've just hit 'L' and 'Q' to create a construction line. And then you'll grab your mirror, grab your mirror line first and then your objects to mirror across the line.
But one way that I actually really like to work with mirrors whenever possible, is to reference the cardinal planes because they were more stable reference and it keeps my sketch tidier. If you grab the mirror tool, and then come over to your feature tree and grab the right plane-- If you grab the plane first it works. Deselect and reselect, the mirror tool, grab the front plane and box select my objects. And I've just mirrored across the planes in my studio, which is going to be more stable reference for future modeling.
Speaking of making stable sketch references, I always prefer whenever possible to reference;
First the cardinal planes because they know they'll never change.
But a second choice would be to reference a face instead of an edge or a point, it's going to be more stable, because endpoints are defined as the intersection of faces.
For example, I can grab this point and this face and hit the ‘I’ key for a [unintelligible 07:07] I can also grab this edge in this face, to make it coincident. And for example, I will grab a Pierce constraint and reference that edge, which is not what I would typically prefer.
To finish off our rooftop, I'll just make these equal, which I know will also happen to make them symmetrical, then I'll extrude with Shift-E. Complete it. And you can see that it works in both sides are the same, even though the constraints used were different. But if I come in here, before this sketch, and I had to fill it to this whole body, the faces are still there, but the edges have been removed. If I roll it to the end, my sketch has an error. And the error is that 'this peers constraint failed'. Because it's looking for an edge that no longer exists. However, all the faces that I picked are still there. So I wouldn't get a failure in that case.
I don't think that's important in creating sketches in Onshape, or any kind of package is to understand what is fully constraining your sketch. And in order to fully constrained sketch, you must relate the sketch to external geometry, whether that be the origin, the coordinate planes, or some other sketch geometry or feature before the sketch.
In order to find external relations in Onshape, you can go show constraints.
And then you'll find every blue constraint is referencing something external. Now, oftentimes, because they are the final thing that locks down the sketch, sometimes you want to get rid of them and kind of retool the sketch a little bit.
So one way that I like to do that is to come up here and grab the Transform Tool, I'll box, select everything, scoot it off to the side, and that will break every sketch constraint that it has to in order to complete the transform while preserving everything else. So my patterns are still here, vertical and horizontal, these internal relations are all still intact. But because all of the blue constraints reference fixed external geometry, it's going to have to break those in order to move that at all. So that's one way to declare bankruptcy on those sketch constraints and start from scratch, this can be a good way also, if your sketch is over constrained and red, and you're not sure why-- I usually try this somewhere in my troubleshooting.
If you aspire to becoming an Onshape power user, and let's be honest, you've made it this far in the video, so I have to assume yes.
Then you should start forcing yourself to use the "S" key to pull up a small menu next to your mouse. And it's just a faster way to get access to the tools that you use frequently.
And this menu can be customized from your user setting. So if there's tools that you use frequently, perhaps the intersection tool here or conics, like me, then it's a much more efficient way than going up and you know, normally you'll see the arc, you'll have to dig down, find the conic and then come up here and for interface, there's no hotkey for conic. So instead, I would simply just access conic.
And there we have a common theme when sketching with conics and splines is that they can be tricky to fully constrain. And it's important to do so if you want your design to be robust. So one trick that I like to use is to throw a lot of construction geometry in there to control it. So "L" for "Line", "Q" is for "Construction" geometry, and I can just connect all of these points with lines. And then that allows me to do things like this, I can set these lines to equal, I can set this to be perpendicular, I can make these points horizontal to each other, I can even set this to be equal. So now this is pretty constrained. And even if I update my design--- Let's see one more thing, I will probably need just to constrain that height. So now even if I change this angle pretty dramatically, we're still getting a pretty nice curve, it's pretty well controlled. And there might be other ways to set it up, that would meet your design intent a little bit better.
Here I have an angle, this is going to be a rotational pattern. I have a number variable that I already set up here, I'm going to do to 360 divided by number. And that will give me a good angle. And then if I do a circular pattern with that, you can see that it has all lined up perfectly.
When offsetting a lot of geometry at one time in a sketch, it can be tricky to pick each individual edge, if I click 'O', and then come around and start grabbing, and that is flip direction, so it does not fail [phonetic 10:56] this can take a while.
So there are two approaches to speed that up:
One is to right click and use the Create switching dialog and tangent connected should work for what I'm doing, I can add that selection and then hit the OK. So that's one way
An even faster way that doesn't work in as many situations is to activate the offset tool and grab this face instead, and hold it and drag. And I just grabbed all the edges, and offset them all at once.
One thing that's unique about the way that Onshape handles sketches is that the regions of the sketch are built right in.
So what I mean by that is I'm sketching on this face. And I have sketched a circle that overlaps the edges of the face. And you can see that I can individually select these regions. And I can grab just that one to extrude. So it can be really quick way instead of converting edges and using the use tool to bring them into your sketch, it just kind of wakes them up automatically, which is usually helpful for things like what I just showed, or you can even do stuff like this, if I create a sketch on this face, and just complete it.
And now I've woken up these edges for these holes, I didn't have to create any sketch geometry. And I can grab these and extrude them. So if this was an important part, for example, and I wanted to cut holes through a part that I was going to mount this to, this might be a clean way to do that.
Now, sometimes you don't want to wake up the entities on a sketch face.
For example, this has a lot of holes, and I don't really need to access each of those individual faces. So if I come in here, and I've created a sketch on there, now when I complete my sketch, and extrude-- I grabbed this to extrude, you'll see that I'm getting all of these holes where that face doesn't quite line up. And I'm getting holes in my part. And that's not what I'm looking for.
One way to work around that is to sketch on a plane that is on that face. To do that, I'm going to go back into the sketch, here's my sketch plane, I don't need that, that's my face.
Instead, I'm going to grab this tool sketch on the 'mate connector', and I can sketch on a "mate connector" that happens to be on that face.
Now, the only region that's available to my sketch is the circle because it's not actually waking up all of these edges.
Working in that way also has a performance benefit. When I right click on the face and hit new sketch, you can see I get a little bit of spinning wheel down here. Now I hit complete, I'll hide [phonetic 13:15] that sketch. And then I'll do another sketch. But I'll sketch on the mate connector instead. That works much faster.
So if I compare here, Sketch-6 took 247 milliseconds and Sketch-7 took 09 milliseconds. So that's about 25 times faster by sketching on a mate connector instead of this face that has all this complex geometry.
Another good reason to sketch on a mate connector instead of on a plane or face is the ability to reorient the X and Y axes of your sketch.
For example, I can put a mate connector here, realign the primary axis to the right, I can move it, I can rotate that. And you'll notice that my mate connector's 'X' direction is pointing this way, the green 'Y' is pointing that way. And so I actually want to clock it so the 'Y' is pointing up. So let's imagine that we wanted to mount this plate at 45 degrees to some other object, this would be a good way to do that. So now I've created a connector, I can come in and create a new sketch on that mate connector. And if I start drawing here, you can see that I'm getting horizontal and vertical relations that are snapping not to the world coordinates but actually to the coordinates of my mate connector. This is also the origin of the sketch. So if I move the mate connector, the components also move, I can show you what that's like. Go into the mate connector, hit final. If I scoot this out 50 millimeters it also scoots my sketch out 50 millimeters. And I can update my rotation and get a different vertical and horizontal axes for my sketch. I can even move it in the 'Z' direction. This is a good way to get a plane with a little bit of an offset from a case without having to create an offset.
Another great reason to sketch on a mate connector is when working with DxFs especially for things like logos. If I hit Shift S again and grab an implicit mate connector I can place one on the middle of this face and import my DxF of our logo.
Now it's going to come in smaller than I want, but there's no problem there, the first dimension that you add to a sketch will scale the entire sketch.
So if I add a dimension here, I want it to be 35 millimeters. And it scales the entire thing about the origin of the sketch. So that's great! I can hit extrude, remove, let's say 1 millimeter. Move a little faster than Onshape here. All right, and we've got our logo. But the thing that's great about that is I didn't dimension anything else. And so I can come in if I want to and update that size, and it's still the first dimension in my sketch. So I can change the size of my logo. Unfortunately, you can't drive that with a variable, the sketch has to be active for it to scale the sketch. And I can also move this around because it sketch on a mate connector not on that face.
So if I move the origin of the mate connector will also move the origin of my sketch, so I could swap it back here instead. I can clock it around, if I want it to face different direction, just complete this thing. And I'm still getting my extrude and it's still working.
Speaking of DxFs, sometimes there are import errors. And you can see that the 'F' here on our logo is not closed. And you can tell that because when it's closed, you get a gray face that looks something like this. And there's not one here.
The way to diagnose this would be to go and find somewhere there is a small hole in the perimeter. And we would have to go through all these points and examine them. But a trick to start to narrow down, so you have smaller place to look is to just start slicing across it. So now you can see that this area is closed, so I don't need to look over there. Let me just see which side of this is closed. Okay, so that's closed. Let me see if I cut this off, okay, so it's not over there.
All right, so now I have just a very small area to begin looking in, it's got to be one of these points here. So I'm just going to zoom in on that area. And there it is, there's my little hole. If I just connect that, I can come back and delete these lines. And I have repaired my DxF. Something else that Onshape can do that other CAD packages can only dream about is the ability to copy and paste entities within a sketch. So if I have entities like this, I'm going to add some constraints so you can see what happens to certain types of constraints. Let's say I have this, I can grab both of these in these entities. And Command C, Command V, simple as that I'm presented with this transform dialog. So that's good. And these are still concentric, because any constraints that are internal to the selection that you make are still going to remain there. But then this constraint here is referencing something outside. So it's broken for that. And this constraint here is also referencing something outside. So it's broken for that. It's going to break all the same relations that would break if you're using the Transform Tool. But this is a really powerful way to duplicate geometry around your part. And it's not just within the same sketch, I still have that on my clipboard. And if I come create a new sketch on this side and hit Command V, I'm getting that same geometry. And if I had dimensioned it by diameter instead, then that would also be fully constrained.
So let's try that. I'll copy this. And if I paste it here, it's going to have those dimensions already on it. And I can even go to a separate document and paste this, this is such a powerful way to work. If you wanted to copy and paste everything inside of an entire sketch, I can also just right click the sketch, copy sketch. And I could paste it on to this face, for example, paste sketch. And now I've got all that there and again, you can paste between documents, between different branches. It's a really powerful way to duplicate geometry and not have to do rework on certain kinds of problems.
That's going to be it for this one folks. Incorporating this stuff in your workflow will help you to build better models faster. If you learn anything new at all please hit Like for me, if you want to see more advanced on shape videos and content like this, subscribe and hit the bell to be notified when I post anything new. And if there's anything that's currently confusing you or tripping you up in Onshape, and you would like to learn more about it. Let me know in the comments and maybe I'll make a video about it in the future. Thanks for watching!