0 Replies Latest reply on Dec 9, 2016 11:31 AM by jose.mauricio.marulanda@intel.com

    Flattening and Merging all layers


      Hi, I am trying to flatten and merge.

      I have a working script, but it does not respect the data of the layer ("LAYER" "datatype"). It merges say METAL1 FILL with METAL1 DRAWING.

      Could you help me in figuring this out?


      My Script so far:

      #!/usr/bin/env tcl

      ## assign the input

      set inGds [lindex $argv 0]

      ## open the layout

      set layoutIn [layout create $inGds]

      ## flatten the layout by copying to a new variable

      layout copy $layoutIn outLayout

      ## assign the outLayout handle to a variable

      set out outLayout

      ## replace the file with flatten layout

      $out gdsout $inGds

      ## get all the layers and merge them

      set layoutIn [layout create $inGds]

      foreach ii [$layoutIn layers] {

        puts $ii

        $layoutIn create layer 65000

        $layoutIn OR $ii 65000 65000.1

        $layoutIn delete layer $ii

        $layoutIn COPY 65000.1 $ii

        $layoutIn delete layer 65000.1