Rotation, dev clarification, please

Hi, fairly simple question.

It up is 0 degrees, in kicad, rotating that 90* clockwise is recorded as - 90*, and 90* counter-clockwise is 90*.

Everything I’ve looked at says this is the case, but it’s the reverse of everything else I’ve ever seen.

Am I missing something?

My construction CAD software has this option
image
This link has an explanation Clockwise and Counterclockwise

As far as I can see vector going L-R is 0°, and rotating it anti-clockwise increases the angle. Pretty standard coordinate system.

Sorry, I mean when footprints are rotated.
It looks like kicad records:

          0
    90        -90
         180

I guess I expected compass directions.

0° is the original posture of the footprint, whatever that is. For resistors it seems to be horizontal, for ICs it seems to be vertical with pin/pad 1 at top left. Rotations are then relative to that, positive for anti-clockwise.

2 Likes

Right. That last sentence is the confirmation I needed.

I usually work with GIS (maps) . Understandably they use compass directions.

I’d say how it exists in the library.

I think the rotation angle shows the position of the rest of the footprint with respect to the anchor or pin 1.
eg. Rotate something anticlockwise and pin 2 will be +90 deg. (above or to the right) of pin 1
Rotate something clockwise and pin 2 will be -90 deg. (below or to the left) of pin 1.

You can always flip the board to view like a compass. :smiley:

Unfortunately this “rule” doesn’t work for this component:

image

It’s a barrel socket, but it’s been rotated 180°,

Then there are things that don’t have pins or pads:

image

It’s a KiCad logo on B.SilkS, so it’s rotated 180°,

I never paid any attention to the rotation attribute of on-board footprints before this post. I just rotate things to suit the layout. But the rotation convention is that used in mathematics, science, and engineering.

That must be the library’s fault. It couldn’t be mine. :smiley:
The same problem would occur if pin1 was at the bottom when rotation was zero.

The polar coordinate system works on 4 quadrants. It is good.
Kicad footprint position works on two half circles. I’ll reserve my opinion on this.

1 Like

I often rotate things like batteries more than 360°. You have to wind them up to put energy in, don’t you know? But rotate them the wrong way and you’ll end up discharging them. :rofl:

It’s from the Center of the model in model space.
The big cross is the Center (0,0) of the model. Many are centered on pin1, many are on the centroid, but they can be anywhere, even outside of the model - which makes rotation a chore.
It also gives you a hint how to fix it if you don’t like it.

What I was expecting it that 270* (Ie West) on a compass would be 270* or -90* in the data.

It’s not. It’s +90.
90* (east) by the compass is -90* (270 is converted automatically on import to +90.

Anyway, I hope that explains my confusion.

I wrote above: “You can always flip the board to view like a compass”.

Not when I’m generating footprints from text files I can’t :wink:

1 Like

I didn’t know that geographers are against mathematicians.

May be the interpretation is not that when you are going to the West your direction is 270° but North is than directed to 270° regarding your direction :slight_smile:

I never understood why. They’ve learned mathematics before they invented the compass i guess, so why the opposite direction? Before I die I must find the reason :slightly_smiling_face:
But KiCad also is. Positive Y goes downwards… :wink:

Iirc it was the phoenecians who used base 60 math, and defined the 60 minutes/seconds, and 360* in a circle.

60 divides by 2,3,4,5,6,10,12,15,20,30 which makes it a very useful number for many things - and is probably why it was universally adopted and kept for time. 360 has all those and more.

This can be selected in Preferences. It goes back to display terminals. Line 1 was at the top, line 24 at the bottom. Later on raster displays and laser printers put the origin at the top left of the page.

Sumerians according to Wikipedia. Fortunately 60 fits nicely inside 6 bits or 4 trits.

1 Like

Not ‘is’ but ‘was’.
It is not KiCad against mathematicians but classical monitor coordinate system against them.
I think it is because when TV was invented it draw line by line starting from top of screen what suggests that inventors were struggling with math.

1 Like

No.

The TV inventors followed the layout of the books written about maths.
Start at top left, read across, retrace to left, drop to next line, read across, etc. :grinning: :grinning: :grinning: