How to get the exact board area?

JLCPCB has a limit for free drill holes / board area. I’m about to write a plugin to check that, just for me.
Everything works fine on first attempt, installing the plugin including the icon and all.

Sooooo, how do I get the effective board area?

GetBoardEdgesBoundingBox() obviously is too large in most cases, unless the board is an exact rectangle.

I am aware of the API docs, but after spending considerable amount of time there, I still am lost.

Thx

board.GetBoardPolygonOutlines() will return the outline in a SHAPE_POLY_SET. Then you need to go through each outline and add the Area() of the outline and subtract the holes

1 Like

Thanks for the quick reply.

FWIW: I asked JLCPCB whether the mean the exact area or the enclosing rectangle, but that put them into a spastic state :stuck_out_tongue_winking_eye: .
Turns out for prototype boards the limit is 4000 drills per board/panel.
A limit of 100.000 drills per m2 applies for volume production and it is still unclear what that “m2” refers to.
Anyways, for my 5 boards with 500 drill each I am fine :slight_smile: .
Writing the plugin anyways as I already started it…

Probably refers to square meter

LOOOL. Thanks for taking me for a moron, but this much I know. :rofl:
No problem.

But is unclear whether they mean the area of the bounding box or the effective board area.

Continuing with the jokes, if it is not an exact rectangle it is not a rectangle :wink:

1 Like

Touché…
Padding for the forum SW

It’s a rough assumption, but I assume that if the PCB is not rectangular, you still pay for a rectangular bounding box around the PCB, and the hole density is based on that.

You can (sort of) check if this assumption is right, by divinding the 1e5k holes per square meter by 4000, and then check if it fits with the PCB area of your board/panel.

But what does extra holes cost? Is it worth fussing about?

That’s what I assume, too.

The whole thing is only for small batches. For (my) prototype boards a limit of 4000 drills per board/panel applies according to JLCPCB. That’s enough for most boards.
As for cost: exceeding the limit for small batches costs at least $15. For, say, 1000 boards that is obviously nil.

Bottom line: I just took the issue as a trigger to write my first plugin.

All good and case closed (from my side).

2 Likes

FYI… You can get the Board’s Area from ‘Inspect> Show Board Statistics’ and, it has a CheckBox to Subtract the Hole’s area…

Screen Shot 2022-08-04 at 12.51.08 PM

Yes, it’s there, but the board area doesn’t change when you click it ON. Nor does it change the next time you open that dialog box.

This I know. I do some calculations based on the area so visuals do not help a lot.
Thx anyways.

It works for me…

PCB area