Lining up holes

I’m currently trying to CAD an electronics board onto a robot frame in Solidworks. How can I line up screw holes on the board’s sketch with the holes on the frame in order to make things line up? I’ve tried using the Evaluate tool to match distances to a ridiculous amount of significant figures, but that takes far longer than I would like. Is there any tool built in to Solidworks that I can use for this?

In Inventor, you can constrain the two axis. It will snap them right together. I’d assume Solidworks has a similar ability in their constrain function.

Solidworks lets you create a part in the context of an assembly, and use assembly geometry (i.e., the robot frame) to constrain parts of your sketch (holes for the electronics board). This has the added advantage that the mounting holes will update if you change the holes in the frame.
Take a look here:

Also, it’s not always necessary that your holes perfectly line up. You could easily measure the distance within 0.01 inch, and just use different constraints (like a parallel or flush constraint on the edges of things) to position it, rather than two hole-hole constraints. This isn’t as elegant, but it’s often just as effective.

You can mate the inner faces of the holes together. Select ‘mate’ in the assembly tab, select the inside face of one of the two holes (board or frame), then select the other inner face. Select concentric if it doesn’t automatically. Then click the checkmark.

If you do this for two of the holes, then the part should be in the right place (provided the holes are made to line up correctly).

Yeah, but then you have external references. These can be an absolute nightmare. I would STRONGLY recommend against FRC teams doing anything with external references as new CAD users are great at applying them in a way that causes your models to blow up whenever you make changes to them.

If I am reading correctly OP wants to match the holes in the base plate to the holes in the robot frame, to mount the base plate. This is super simple. There should be no reason they are a 10 place decimal as OP is in charge of where the holes in the frame are relative to the end of the frame rail.

Just set a nice even distance between holes and then dimension the whole pattern from the end of the frame, or the centerline, or whatever reference point seems most appropriate for how the part will be made. At most you should have one dimension that is not a nice round number if you do it this way (distance of the hole pattern from the end of the tube, if you center the pattern on the tube).

Then you go into your base plate and you do the exact same thing. Assuming your base plate is flush with the end of the frame, dimensioning is trivial, you just copy all the geometry from the frame itself. If it’s inset from the end of the frame it’s nearly as easy. just measure the offset and modify the pattern spacing from the edge accordingly.

If OP is referring to placing holes for the electronics components themselves, if you’re getting a 10 place decimal for the center-center distance of a pair of holes it’s likely a metric number. just input it in mm.

1 Like

I had to deal with a combination of customary and metric resulting from metric bearings this year (which could have been dealt with via x in + y mm, sure), so I just edited in the context of an assembly and manually removed external references after the fact. There’s probably a better way to do that, I’m sure.

Some of the electronics CADs aren’t very fun and give weird numbers. I use a single concentric mate, then an angular or parallel mate on a side edge of the part to make the part constrained.

I make an extra sketch in the part with just the holes and copy the sketch (via the FeatureTree) into whatever part needs the holes.

Also if you want any sort of version control, external references can change things without you knowing (maybe you forgot that something had an external reference or is being referenced when you update one part).

What I do at work when I want to transfer holes from one part to another, is I create a part in the context of the assembly (or just edit the part in the context if I already have a part made), then select “no external references” (top-left next to “Edit Component” in the main toolbar under the “Sketch” tab.

You can snap things to other parts without constraining them. The relation will be shown as a white square instead of a yellow square, which means that it is not a constraint, just a snap.

Once you have all of the holes where you want, you can open the part and add dimensions to the holes you just made