pdaBoundaryView

aspect is the "geometric" boundary, but you can specify multiple regions with other aspects like "metal", "rf" or special optical exclusions and so on.
You can define as many boundaries as needed.

You can define a polygon (use point), a rectangle, circle or ellips now. Additional types will be added later.
Via the <spt> tag you can use OptoDesigner specific shapes also in case you want a white-box building block.

The "purpose" attribute set more details in case multiple boundaries are used. And the "xsection" can be used to use the xsection's to write to GDS, support DRC and so on.

Structure

The attributes and elements are shown below, in a sorted per type fashion.
In case a list is printed after an element, it indicates that you can have many, otherwise it should be a single element. With a optional it tells the element is not required.

<pdaBoundaryView  
name="..."  purpose="..." ... > ...
  <arc> ... </arc>   list
  <circle> ... </circle>   list
  <cosinebend> ... </cosinebend>   list
  <ellipse> ... </ellipse>   list
  <gdscell> ... </gdscell>   list
  <layertext> ... </layertext>   list
  <lineartaper> ... </lineartaper>   list
  <parabolictaper> ... </parabolictaper>   list
  <polygon> ... </polygon>   list
  <rectangle> ... </rectangle>   list
  <sinebend> ... </sinebend>   list
  <sptFooter> ... </sptFooter>    optional
  <sptHeader> ... </sptHeader>    optional
  <xsection> ... </xsection>    optional
</pdaBoundaryView>

XSD

The schema file can be downloaded or viewed at xPDK_Base.

Details

arc

In case there is no align given, the XY=[0,0] is the 'middle left' (OptoDesigner cin).
Type pdaPolarBend documentation:

circle

micron.
In case there is no align given, the XY=[0,0] is the center of the circle.
full file

 <bb name="myBB">
  <port label="org"/>
  <port label="in0" org="true">
   <position>
     <x>0</x>
   </position>
 </port>
 <boundary> <!-- using align=bcc puts the circle's center on [x,y] -->
   <circle portref="in0" align="bcc" x="25" y="5" radius="10"/>
  </boundary>
 </bb>
Type pdaCircle documentation:

cosinebend

In case there is no align given, the XY=[0,0] is the 'middle left' (OptoDesigner cin).
Type pdaCosineBend documentation:

ellipse

and [x,y] defined in micron.
In case there is no align given, the XY=[0,0] is the center of the circle.
full file

 <bb name="myBB">
  <port label="org"/>
  <port label="in0" org="true">
   <position>
     <x>0</x>
   </position>
 </port>
  <boundary> <!-- using align=bcc puts the ellips's center on [x,y] -->
   <ellipse portref="in0" align="bcc" x="25" y="5" radiusX="10" radiusY="5"/>
  </boundary>
 </bb>
Type pdaEllipse documentation:

gdscell

These will be blob loaded into the OptoDesigner design kit, but you can distribute them sepeare also.
In case there is no align given, the XY=[0,0] is the 'cell origin'. Type pdaGdsCell documentation:

layertext

Define text to be written in a xsection or gds layer. Type pdaLayerText documentation:

lineartaper

In case there is no align given, the XY=[0,0] is the 'middle left' (OptoDesigner cin).
Type pdaLinearTaper documentation: Values are in micron.

name

parabolictaper

In case there is no align given, the XY=[0,0] is the 'middle left' (OptoDesigner cin).
Type pdaParabolicTaper documentation: to width1. Values are in micron.

polygon

values for x & y can be expressions and have unit micron.
The [x,y] are defined always with respect to the port org and the portref/align can thus not be used for a polygon. This is defined this way to avoid complex boundary calculations to find the bic/boc and so on.
full file

 <bb name="myBB">
  <port label="org"/>
  <port label="in0" org="true">
   <position>
     <x>0</x>
   </position>
 </port>
  <boundary>
   <polygon>
   <point x="0" y="-myWidth/2"/>
   <point x="myLength" y="-myWidth/2"/>
   <point x="myLength" y="myWidth/2"/>
   <point x="0" y="myWidth/2"/>
   </polygon>
  </boundary>
 </bb>
Type pdaPolygon documentation:

purpose

any value. However design software is likely to ignore "nice" names and just uses the listed ones. You can propose & use new ones however.

