Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Guiding Shape for CPW PCell

I am looking to write a PCell that will create a coplanar waveguide layer from a path. I have working code that will build the CPW, using and underlying path, but once it is built there is no way to do partial movements. I would like to implement a sort of skeleton path, that can be partially moved, once the CPW is created, and force the CPW to recreate itself.

In the documentation, under the layout class, there is a method, guiding_shape_layer, that seems to offer such functionality, but there is no further information about it other than:

Description: Returns the index of the guiding shape layer
The guiding shape layer is used to store guiding shapes for PCells.
This method has been added in version 0.22.

If anyone knows any details on what this method is and what it can do it would be very helpful I think.

Cheers.

Comments

  • Hi,

    In the BASIC library there is the ROUNDED_PATH which uses this feature. It is further described on this page https://klayout.de/doc/manual/create_instance.html. On my machine it crashes with a bad alloc though. Hope this is what you were looking for.

    Best,
    Sebastian

  • Hi,

    "Layout#guiding_shape_layer" just delivers the index of the auxiliary layer to keep the guiding shapes. It's not what you are looking for.

    A "guiding shape" is actually a PCell parameter of the special kind "TypeShape". This "parameter" is not taken from the PCell properties page but instead, KLayout offers to edit this guiding shape and thus provide the respective input for the PCell layout generation code.

    The basic scheme is this:

    • Define a special parameter, e.g. with name "path" and type "TypeShape".
    • Give this parameter a default value which is a "DPath" object (e.g. one with two points)
    • In "produce_impl" read the value of the "shape" parameter as a "DPath" object and use this path to derive your layout from.
    • For completeness you may consider implementing "parameters_from_shape_impl" and "can_create_from_shape_impl". Doing so enables turning shapes into PCells using "Edit/Selection/Convert to PCell". But this step is optional.

    Matthias

Sign In or Register to comment.