Skip to content

ExtrusionSpec

ExtrusionSpec(mask_spec, medium, limits, sidewall_angle=0, reference='top')

Extrusion specification for masks.

This class is mainly used to create extrusion recipes for a Technology.

Args

  • mask_spec (MaskSpec): Mask specification for this extrusion.
  • medium (MediumType | dict[Literal[“optical”, “electrical”], MediumType]): Tidy3D medium for the resulting structures. Different media can be used for optical and electrical frequencies by using a dictionary (see note below).
  • limits (Sequence[float]): Out-of-plane extrusion limits.
  • sidewall_angle (float): Sidewall angle for extrusion (in degrees). Positive values will dilate the bottom face or erode the top face, according to the reference position.
  • reference (Literal[“top”, “bottom”, “middle”] | float): Reference position for computing dilations and erosions when using a sidewall angle.

Example

>>> extrusion_spec = pf.ExtrusionSpec(
... pf.MaskSpec((1, 0)),
... td.Medium(permittivity=3.48**2),
... limits=(0, 0.250),
... sidewall_angle=8,
... )

Note

The medium used for simulations in optical and electrical frequency ranges (see frequency_classification) can be set individually with:

>>> media = {
... "optical": td.Medium(permittivity=3.48**2),
... "electrical": td.Medium(permittivity=12.3),
... }
>>> extrusion_spec = pf.ExtrusionSpec(
... pf.MaskSpec((1, 0)),
... medium=media,
... limits=(0, 0.250),
... sidewall_angle=8,
... )
MethodDescription
copyCreate a copy of this extrusion specification.
extrudeExtrude planar structures according to this extrusion specification.
get_mediumReturn electrical or optical medium for this extrusion specification.
mask_layersGet the set of all layers referenced by this extrusion’s mask

copy(self, deep=False)

Create a copy of this extrusion specification.

Args

  • deep (bool): If set, creates a copy of mask specification as well. Otherwise, the same mask specification object will be used.

Returns

ExtrusionSpec: New copy.

extrude(self, *structures, extrusion_tolerance=0, classification='optical')

Extrude planar structures according to this extrusion specification.

Args

  • structures (Rectangle | Circle | Polygon | Path*): Structures to be extruded.
  • extrusion_tolerance (float): Minimal out-of-plane interval used to refine topological changes and sidewall slope mismatches. Slope mismatches within this interval are accepted. Meshing failures fall back to an orthogonal midpoint profile with a warning. A value of 0 or less defaults to config.tolerance.
  • classification (Literal[“optical”, “electrical”]): Frequency classification indicating which type of medium to use.

Returns

list[Polyhedron | Extruded | ConstructiveSolid]: List of 3D structures.

Note

The mask specification in this object is not taken into account. All structures are used in the extrusion and no dilation is applied.

get_medium(self, classification)

Return electrical or optical medium for this extrusion specification.

Args

  • classification (Literal[“optical”, “electrical”]): Frequency classification of the desired medium.

Returns

MediumType: Medium for the chosen classification.

See Also

frequency_classification.

mask_layers(self)

Get the set of all layers referenced by this extrusion’s mask specification.

Returns

set[tuple[int, int]]: Layer set.

AttributeDescription
limitsndarray: Extrusion limits.
mask_specMaskSpec: Extrusion mask specification.
mediumMediumType | dict[Literal[‘optical’, ‘electrical’], MediumType]: Extrusion medium.
propertiesProperties: Object properties.
referenceLiteral[‘top’, ‘bottom’, ‘middle’] | float: Extrusion reference position.
sidewall_anglefloat: Extrusion sidewall_angle (in degrees).

ndarray: Extrusion limits.

MaskSpec: Extrusion mask specification.

MediumType | dict[Literal[‘optical’, ‘electrical’], MediumType]: Extrusion medium.

Properties: Object properties.

Literal[‘top’, ‘bottom’, ‘middle’] | float: Extrusion reference position.

float: Extrusion sidewall_angle (in degrees).