Typical region purposes are: boundary, metal, waveguide, dc, rf, drcMarkup but you can add others like thermal, mechanical and so on.
Without a purpose string it is defined as the global boundary and should contain all the other regions. This avoids the need of calculating (by software) the outer boundary which is used in the designs.
full file

<bb name="myBB">
 <port label="in0">
   <position>
     <x>0</x>
   </position>
 </port>
 <boundary purpose="waveguide">
   <rectangle portref="in0" width="10" length="20" x="0" y="0"/>
 </boundary>
</bb>

rectangle

[x,y] defined in micron.
full file

 <!-- define xsection for use in boundary -->
<xsection name="A"/>

<bb name="myBB">
 <port label="org"/>
 <port label="in0" org="true">
   <position>
     <x>0</x>
   </position>
 </port>
 <port label="out0">
   <position>
    <x>200</x><y>50</y><angle>45</angle>
   </position>
 </port>
 <port label="out1">
   <position>
    <x>200</x><y>-50</y><angle>-45</angle>
   </position>
 </port>
 <boundary>
   <!-- default alignment: portref="org"  align="bic"
      - does not need to be defined.
     -->
   <rectangle  width="60" length="200"/>
 </boundary>
 <boundary>
   <rectangle portref="in0"  align="bic" width="10" length="20"/>
 </boundary>
 <boundary>
   <rectangle portref="out0" align="boc" width="10" length="20"/>
 </boundary>
 <boundary>
   <rectangle portref="out1" align="boc" width="10" length="20"/>
 </boundary>
</bb>
Type pdaRectangle documentation:

sinebend

In case there is no align given, the XY=[0,0] is the 'middle left' (OptoDesigner cin).
Type pdaSineBend documentation:

sptFooter

Type sptFooter documentation: This section will be put at the end of a definition via XSLT.

Tech/02 definition

This section is copied into the '02' file just before the function export()
The typical use is for backward compatability (for example mapping older mcs names) or some custom tech functions that need access to most of the tech-file.
Using this element instead of the TechFooter is easier in case of enriching the design kit via the C++ or Python library.

pdaSingleLayerOPS

This section is copied into the '02' file below the (gds/mcs) layer definitions in the single-layer operation block. It is intended for more complex single/multi layer derived operations or DRC.

Download the xsl/xml/xsd's and run the (bash) command line below to convert the XML to a SPT example in OptoDesigner (see short docu):

xsltproc --xinclude -stringparam standalone true -stringparam example drc0 xPDK_toOptoDesigner02.xsl layer_singleSpt.xml
full file
    <gds_datatype>0</gds_datatype>
    <grid>0.001</grid>
    <purpose>Waveguide layer</purpose>
    <color R="100" G="200" B="255"/>
    <visible>true</visible>
    <fillstyle>NOFILL</fillstyle>
    <linestyle>fill</linestyle>
  </layer>
  <layer name="layer2">
    <gds_number>2</gds_number>
    <gds_datatype>0</gds_datatype>
    <grid>0.001</grid>
    <purpose>Waveguide layer</purpose>
    <color R="255" G="20" B="20"/>
    <visible>true</visible>
    <fillstyle>NOFILL</fillstyle>
    <linestyle>fill</linestyle>
    <od:sptFooter>
      // println("hi");
   </od:sptFooter>
  </layer>
Spt:

xsection

This section is copied into the '02' file below the mcs definition and is intended for more complex properties like waveguide models and so on.
It provides also for less common mcsSet*() functions or feeding them with values that xPDK does not support.
full file
 </doc>

 <xsection name="WG">
  <od:sptHeader>// This section does some special OptoDesigner things.
   mcsSetCurveCheck();
   mcsSetAltWG("WGhigh","WGlow");
  </od:sptHeader>
 </xsection>

BB definition

This section is copied into the '04' file inside the layout definition and is intended for fine-tuning behavior, giving control over returned attributes and so on. In typical cases it is not needed.
Use this field in case the xPDK format does not have all the fields you need for your BB in OptoDesigner. For example this is possible for returning more layout attributes or supporting more complex design rule checking.

full file

<bb name="myBB">
 <port label="in0">
  <position>
     <x>0</x>
  </position>
 </port>
 <od:sptFooter>
  ml::Straight(cin-> this@in0:wfix(1),20) elm;
  this{"elm"}=elm;
  this{"L"}=20;
 </od:sptFooter>
</bb>

BB boundary

