Author Topic: Am I holding it wrong? (Parts moving off grid)  (Read 1318 times)

0 Members and 1 Guest are viewing this topic.

Offline ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 6921
  • Country: de
Am I holding it wrong? (Parts moving off grid)
« on: November 10, 2022, 07:43:04 am »
When placing and routing in PCBnew, I typically apply a 0.1" or 0.05" grid consistently. Nevertheless, I sometimes run into a situation where I "suddenly" find a group of components sitting at off-grid positions.

I have not been able to reproduce this in a controlled way, but have a hunch that it might happen after I move a group of components with the mouse. Is there something I need to observe (or avoid) to make sure that moves always place all components on the grid again?
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11705
  • Country: us
    • Personal site
Re: Am I holding it wrong? (Parts moving off grid)
« Reply #1 on: November 10, 2022, 08:10:14 am »
If you move a group of components and one or a few are already not aligned, then if your mouse is over that component, it would be aligned, but the rest would become misaligned.

This happens if you have "Wrap mouse to origins of moved objects" enabled.

Why things get misaligned in a first place - hard to tell. May be you used finer grid at the beginning or something like this.

Another options is that if you move the component by one of the pads, then with the options above, the pad would be snapped to the grid, not the component center.
Alex
 
The following users thanked this post: xerbo

Offline ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 6921
  • Country: de
Re: Am I holding it wrong? (Parts moving off grid)
« Reply #2 on: November 10, 2022, 08:59:06 am »
Thanks, ataradov. All the components in the misaligned group seem to be at "clean" grid distances relative to each other. I can repair the misalignment by selecting the group again, and doing a "Special Tools - Move Exactly" operation by the correct (odd) distance; then everything is back on grid. So I don't think the problem lies in one or some of the components being off-grid before the initial move operation.

I am wondering whether it is possible to "grab" the selected group in an unfortunate way when I move it? Maybe such that e.g. a single pad becomes the anchor which is then placed on the grid?
 
The following users thanked this post: Miti

Offline bpiphany

  • Regular Contributor
  • *
  • Posts: 133
  • Country: se
Re: Am I holding it wrong? (Parts moving off grid)
« Reply #3 on: November 10, 2022, 09:21:26 am »
I find that "snapping" doesn't always work like I expect. It feels like sometimes there are snap features that are included that I don't fully understand where they come from. Perhaps bugs, perhaps it's a RTFM issue...

It is also possible to grab footprints by other features than their origin, pads and other items. Some days I seem to have more issues with it than others, but on the whole it doesn't bother me too much. I sometimes accidentally hit shortcut keys (I have no idea about) that changes the grid spacing or origin. Every day is full of little surprises =D
 

Online Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3806
  • Country: nl
Re: Am I holding it wrong? (Parts moving off grid)
« Reply #4 on: November 10, 2022, 12:29:03 pm »
When you move a footprint, the snap point can be a pad of that footprint, or the center of a footprint. (and possibly some other snap points as well)

If you want to make a row of resistors, and select some by a pad, and some by their center, they will not line up.

About the grid...
PCB Editor / Preferences / Preferences / Hotkeys and then do a search for "grid" shows (among other things) the Z and S shortcut keys for resetting and setting the grid origin. If you hit these keys accidentally you can also easily introduce misalignments.

The N shortcut key gets you to the "next grid" (which usually is smaller), while [Shift + N] goes back in the other direction.

KiCad has many shortcuts and hitting the keyboard accidentally can do weird things if you're not aware of their function.
« Last Edit: November 10, 2022, 12:36:55 pm by Doctorandus_P »
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11705
  • Country: us
    • Personal site
Re: Am I holding it wrong? (Parts moving off grid)
« Reply #5 on: November 10, 2022, 05:21:13 pm »
I am wondering whether it is possible to "grab" the selected group in an unfortunate way when I move it? Maybe such that e.g. a single pad becomes the anchor which is then placed on the grid?
Yes, the same thing applies. I could easily reproduce it. If you have a group selected, then move it by one of the pads of one of the components in the group, it would center the pad on the grid, misaligning everything else.

And while this is useful sometimes, more often than not I find this not helpful. It would be great to be able to select the snap points.
Alex
 
The following users thanked this post: ebastler, xerbo

Offline ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 6921
  • Country: de
Re: Am I holding it wrong? (Parts moving off grid)
« Reply #6 on: November 10, 2022, 08:01:03 pm »
Many thanks for checking! Yes, that must be what I got wrong -- not sure why I could not force the issue when I tried. So I was indeed "holding it wrong", as I had suspected...

I agree, the ability to grab individual sub-items when moving a group of components is a somewhat unfortunate design decision in KiCad. Situations where it is useful should be quite rare, while using it unintentionally and messing things up is rather easy (at least for me  ::)).
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11705
  • Country: us
    • Personal site
Re: Am I holding it wrong? (Parts moving off grid)
« Reply #7 on: November 10, 2022, 08:14:27 pm »
I don't think it is intentional behaviour, it is just an oversight. The wrap to origin feature is relatively new. Before that no matter where you grab, you would move in grid increments, so grab point did not matter.

Ideally it would be like a Ctrl/Alt/Shift modifier. So you can pick what to do for each operation.
Alex
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf