Constrain a track horizontally or vertically on PCB Editor

On Kicad 5.x I was able to constrain a track horizontally or vertically when route from a pad. This way I was able to place vias aligned with pads that aren’t on grid.

To achieve this I click Ctrl while routing a track from a pad.

On Kicad 6.x I didn’t find any option to achieve the behavior describe above. The red arrow shows what happens most of the time and the green arrow is what I want to achieve.

EDIT: I found another post about it 90° / Vertical and horizontal only Tracks in 5.99

I think a more important question is: Why do you want to do that?
If you set the grid to something sensible during routing, for example 0.1mm, then the pad will be off by at most 50um.

It’s a psychological thing of wanting to do things “proper” and “neat”, but for the electrons flowing though your PCB it does not matter at all, and the difference is also too small to even see with the naked eye. Even with magnification it will be hard to see when it’s covered with solder mask. It takes mental effort to unlearn these habits and just put the via’s where they land. What you gain from it is that your PCB routing goes a lot faster.

That said, an ugly workaround to achieve this is:

  1. Draw a single track segment from your pad.
  2. Snap a separate via (PCB Editor / Place / Add Vias [Shift+Ctrl+V])
  3. Lock the via in place, or else the PnS router is likely to move it later.

Alternatively, you can set the grid to a smaller value during routing. Very small grids (such as 1um) may have an effect on routing speed, but I have not experimented enough with this to be sure.

Î just test it, I start routing from the pad, then hit ‘v’ to place the via, then I used CTRL and the mouse to position the via were I wanted and click to set it on place.

I the bend of the track is at the pad and you do not want that, you can hit “÷” to change it.

Application: KiCad PCB Editor (64-bit)

Version: (6.0.5-3-gba276fe470), release build

	wxWidgets 3.1.5
	libcurl/7.82.0-DEV Schannel zlib/1.2.12

Platform: Windows 10 (build 19043), 64-bit edition, 64 bit, Little endian, wxMSW

Build Info:
	Date: May  3 2022 05:10:21
	wxWidgets: 3.1.5 (wchar_t,wx containers)
	Boost: 1.79.0
	OCC: 7.6.0
	Curl: 7.82.0-DEV
	ngspice: 36
	Compiler: Visual C++ 1929 without C++ ABI

Build settings:

With the [Ctrl] key you route off-grid which can get you closer, but it won’t eliminate the 45 degree stubs (which is why I did not mention it)

To look nice is the main reason. Is something that I usually did on 5.x when place vias near the pads.

Which confirms my expectations.
What are your thoughs about un learning this habit to speed up the PCB design?
Making it “look nicer” can easily consume many hours which can be used “more productively”.

I find it quite a curious thing of human psychology to gain satisfaction from such completely irrelevant details. If you find it fun to do this, there is of course nothing inherently wrong with it, but it is extremely unlikely that anyone else seeing your end product is going to see or care about the difference.

Also related.
Have you seen the “Melt your circuit boards” video from mitxela?

It’s a beautifully made video chock full with “aesthetic” aspects of PCB’s (Topor is ugly!)

I had a bit of fun with the Round Tracks plugin:

But because supports for arcs in KiCad is very limited I will not use it because it makes modifications more difficult.

Just noticed OP has also created an issue in gitlab for this:

When you place all tracks on the correct grid and use all 90° tracks, you can draw them as close together as possible and you see where additional tracks have space and where not. If you don’t place everything perfectly on the grid, it does not work, suddenly you need 20 µm (or something like that) more than you have and you have to move a dozen tracks all 20 µm away. I design PCB in a way that i place all tracks on a grid where they have exactly the minimum distance between them or so that you can fit exactly n tracks in between, as long as possible. It is much simpler and faster.

If a track is off by 0.1 mm or even 5 µm, it will not work because 5 µm too close is too close.

Does ctrl-/ not do what you want? You can cycle through 45° and 90° constraint and corner and fillet mode.
This way, you can start from a off-grid pad, draw a single segment, this will now be on grid in one axis. Stop track laying mode and place a single via, press ctrl while placing it and it should snap to the end of the track.