This section is copied into the '04' file into the layout itself and can be used to mark up complex boundaries. Also the use of multiple mcs/gds layers for DRC can be simpler this way.
Instead of using spt, you can also use the xsection for typical cases and reduce vendor dependence for this section.
full file
 </doc>

<bb name="myBB">
 <port label="in0">
  <position>
     <x>0</x>
   </position>
 </port>
 <boundary>
  <od:sptHeader>
   ml::Straight(cin-> this@in0 : wopar(1,3),20);
  </od:sptHeader>
 </boundary>
</bb>

sptHeader

Type sptHeader documentation: This section will be put at the start of a definition via XSLT.

Tech/02 definition

This section is copied into the '02' file at the start of the TechnologyPDKLIB class instance.
The typical use is waveguide mode models and other bigger spt sections that can then be used in the different sections.

pdaSingleLayerOPS

This section is copied into the '02' file below the (gds/mcs) layer definitions in the single-layer operation block. It is intended for more complex single/multi layer derived operations or DRC.

Download the xsl/xml/xsd's and run the (bash) command line below to convert the XML to a SPT example in OptoDesigner (see short docu):

xsltproc --xinclude -stringparam standalone true -stringparam example drc0 xPDK_toOptoDesigner02.xsl layer_singleSpt.xml
full file
    <gds_datatype>0</gds_datatype>
    <grid>0.001</grid>
    <purpose>Waveguide layer</purpose>
    <color R="100" G="200" B="255"/>
    <visible>true</visible>
    <fillstyle>NOFILL</fillstyle>
    <linestyle>fill</linestyle>
  </layer>
  <layer name="layer2">
    <gds_number>2</gds_number>
    <gds_datatype>0</gds_datatype>
    <grid>0.001</grid>
    <purpose>Waveguide layer</purpose>
    <color R="255" G="20" B="20"/>
    <visible>true</visible>
    <fillstyle>NOFILL</fillstyle>
    <linestyle>fill</linestyle>
    <od:sptFooter>
      // println("hi");
   </od:sptFooter>
  </layer>
Spt:

xsection

This section is copied into the '02' file below the mcs definition and is intended for more complex properties like waveguide models and so on.
It provides also for less common mcsSet*() functions or feeding them with values that xPDK does not support.
full file
 </doc>

 <xsection name="WG">
  <od:sptHeader>// This section does some special OptoDesigner things.
   mcsSetCurveCheck();
   mcsSetAltWG("WGhigh","WGlow");
  </od:sptHeader>
 </xsection>

BB definition

This section is copied into the '04' file inside the layout definition and is intended for fine-tuning behavior, giving control over returned attributes and so on. In typical cases it is not needed.
Use this field in case the xPDK format does not have all the fields you need for your BB in OptoDesigner. For example this is possible for returning more layout attributes or supporting more complex design rule checking.

full file

<bb name="myBB">
 <port label="in0">
  <position>
     <x>0</x>
  </position>
 </port>
 <od:sptFooter>
  ml::Straight(cin-> this@in0:wfix(1),20) elm;
  this{"elm"}=elm;
  this{"L"}=20;
 </od:sptFooter>
</bb>

BB boundary

This section is copied into the '04' file into the layout itself and can be used to mark up complex boundaries. Also the use of multiple mcs/gds layers for DRC can be simpler this way.
Instead of using spt, you can also use the xsection for typical cases and reduce vendor dependence for this section.
full file
 </doc>

<bb name="myBB">
 <port label="in0">
  <position>
     <x>0</x>
   </position>
 </port>
 <boundary>
  <od:sptHeader>
   ml::Straight(cin-> this@in0 : wopar(1,3),20);
  </od:sptHeader>
 </boundary>
</bb>

xsection

via the design / mcs / cad layer. This is oriented at gray-box and black-box design rule checking, where you do not have the full data for things like distance checks.
Using the xsection can reduce the amount of cases where you need spt-sections in the cell definition as it allows to easily use white-box designs also.
full file

 <!-- define xsection for use in boundary -->
<xsection name="A"/>

<bb name="myBB">
 <port label="in0">
   <position>
     <x>0</x>
   </position>
 </port>
 <boundary>
   <rectangle portref="in0" width="10" length="20" x="0" y="0"/>
   <xsection>A</xsection>
 </boundary>
</bb>
The example shows a reference on the locally defined A. Type pdaXsectionReference documentation: