Skip to content

CIF box positions are incorrect when a rotation is specified? #305

@jhunacek

Description

@jhunacek

I am having some trouble importing what I believe is valid CIF data into KLayout 0.25.9 (Ubuntu 18.04). I have written a simplified test case below that demonstrates the behavior. It seems boxes drawn with a rotation vector specified have their offsets scaled in a strange manner. I was expecting rotated boxes to be centered on the same point as non-rotated boxes when the same position is specified (I haven't found anything in the spec that disagrees with this). When importing into L-Edit (without the comments which don't seem to be supported there), this CIF data behaves as I expected.

DS 1 10 1;
9 test;
L TEST;

(Origin marker)
B 1 1 0,0;

(Draw two offset boxes without rotation)
B 10 1 20,-10;
B 10 1 20,10;

(Try drawing the same boxes with rotation)
(They appear nearly centered on the origin in Klayout, the offset is wrong?)
B 10 1 20,-10 5,-2;
B 10 1 20,10 5,2;

(If I scale the position by 10x the scale, then it appears where I expected it)
B 5 1 2000,-1000 5,-2;
B 5 1 2000,1000 5,2;

DF;
E

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions