Avoid via in pad

Using Kicad 8, what would be the best way to avoid placing via on SMD pads? Is it possible to make the online-DRC prohibit placing vias in pads? I came accross custom DRC rules but can’t figure out how to write a rule that does that for me.

Thanks for the fast reply!
For the DRC check I manually start in a late layout phase this worked perfectly.
Is there a way, this rule could also be applied to the online DRC?

What is:

KiCad does not use misty cloud services, except for areas where this makes sense (this forum. collaboration among developers etc).

The custom rules are always applied, both during drawing / modifying the PCB and during verification with PCB Editor / Inspect / Design Rules Checker (if that is what you mean).

Sorry, I assume online drc is some kind of marketing name for a DRC feature of another EDA suite…
And yes, not using cloud services is one of the reasons Iprefer KiCAD :slight_smile:

What I meant was a DRC that is checked during drawing. I have configured the rule you suggested, but I am still able to place vias inside pads as I draw. It would be great if the rule could prevent me from doing that. Should this actually be happening?

I have only little experience with custom rules, and I’m not sure whether they are intended to be applied during the first routing of tracks. But I have seen them being applied during shoving tracks with the interactive router. This does appear to be a buggy area in KiCad. Apparently it’s a bit of a hit or miss at the moment, but the final DRC check is quite reliable.

The closest existing issue I could quickly find for the “online” DRC equivalent is here:

and maybe here:

But I’d argue neither of these is exactly the situation you are in with placing vias. If you want, you can make a new issue with KiCad > About KiCad > Report a bug. Putting together a minimal example with just the rule and an example PCB will make your issue much easier to replicate.

If you have the time/energy, you might also try out the v8.99 nightly with your same rules and setup to see if it has already been implemented (definitely back up your work, you can’t go back to v8 if you save the project in v8.99).

I confirm the rules doesn’t work on the fly. That’s strange because according to my memory (which may fail) this used to work. It prevented accidental “jumps” when pushing a track which pushes the via which snaps to the middle of a pad.

Thanks for your replies. Now that we have more confidence that this might actually be a bug, I have created an issue: