GithubHelp home page GithubHelp logo

Comments (6)

heitzmann avatar heitzmann commented on May 23, 2024 1

@mujingfatasy This seems to be a problem with the global library maintained internally (used in early versions of gdspy).
You can try to set gdspy.library.use_current_library = False right after importing gdspy to fix the issue.

from gdspy.

mujingfatasy avatar mujingfatasy commented on May 23, 2024

by the mean, the version of gdspy I used is 1.6.12

from gdspy.

tvt173 avatar tvt173 commented on May 23, 2024

yeah, I'd agree that seems to be a bug. it should be fixed though (and better practice) if you first instantiate a new library and add your cell to that, rather than using gdspy.current_library directly (which it seems you are doing)

for example

lib = gdspy.Library(name="mylibrary")
lib.new_cell(name)

from gdspy.

mujingfatasy avatar mujingfatasy commented on May 23, 2024

OK, thanks a lot, but it seems that I was doing the same way as your recommendation,here is my source code :
lib=gdspy.GdsLibrary(name="stacked_balun")
turn1=lib.new_cell("turn1")
gdspy.current_library seems to be called by “ init ” function of Cell class which is called by lib.new_cell

from gdspy.

tvt173 avatar tvt173 commented on May 23, 2024

hmm, interesting. to be honest, i don't usually use the new_cell function. I would usually create the cell first then add it like lib.add(cell). I would give that a try. if you still get the problem, please share a reproducible example. or try submitting a patch. please by aware that you shouldn't add a cell with the same name twice, due to limitations of the GDSII format.

and if you are just getting started with gdspy, i would consider trying gdstk instead, the successor to this project

from gdspy.

mujingfatasy avatar mujingfatasy commented on May 23, 2024

OK,thanks a lot

from gdspy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.