# Outline graphics challenge w/ KiCad’s internal drawing tools

Drawing complex graphics in KiCad has traditionally been seen as difficult if not nearly impossible. But nowadays (in the nightly builds and the forthcoming 5.1) the situation is pretty good. However, it requires knowing and learning some key combinations. I thought I could give you (and especially me!) a challenge: give me a technical drawing describing a non-trivial edge outline which you think would be difficult to draw in KiCad. I will make a video showing how it can be done, hopefully with not too much effort. I won’t of course do all your outlines. Let’s make it so that you, the community, give a couple of propositions and then choose one or two or maybe three of them which I’ll draw.

Of course there are limitations with KiCad’s drawing tools, some things are actually impossible. For example arcs are limited to parts of circle. Some designs should really be done with a dedicated CAD program only and not even tried with KiCad. So here are the rules:

• Accuracy is 0.05mm or larger.
• Arcs are limited to n * 1/4 of a circle.
• Rotation of arcs is limited to n*45 degrees.
• There must be so much dimensions given that I don’t have to calculate much. Forcing to use trigonometric functions is forbidden, simple ± calculations are OK.
• Try not to make it repetitive, so that identical thing (same shape, measurements and angle) doesn’t have to be done twice unless yout think it may enable or require using some special technique.
• Try to make it somewhat realistic as a pcb outline.
• Don’t try to make it impossible on purpose.
• It must be a continuous non-intersecting polygonal shape + arcs, just like a real pcb outline.
• You may add inner slots if it actually adds something to the challenge.
• Try to keep it so minimal that instead of adding work the sake of it the different challenges of drawing can be shown.
• EDIT: mm only, no inches. Well, OK, some inches thrown in but mm is the main unit.

Because the purpose is to learn, not to earn a price, rules may be bent to one direction or another. I may take another challenge with more relaxed rules later if this goes well.

EDIT: As far as I can see these rules make it possible to draw a strictly continuous outline without rounding errors or need to accept near coordinates or dimensions.

I’ll use the official development code on Linux. I use key-mon to display key and mouse button presses so that you can see how I do it.

3 Likes

I did this one once. My goal as to use as much as area as possible of the enclosure, so I cut the two plastic screw house in the middle and made my PCB to full contour the side supports of the enclosure. There are no dimensions for that small side supports on the draw.
It was a bit difficult the use of arcs to draw that outline shape.

The rightmost corner of the photo seems to be more complicated. Can you give a dimensioned drawing of it which fullfills the rules?

If these are violated this would still be interesting for the possible second round.

EDIT: sorry, you already said: “There are no dimensions for that small side supports on the draw.” It’s too easy if I can come up with my own

Even hand drawn picture is enough as long as it is clear and there are no geometric inconsistencies.

yeah I mean it not as a proposal but just as an hard example.
I don’t remember how I did it at the time, but as there was no dimensions on that parts, I guess I made some decal ( bitmap to layer? ) and placed it on PCBnew with correct scale and just try to avoid the corners a bit…
This may be another idea for a tutorial, adding a reference and draw it directly over kicad…

1 Like

If you want a real-world example of a tricky outline, check the Hammond handheld boxes. (Someone here on this forum not to long ago was having issues with just this odd shape. I’m not bothering to look up the thread though). Here is the product page:
http://hammondmfg.com/1553T.htm

Scroll down about mid-way and you should find a table where Hammond kindly provides board outline drawings. The PDF drawings (well, I only looked at the first one) aren’t fully dimensioned though. Many of the trickier arcs in the perimeter don’t have dimensions. So, maybe a better example for a tutorial would be their regular rectangular boxes that have notches cut out for the lid fastening screw bosses.

I have to say, some of your rules are (IMHO) too big of simplifications based on what is availble in the real world. Like your restriction to mm only… That is probably ok for most drawings, but I’ve seen enough drawings in inches only that negate that. Or even a drawing in mm, but hole callouts for non-metric drills (like #6 machine screw clearance hole, that implies an imperial diameter for the screw). But, the are your rules.

It’s an intentional simplification because the drawings are meant to be just demonstrations for what can (or can’t) be done with KiCad’s drawing tools. As I said, if the first one goes well there may be another round with more relaxed rules.

For complex pcb shapes, it is easier to design the edge in a mechanical sw.
It could be Librecad for DXF or FreeCAD for a better collaboration through StepUp

In FreeCAD, if you have the 3D model of the box, you can even design your pcb from it …

3 Likes

Yes, as I said: “Some designs should really be done with a dedicated CAD program only and not even tried with KiCad.” But I would like to keep this thread for showing how to use the KiCad’s own drawing tools. I appreciate StepUp very much and have even used it for some 3D work, it’s a very important contribution for KiCad users. Sometimes it would just be more handy to do things in KiCad, however people don’t necessarily know how to do it even if it were reasonably easy.

Maybe you should start off with an example that you think many would shy away from?

1 Like

I thought it would be your contribution to this challenge

As far as the rules go, I said they can be bent a bit, so if someone has a dimensioned drawing already I could try it. I just don’t want it to be a calculation or repetition exercise for me. I guess throwing in some inches is also OK if it’s mainly mm otherwise, at least it would show how KiCad can handle that. Basically the units could be anything and numbers handled as just numbers if only one unit is used, but I use and happen to like mm.

Many of us have done boards that fit into irregular spaces within custom enclosures, often an “L” or “U” shaped board, or one that wraps around some other object within an enclosure. But the situation described by @kammutierspule is probably quite common, and forms the basis for an effective tutorial (or FAQ page) because the full documentation is readily available. (At least, we hope the enclosure manufacturer made it available.)

Consider, for example, the Takachi WH145-33-M3 hand-held enclosure.

It actually has two places where a PCB can be mounted. They suggest this outline for the larger board:

And this shape for the smaller board:

The two boards are probably the same degree of difficulty as far as drafting in KiCAD, although the larger board appears much more intimidating simply because it has more lines, arcs, holes, etc. Here’s Takachi’s current drawing for the entire enclosure.
wh145-33-m3.pdf (354.7 KB)

Is this a suitable submission for the Challenge? (If I drafted the larger board, I would probably try to claim more acreage by hugging the case assembly screw towers more closely, reducing the length of the 59mm notch to 9mm or 10mm. And I’d round over all of the outside corners to reduce the possibility of laceration when handling the board during assembly or installation - probably 1.0mm or 1.5mm radius.)

This is about as simple as a board gets for mounting inside a contemporary commercial enclosure. (Well, you can always throw away a lot of acreage by finding the largest rectangle that completely avoids all the screw towers, reinforcing ribs, curved sides, etc. And anybody who opens the enclosure will immediately point out “all the wasted space”.) A more typical example is the Polycase VM-24 enclosure:

Polycase is proud of their enclosures’ “curvaceousness” . Here’s their suggested outline for a PCB:

It looks like a junior engineer had fun showing off what he could do with the mechanical CAD program. The outline is MUCH too complex to be replicated parametrically; the only practical approach is to open it in a mechanical CAD program, spend half a day deleting unnecessary information, and import the result into KiCAD as a *.dxf file.

Dale

2 Likes

For example arcs are limited to parts of circle.

That’s ok, as simple ARCs are usually parts of a circle
but then…

• Arcs are limited to n * 1/4 of a circle.
• Rotation of arcs is limited to n*45 degrees.

Why impose this limitation ? You can draw an arc now, without that MOD 90 degree constraint ?

There are plenty of PCBs that are ‘parts of circles’ that are not 90/180/270 degrees.
We did one once for a pressure sensor, that was just over 300 degrees of arc - ie a circle, with a track exit web.

Another example is posted above.

Reading this thread I wonder if a better approach would be to have people submit challenging / popular case designs and then publish the finished PCB outlines as open source templates for KiCAD.

GitHub fame is calling you @eelik

Purple OSH Park boards for STEM classes.

Three of the dinky (left) wing designs were fabricated with OSH Park, and I just wanted a little more value for the area purchased.

NOTE: I do not recommend anyone else attempt to do this within KiCad at this time. I did it because I frequently do not follow my own advice.

Apparently people don’t understand my purpose. It’s NOT to show how to draw in KiCad such a design which probably should be done in a real CAD program. The purpose is to show how to use KiCad’s own drawing abilities in simple and semi-simple cases productively.

This specific limitation comes from the fact that if arcs aren’t limited in any way then it may become impossible to follow the dimensions exactly or without rounding errors, or there might be small gaps in the outline. I just want “pure” cases first.

Really, can’t you people just try to understand? I don’t have much motivation for this anymore…

The purpose wasn’t to give ready made outlines, but to show how they would be done, i.e. show how KiCad’s editing tools can be used. The actual finished outline isn’t important.

I think I understand, and I think the idea has merit as a tutorial or FAQ page. I posted two outlines that seem to satisfy your conditions.

Dale

You’re right, they are feasible, and I already took a look.

Rather than throw your toys, perhaps you should have been clearer in the first case ?

I was not sure if your rule was imposed by KiCad’s new feature, but it seems it was a strange rule made up by yourself ? Might as well say even number mm only ?

No one will mind rounding errors, and if gaps are a problem, then it is important to know that.

A smarter question now is :
Can you actually create (without imposing your own arbitrary rules) all the outlines others have provided above, using the new features in KiCad ?

In one case, the way the ARC is specified, it looks like it would be a simplest to first draw a straight edge and then use some ‘add arc’ that can accept a radius, and a direction ?
Do the new features you mention allow that pathway for arc create/edit ?

Yes. On the other hand, it’s very difficult to foresee how people will understand and what you should say. Especially in internet.

I thought at least that was clear enough by now, that it’s not feasible to try anything or everything with KiCad.

There’s nothing radical new in the latest KiCad code, I’m not even sure what’s new after 5.0. But I think many don’t yet know even all possibilities or small tricks with 5.0.