Path¶
- class ipkiss3.all.Path(layer, shape, line_width=1.0, path_type=0, transformation=None, extension=(0.0, 0.0), **kwargs)¶
Layout element consisting of a closed or open Shape drawn on a given Layer with a given line width
- Parameters
- line_width: required
- shape: Shape, required
- layer: __Layer__, required
Layout layer on which the element needs to be placed
- absolute_line_width: ( bool, bool_, bool or int ), optional
- extension: tuple2 and Tuple of <class ‘float’>, optional
extension of the path at start and end: (start, end)
- path_type: List with value restriction, allowed values: [0, 1, 2, 4], optional
- transformation: GenericNoDistortTransform, optional
Examples
# Shows how to use the different path types: NORMAL, ROUNDED, EXTENDED, VARIABLE import ipkiss3.all as i3 process = i3.ProcessLayer(name="process", extension="PROC") layer = i3.PPLayer(process=process, purpose=i3.TECH.PURPOSE.DRAWING) elements = i3.ElementList() elements += i3.Path( layer=layer, line_width=1.0, shape=[(0.0, 0.0), (10.0, 0.0), (10.0, 10.0)], path_type=i3.PATH_TYPE.NORMAL ) elements += i3.Path( layer=layer, line_width=1.0, shape=[(20.0, 0.0), (30.0, 0.0), (30.0, 10.0)], path_type=i3.PATH_TYPE.ROUNDED ) elements += i3.Path( layer=layer, line_width=1.0, shape=[(40.0, 0.0), (50.0, 0.0), (50.0, 10.0)], path_type=i3.PATH_TYPE.EXTENDED ) elements += i3.Path( layer=layer, line_width=1.0, shape=[(60.0, 0.0), (70.0, 0.0), (70.0, 10.0)], path_type=i3.PATH_TYPE.VARIABLE, extension=(3.0, 1.0), ) example_path = i3.LayoutCell(name="example_path").Layout(elements=elements) example_path.write_gdsii("example_path.gds") example_path.visualize() # note: visualize() doesn't show PATH_TYPE.ROUNDED
- set_line_width(new_line_width)¶
sets the line width property of the Path.
- Parameters
- new_line_widthpositive number
- size_info()¶
Returns a SizeInfo object corresponding to this element.
- Returns
- SizeInfo object
See also
- convex_hull()¶
returns a Shape object describing the convex hull of this element.
- Returns
- Shape object
See also
- flat_copy(level=-1)¶
Returns a flattened copy (i.e. no more layout hierarchy) of this element.
- Returns
- ElementList object
- expand_transform()¶
Applies the built-in transform to the shape coordinates and the path width.
- Returns
- This Element object.