aypac / gdslatexconverter Goto Github PK
View Code? Open in Web Editor NEWConversion of gdsII files / gdspy libraries to latex (and subsequent svg and pdf)
Conversion of gdsII files / gdspy libraries to latex (and subsequent svg and pdf)
Right now a layer is plotted as just a gray (black!20) outline if no style is specified.
Maybe provide a few nice default schemes to choose from. Maybe solve this together with #6 .
see title
Right now, the tests are passing, although the latex is not installed. Prepare some proper tests, either with running the latex or by just checking the output.
The converter does not work with gdspy version 1.4. Switching back to version 1.3.2 resolved the issue.
title says it all
Would be great to move to static typing. https://mypy.readthedocs.io/en/stable/getting_started.html
Make it possible to plot the same layer twice.
This should be pretty easy by changing the last few lines of the parse
-function. We would have to allow for the layer_order
to be a dict then that relates a layer name to a layer id. layer_drawopt
and layer_drawcolor
need to use the name as a key then.
If using larger designs you might run into the [...] TeX capacity exceeded, sorry [main memory size=xxx].
error.
Quickfix:
Find the latex config file kpsewhich -a texmf.cnf
and modify the memory size by including/changing the value of, e.g. : main_memory = 3000000
(see comments in texmf.cnf file for more details.) Then run the following command as root to recreate the format files: fmtutil-sys --all
(Taken from: https://tex.stackexchange.com/questions/7953/how-to-expand-texs-main-memory-size-pgfplots-memory-overload )
Long-Term fix:
This can theoretically prevented by rendering each layer individually, using:
\usetikzlibrary{external}
\tikzexternalize`
and use a separate tikz-environment. I have not solved how to make the layers overlap perfectly then (especially taking into account, that they might have different sizes), but this should be solvable.
i.e. make fields scale, layer_drawcolor, layer_drawopt, and layer_order properly settable and delete _latex field to enforce new parsing.
Find a way to detect simple circles and replace those polygons with the according TikZ command.
If the gds is created directly by gdspy commands one can detect the use of the Round class and use the original creation parameters ( see heitzmann/gdspy#51 ).
from the gdspy docs:
Examples
--------
>>> circle = gdspy.Round((30, 5), 8)
>>> ring = gdspy.Round((50, 5), 8, inner_radius=5)
>>> pie_slice = gdspy.Round((30, 25), 8, initial_angle=0,
... final_angle=-5.0*numpy.pi/6.0)
>>> arc = gdspy.Round((50, 25), 8, inner_radius=5,
... initial_angle=-5.0*numpy.pi/6.0,
... final_angle=0)
(From discussions with Marc)
If loaded from a file, one can test each polygon if it is a circle, arc, pie slice, ring or ring slice:
For each polygon in a polygon set (with 2 or less polygons):
go over each polygon and calculate the distance between neighbouring points
If they are all equal (enough):
it is a circle
elif they are all equal (enough), except for one:
it is an arc
Some more thoughts:
Each cells name is converted to be Tex-compatible. Right now, all non '\w' characters are removed and all spaced replaced by and underscore. To prevent duplicate names, we include a hash of the original name at the end of each name.
Find a good way to access the version number from the main file. It is important to only keep one central record of the version number.
See todo inside the file
A new gdspy has been released. Does it make sense to switch to that new version?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.