Screw hole placement

Hi, I’m a new user and I’m trying to layout my first board. It has to fit the dimensions of an existing housing. The PCB is 30x77 mm and has 4 screw holes symmetrically placed 24x71 apart (center-to-center).

I cannot accurately place the screw holes. The board origin was was set to 0,0 in the part Inspector and locked. The first M3 hole origin was set to 3,3 in the part Inspector, which should have worked, but didn’t work because holes are located by their upper left corner not their center. So then I applied an offset equal to the radius but that didn’t work because the origin of the hole is actually the upper left corner of it’s bounding box. I thought I had figured out what the bounding box offset was but it changes when I adjust the holes size.

I have been trying to understand this for half a day and feel I’m missing something because this should be easy. There are other components on my board that must interface with the housing and I don’t think I can properly locate them. What am I doing wrong?

I can see that many people don’t even have screw holes on their because they mostly do bench top prototyping and all they need is for the header pins to be on 0.1" centers. That’s not my situation. I tried to use the ‘ruler’ in the parts bin but it’s difficult to have confidence in the measurements because the holes have no center lines to reference.

Unfortunately I don’t know of an easier way to do this (hopefully you are on Fritizng 1.0.4, as there were bugs in earlier versions that make this even more difficult!) Here I started by setting the pcb origin to 0 0 mm

dragged in 4 holes and left them at 2.2mm (if you need different sizes you need to change them all first to make the origin the same) then set the first one to 2mm x 2mm to offset it from the edge of the board.

then 2mm by 73 (to give 71mm between them)

then 2mm x 23 (which should be 26 to give 24 between them!)

then 73x23 (which again should be 26) to set the last one.

For other parts the rulers (which are capable of 0.1in resolution when zoomed) should be able to get you close enough to an edge of a part. It is a fair pain in the ass but pretty much the only way I know of to do this. Note parts being rotated also changes the bounding box which makes this even more complex. Hope this helps some.

Peter

Thanks for your reply Peter. I was frustrated and in a rush when I posted my request for help so I wasn’t very clear. Sorry about that. See image below for clarification. As you can see hole accurate placement is tricky. Accurate placement of anything is tricky. Could I define my own ‘hole part’ with the origin at the center?

I don’t think with the origin in the center, but I can make a part that has a 3.2mm hole that will be drilled, specifically this part

edit

convert to these parts, 1 2.2mm and one 3.2mm hole

pcb-hole-2_2mm.fzpz (1.2 KB)

pcb-hole-3_2mm.fzpz (1.2 KB)

which looks like this in pcb (the copper color is because Fritzing thinks it is in the copper layers which it is, but it is really a hole)

The origin is still top left because that is the part origin but the bounding box is the size of the hole so by manipulating the coords (by adding the offset you want) you should be able to place it where you want and in the gerber output it will be a hole. The gerber output looks like this (displayed by gerbv from the gerber drill and silktop files)

Because this isn’t the core parts pcb hole it won’t change size (you need a new part for each different hole size) but the edge is fixed so it should be able to be accurately placed. Hopefully this will do what you want. Another alternative would be to use the slot code, but that is fairly complex (you need to create a single unified path with the holes positioned where you want them which is not particularly easy) and then load that to be the pcb. I think this part is probably the easier choice but both should work.

Peter

So the bounding box and the hole are the same - 3.2mm square and 3.2mm dia. I can work with that! Thanks Peter.

Can I make one more request? I’m using some M2 fasteners as well, could you make me a 2.2mm hole also?

OK I replaced the part above with 2 new ones, one 2.2mm and one 3.2mm. In Inspector (the lower right window) you can switch between the 2 parts by selecting the size you want from the variant selection and it will swap the parts.

Peter

that’s perfect, thanks Peter!