pyOptiShared.LayerInfo.LayerInfo

class pyOptiShared.LayerInfo.LayerInfo

Bases: object

This class defines a layer. Layers are used to construct layer stack and set the material properties of objects (geometries) definned inside a particular layer. Required properties are: number (must match that of a GDS or STL file), a material (that defines the properties of objects in the layer), a thickness, and a starting point, zmin, along the z-axis in which the object will extrude to.

Methods

GetOffset(z, zmin, zmax, layer, datatype)

This is the base offset calculating function.

GetOffsetAng(z, zmin, zmax, layer, datatype)

This is the method used to determine the straight offset whe sw_ang is different than zero.

GetTolInfo()

Return fabrication tolerance information:

Attributes

cladd_material

The material assigned to empty regions inside the layer.

cladd_name

The name of the cladding material.

layer_number

Layer number.

layer_thickness

Layer thickness (along z).

material

The base material assign to objects inside the layer.

material_name

The name of the base material of the layer.

sw_ang

Defines the tilt angle of the side wall linear profile.

sw_func

The side wall function.

z_max

The point in z where the layer ends.

z_min

The point in z where the layer starts.

static GetOffset(z: float, zmin: float, zmax: float, layer: int, datatype: int) float

This is the base offset calculating function. This is used to determine the offset of a given polygon at a particlar z locaiton inside the layer. All user defined GetOffset functions passed as arguments for sw_func must follow this method’s signature. A negative offset erodes the polygons (shrinks them), a positive offset dilates the polygons (expand them).

Parameters:
  • z (float) – The current z value to determine the offset.

  • zmin (float) – Starting point of the layer along the z-axis.

  • zmax (float) – Ending point of the layer along the z-axis.

  • layer (int) – The layer number.

  • datatype (int) – The layer datatype.

Returns:

The offset value at z.

Return type:

float

GetOffsetAng(z: float, zmin: float, zmax: float, layer: int, datatype: int) float

This is the method used to determine the straight offset whe sw_ang is different than zero. It follows the same signature as the GetOffset method.

Parameters:
  • z (float) – The current z value to determine the offset.

  • zmin (float) – Starting point of the layer along the z-axis.

  • zmax (float) – Ending point of the layer along the z-axis.

  • layer (int) – The layer number.

  • datatype (int) – The layer datatype.

Returns:

The offset value at z.

Return type:

float

GetTolInfo() tuple[float, int]
Return fabrication tolerance information:

A tuple containing the fabrication tolerance and the number of points to sweep.

Returns:

Fabrication tolerance and number of points to sweep

the tolerance.

Return type:

tuple[float, int]

property cladd_material

The material assigned to empty regions inside the layer. It can override the background material properties inside the layer.

Return type:

Material

property cladd_name

The name of the cladding material.

Return type:

str

property layer_number: int

Layer number.

Return type:

int

property layer_thickness: float

Layer thickness (along z).

Return type:

float

property material

The base material assign to objects inside the layer.

Return type:

Material

property material_name

The name of the base material of the layer.

Return type:

str

property sw_ang

Defines the tilt angle of the side wall linear profile.

It is later used to define the side wall function that calculates a particular offset given inputs like z value, along the thickness of the layer.

Return type:

float

property sw_func

The side wall function. It has to follow the same signature as the GetOffset static method.

Returns:

The offset callable function.

Return type:

Callable

property z_max

The point in z where the layer ends.

Return type:

float

property z_min

The point in z where the layer starts.

Return type:

float