Comments (5)
@hashhsah Thanks for the suggestion. I've read the reference you've sent, but it does not explicitly define what happens when the absolute flags are not set. When you mention relative mag/rot, how are they applied to the geometry of the referenced cell? That's what is missing and I couldn't find in any other reference so far.
from gdspy.
@heitzmann you could try commenting out these two lines, and see that it still passes all your testcases.
word += 0x0004
...
word += 0x0002
I ran some tests on our project, commenting these two lines actually produces correct result for us, because we only use relative mag/rot.
Admittedly, there are conflicting descriptions on the gds format:
- linkcad correctly says that the two flags marks absolute mag/rot, and should be avoided.
- artwork incorrectly says that angle record should only follow when rotation flag is set.
However, the original GDSII format manual is quite clear about this in page 4-10, and example is given in page 7-5.
from gdspy.
The test cases will not check those flags, so that won't tell us much.
From what you're describing, Gdspy always uses relative mag/rot when importing or displaying, but writes absolutes. Commenting those 2 lines will make it self consistent by supporting only relative transformations.
Would that break the CAD in other tools, such as artwork? Or, more importantly, manufacturing tools (which from my experience always use relative transforms)? In that case, maybe there should be some sort of flag to enable setting those bits even if incorrectly. Thoughts?
from gdspy.
From what you're describing, Gdspy always uses relative mag/rot when importing or displaying, but writes absolutes. Commenting those 2 lines will make it self consistent by supporting only relative transformations.
Yes. I think so too.
Would that break the CAD in other tools
I noticed this issue when the "golden" commercial LVS tool emits the following error message
ERROR: Absolute angle in placement of cell test_cell within cell Array_1 not supported.
I checked a few gds files produced by Klayout, and realized that Klayout only uses relative mag/rot.
In fact, if you prepare a gds file with gdspy, open it in Klayout, and save as a new file, you'll see that Klayout clears the absolute mag/rot flags.
I guess Klayout authors can clarify this matter more clearly.
from gdspy.
I've checked the source of klayout and indeed they support only relative transforms.
We'll do the same in Gdspy (fixed in 8747c08 and 75658c3).
from gdspy.
Related Issues (20)
- RobustPath : Unsupported types for -: 'tuple' and 'tuple' HOT 1
- Use scaling to reduce file size HOT 1
- the direction of polygon in the cellreference is wrong HOT 3
- may be it is a bug for GdsLibrary.new_cell() HOT 6
- 'Cell' object has no attribute 'elements' HOT 1
- gdspy installation in python 3.10. HOT 1
- How can I get the information of the instance?
- Use gdspy in Klayout Macro developement (reopened) HOT 1
- How to read a gds file data and export it as PNG? HOT 1
- gdspy.inside only checks for inside the bbox HOT 1
- GdsLibrary object has no attribute 'cells' HOT 2
- Multiple cells with name: FGCCTE in GDSII file HOT 2
- result of get_bounding_box() for a polygon is wrong HOT 2
- conda install gdspy
- overwrite_duplicate not working with (use_current_library = True) HOT 1
- After gdspy boolean OR operation, help HOT 1
- [0.9.46] Python extension build fails when the PYPI tarball is used HOT 1
- Python tests fail HOT 1
- Merging polygons with gdspy boolean vs Klayout merge produces different results
- [Documentation] What does "intersect, but not cross" mean? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gdspy.