Author Topic: Altium, "Align to grid" question  (Read 681 times)

0 Members and 1 Guest are viewing this topic.

Offline incfTopic starter

  • Regular Contributor
  • *
  • Posts: 109
  • Country: us
  • ASCII > UTF8
Altium, "Align to grid" question
« on: January 20, 2025, 11:38:10 pm »
I have an LED and a custom grid for LEDs. (It needs to be offset, so the global grid won't work)

The LED is off grid. I would like to align it to the my custom grid for LEDs.



Unfortunately, when I try to use the align to grid tool. It always uses the global grid (which lacks support for offsets). Even though the global grid is disabled, if the global grid was set to 100x100mm the part would be moved off screen to the nearest global grid coordinate when I click "align to grid".


The exact center of the part it its (0,0)

What are some easy ways to align the part's origin, or the part's center, or some edge of the part with the grid, without manually editing the X/Y coordinates.

(Can scripts align parts to particular grids?)

I feel as though I'd have to first align one LED to the grid by typing in coordinate and then use the align top/left tool to get subsequent LEDs aligned to the grid. (But it is easy to get off grid that way)
« Last Edit: January 20, 2025, 11:44:34 pm by incf »
 

Offline mengfei

  • Regular Contributor
  • *
  • Posts: 229
  • Country: ph
Re: Altium, "Align to grid" question
« Reply #1 on: January 21, 2025, 02:04:50 am »
hmmm strangely I never used Grid to align my parts  ::)

i just used the Align command. if they are equidistant, i just get the first & last footprint then Distribute Horiz or Vert

we just update from 24.3.* to 24.10.1 coz the later had a bug in the Paste Mask adjustments, that could also be a bug. try another version
 

Online thm_w

  • Super Contributor
  • ***
  • Posts: 7655
  • Country: ca
  • Non-expert
Re: Altium, "Align to grid" question
« Reply #2 on: January 21, 2025, 09:39:03 pm »
Works OK for me. Try changing the colors of your custom grid so you can see if its actually where you need it.
Also make sure the Extents is large enough for where you want it.
Double click to edit it in the Grid Manager panel.


Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline incfTopic starter

  • Regular Contributor
  • *
  • Posts: 109
  • Country: us
  • ASCII > UTF8
Re: Altium, "Align to grid" question
« Reply #3 on: January 21, 2025, 10:25:23 pm »
Works OK for me. Try changing the colors of your custom grid so you can see if its actually where you need it.
Also make sure the Extents is large enough for where you want it.
Double click to edit it in the Grid Manager panel.

If I may ask, what version/build of Altium did you test it on? And what exactly did you do to test?

Also, were you about to view the three images embedded in the original post? Your remark grid colors and extents makes me worry that the images might not be visible.

The question is about about the aligning the origin of a part with an custom grid with an offset origin that does not align with the global grid (or some equivalent operation).
« Last Edit: January 21, 2025, 10:39:15 pm by incf »
 

Online thm_w

  • Super Contributor
  • ***
  • Posts: 7655
  • Country: ca
  • Non-expert
Re: Altium, "Align to grid" question
« Reply #4 on: January 22, 2025, 12:12:40 am »
Yes I can see the images.
So you are saying the gray grid visible in the image is your custom grid? See why I ask to change the color, so its obvious which is global grid and which is your custom grid.

Version is 25.1.2

The question is about about the aligning the origin of a part with an custom grid with an offset origin that does not align with the global grid (or some equivalent operation).

Yes that is what Origin setting is for.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline incfTopic starter

  • Regular Contributor
  • *
  • Posts: 109
  • Country: us
  • ASCII > UTF8
Re: Altium, "Align to grid" question
« Reply #5 on: January 22, 2025, 04:08:22 pm »
Yes I can see the images.
So you are saying the gray grid visible in the image is your custom grid? See why I ask to change the color, so its obvious which is global grid and which is your custom grid.

Version is 25.1.2

The question is about about the aligning the origin of a part with an custom grid with an offset origin that does not align with the global grid (or some equivalent operation).

Yes that is what Origin setting is for.

Your remark about the origin settings makes me worry that could possibly be answering a different question that the one I wanted to find the answer to.

Yes, the grey grid is the custom grid. It is the only one enabled, and the global grid is set to 100mm

Did you try the "snap to grid" tool with large grid values like 100mm? (and the custom grid origin not aligned to the global grid)

I worry there is a chance that I might be being misinterpreted.

There are two origins
  • the origin of the custom grid - grid_origin
  • the origin of the LED - led_origin

I want to set led_origin = grid_origin
With grid_origin being some fixed value, and led_origin changing to match what the grid was set to previously.

The snap to grid tool is supposed to move the part origin onto the custom grid, but instead it moves it into the inactive/disabled global grid.
I don't see any way to move the LED onto the custom offset grid without manually editing the X/Y coordinates of at least one LED by hand.
« Last Edit: January 22, 2025, 04:11:31 pm by incf »
 

Offline incfTopic starter

  • Regular Contributor
  • *
  • Posts: 109
  • Country: us
  • ASCII > UTF8
Re: Altium, "Align to grid" question
« Reply #6 on: January 22, 2025, 07:06:49 pm »
I found a workaround for the "align to grid" tool apparently being broken (I would still like help understanding what is going wrong with that tool)

The snap panel (which I totally neglect most of the time) can be configured to permit snapping to component origin. Then the "move" tool can be used to select the component by its origin and then (with the grid enabled) place its origin onto the current grid.

(in the image below the "grids" button would be enabled, snapping set to all layers, and "objects for snapping" be set to "component origins" only)
« Last Edit: January 22, 2025, 07:09:01 pm by incf »
 

Online thm_w

  • Super Contributor
  • ***
  • Posts: 7655
  • Country: ca
  • Non-expert
Re: Altium, "Align to grid" question
« Reply #7 on: January 22, 2025, 09:46:06 pm »
Did you try the "snap to grid" tool with large grid values like 100mm? (and the custom grid origin not aligned to the global grid)

Tried large values, works fine as expected. Custom grid not aligned is exactly what I showed in the screenshot.

The snap panel (which I totally neglect most of the time) can be configured to permit snapping to component origin. Then the "move" tool can be used to select the component by its origin and then (with the grid enabled) place its origin onto the current grid.

Yes the snap panel was shown in the first 5s of the video above.
If you want to snap to part center, then you can use "Footprint origin" and make sure the origin of your LED footprint is in the center.
If you didn't want that for some reason, you could add a cross or dot at part center on another notes/mechnical layer.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf