How to fill a path

Help
carlos
2010-07-01
2013-04-24
  • carlos

    carlos - 2010-07-01

    Hello,

    I am using your gdspy python module for a svg 2 gds converter. I was wondering if there is an easy way of controlling if a given shape can be filled or not. I am particularly interested in the path shape that in principle is never filled, unless I did not read carefully enough the documentation.

    many thanks for your help

    Carlos

     
  • Heitzmann

    Heitzmann - 2010-07-01

    Hi Carlos,

    From what I know, the GDSII format does not differentiate between filled or empty elements. It just describes the polygons by their vertices. That's because the GDSII is mainly used for CAD, and when you machine a shape in metal, for example, it's a solid object: it doesn't make sense to think about it without the fill.
    I don't know what exactly your application does, but are you sure you want to use the path class for SVG elements. At first I would think that you would use mostly polygons.

    If you want, post an example of your application and maybe I can help you further.

    Lucas

     
  • carlos

    carlos - 2010-07-02

    Thanks for the prompt reply Lucas,

    Well, many times SVG objects end up being svg-paths. With svg paths you are only able to draw the "contour" of the shape with your python program. An example can be a rectangle with round corners or, even, text. Since svg format is based on xml, it is very easy to write create fancy layouts with software and then, thanks to gdspy, convert to gds to export to other layout editors. Being able to fill those paths would be great.

    Once this is solved, it would also be nice to have some control on how to "connect" the gds segments of a path to improve continuity.

    I can send you examples if you send me your e-mail at carlos.lacasta@gmail.com 

     
  • Simon

    Simon - 2011-08-04

    GDS describes polygons in terms of vertices. Filling closed polygons is more of a task of the tool that uses this data. The way I respect gdspy is that it allows you to read the raw gds data and then do whatever you want with it, such as filling the polygons, which is specific to the tool your read the data into.

     

Log in to post a comment.