mirror of https://github.com/KLayout/klayout.git
Updated doc.
This commit is contained in:
parent
b725f5fb0f
commit
127b520899
|
|
@ -1027,74 +1027,11 @@ The following images show the effect of the extents method:
|
|||
<keyword name="fill"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>layer.fill([ options ])</tt></li>
|
||||
<li><tt>layer.fill_with_left([ options ])</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This method will attempt to fill the polygons of the layer with a regular pattern
|
||||
of shapes.
|
||||
</p><p>
|
||||
The fill function currently is not available in deep mode.
|
||||
</p><p>
|
||||
Options are:
|
||||
<ul>
|
||||
<li><b>hstep(x) </b>or <b>hstep(x, y) </b>: specifies the horizontal step pitch of the pattern. x must be
|
||||
a positive value. A vertical displacement component can be specified too, which results in a skewed pattern. </li>
|
||||
<li><b>vstep(y) </b>or <b>vstep(x, y) </b>: specifies the vertical step pitch of the pattern. y must be
|
||||
a positive value. A horizontal displacement component can be specified too, which results in a skewed pattern. </li>
|
||||
<li><b>origin(x, y) </b>: specifies a fixed point to align the pattern with. This point specifies the location
|
||||
of the reference point for one pattern cell. </li>
|
||||
<li><b>auto_origin </b>: lets the algorithm choose the origin. This may result is a slightly better fill coverage
|
||||
as the algorithm is able to determine a pattern origin per fill island. </li>
|
||||
<li><b>fill_pattern(..) </b>: specifies the fill pattern. </li>
|
||||
</ul>
|
||||
</p><p>
|
||||
"fill_pattern" generates a fill pattern object. This object is used for configuring the fill pattern
|
||||
content. Fill pattern need to be named. The name will be used for generating the fill cell.
|
||||
</p><p>
|
||||
To provide a fill pattern, create a fill pattern object and add shapes to it. The following example creates
|
||||
a fill pattern named "FILL_CELL" and adds a 1x1 micron box on layer 1/0:
|
||||
</p><p>
|
||||
<pre>
|
||||
p = fill_pattern("FILL_CELL")
|
||||
p.shape(1, 0, box(0.0, 0.0, 1.0, 1.0))
|
||||
</pre>
|
||||
</p><p>
|
||||
See <a href="/about/drc_ref_global.xml#box">box</a> for details about the box specification. You can also add paths or polygons with <a href="/about/drc_ref_global.xml#path">path</a> or <a href="/about/drc_ref_global.xml#polygon">polygon</a>.
|
||||
</p><p>
|
||||
A more compact way of writing this is:
|
||||
</p><p>
|
||||
<pre>
|
||||
p = fill_pattern("FILL_CELL").shape(1, 0, box(0.0, 0.0, 1.0, 1.0))
|
||||
</pre>
|
||||
</p><p>
|
||||
The fill pattern can be given a reference point which is used for placing the pattern. The reference point
|
||||
is the one which is aligned with the pattern origin. The following code will assign (-0.5, -0.5) as the reference
|
||||
point for the 1x1 micron rectangle. Hence the reference point is a little below and left of the rectangle which
|
||||
in turn shifts the rectangle fill pattern to the right and up:
|
||||
</p><p>
|
||||
<pre>
|
||||
p = fill_pattern("FILL_CELL")
|
||||
p.shape(1, 0, box(0.0, 0.0, 1.0, 1.0))
|
||||
p.origin(-0.5, -0.5)
|
||||
</pre>
|
||||
</p><p>
|
||||
Without a reference point given, the lower left corner of the fill pattern's bounding box will be used
|
||||
as the reference point.
|
||||
</p><p>
|
||||
With these ingredients will can use the fill function. The first example fills the polygons
|
||||
of "to_fill" with an orthogonal pattern of 1x1 micron rectangles with a pitch of 2 microns:
|
||||
</p><p>
|
||||
<pre>
|
||||
pattern = fill_pattern("FILL_CELL").shape(1, 0, box(0.0, 0.0, 1.0, 1.0)).origin(-0.5, -0.5)
|
||||
to_fill.fill(pattern, hstep(2.0), vstep(2.0))
|
||||
</pre>
|
||||
</p><p>
|
||||
This second example will create a skewed fill pattern in auto-origin mode:
|
||||
</p><p>
|
||||
<pre>
|
||||
pattern = fill_pattern("FILL_CELL").shape(1, 0, box(0.0, 0.0, 1.0, 1.0)).origin(-0.5, -0.5)
|
||||
to_fill.fill(pattern, hstep(2.0, 1.0), vstep(-1.0, 2.0), auto_origin)
|
||||
</pre>
|
||||
This method has the same call syntax and functionality than <a href="#fill">fill</a>. Other than this method
|
||||
it will return the area not covered by fill cells as a DRC layer.
|
||||
</p>
|
||||
<a name="first_edges"/><h2>"first_edges" - Returns the first edges of an edge pair collection</h2>
|
||||
<keyword name="first_edges"/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue