Coder Social home page Coder Social logo

Comments (9)

heitzmann avatar heitzmann commented on August 19, 2024

Which version of gdspy are you using? I'm guessing 1.2 or latter, because this looks like a precision error.
slice has a keyword argument precision that is set to 0.001 by default, which means all polygon vertices are aligned to a grid with 1e-3 spacing.

Try to run with:

result = gdspy.slice(polylist, (sl), 0, precision=1e-6)

to see if that solves the problem.

from gdspy.

srikanth1986 avatar srikanth1986 commented on August 19, 2024

from gdspy.

heitzmann avatar heitzmann commented on August 19, 2024

Thanks! I missed that in the docs! Fixed in 5ca48f0.

from gdspy.

srikanth1986 avatar srikanth1986 commented on August 19, 2024

from gdspy.

heitzmann avatar heitzmann commented on August 19, 2024

Indeed... that is an artifact of the combined effects of the grid snapping and the way slicing is performed: from left to right, one slice at a time.
To solve the issue I believe the _chop function in the C-extension should perform all chops (from the list of positions in a single run).
I'll reopen the issue until this can be implemented.

from gdspy.

heitzmann avatar heitzmann commented on August 19, 2024

@srikanth1986 I believe changes in af0cbf3 solve this issue. I've tested your example and it works as expected for any precision setting.
Please let me know if you find any other issue.

(update: correct commit)

from gdspy.

srikanth1986 avatar srikanth1986 commented on August 19, 2024

from gdspy.

heitzmann avatar heitzmann commented on August 19, 2024

@srikanth1986 You can get the latest Windows builds from AppVeyor: https://ci.appveyor.com/project/heitzmann/gdspy
Just select the environment corresponding to your python version and platform, then go to the Artifacts tab and download the whl file.

from gdspy.

srikanth1986 avatar srikanth1986 commented on August 19, 2024

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.