ExtrusionSpec¶
- class photonforge.ExtrusionSpec(mask_spec, medium, limits, sidewall_angle=0)¶
Extrusion specification for masks.
This class is mainly used to create extrusion recipes for a
Technology
.- Parameters:
mask_spec – Mask specification for this extrusion.
medium – Tidy3D medium for the resulting structures. Different media can be used for optical and electrical frequencies by using a dictionary (see note below).
limits – Out-of-plane extrusion limits.
sidewall_angle – Sidewall angle for extrusion (in degrees). Affects the bottom face of the extruded mask (reference on top). Positive (negative) values will dilate (erode) the bottom face.
Example
>>> extrusion_spec = ExtrusionSpec( ... 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 = ExtrusionSpec( ... MaskSpec((1, 0)), ... medium=media, ... limits=(0, 0.250), ... sidewall_angle=8, ... )
Methods
copy
([deep])Create a copy of this extrusion specification.
extrude
(*structures[, extrusion_tolerance, ...])Extrude planar structures according to this extrusion specification.
from_json
(json_str)Create an extrusion specification object from a json string.
get_medium
(classification)Return electrical or optical medium for this extrusion specification.
Attributes
Json representation of this extrusion specification.
Extrusion limits.
Extrusion mask specification.
Extrusion medium.
Extrusion sidewall_angle.
- copy(deep=False)¶
Create a copy of this extrusion specification.
- Parameters:
deep – If set, creates a copy of mask specification as well. Otherwise, the same mask specification object will be used.
- Returns:
New copy.
- extrude(*structures, extrusion_tolerance=0, classification='optical')¶
Extrude planar structures according to this extrusion specification.
- Parameters:
*structures – Structures to be extruded. Must be instances of
Rectangle
,Circle, :class:`Polygon
, orPath
.extrusion_tolerance – Minimal dimension to search for topological changes in angled extrusions or fallback to an orthogonal profile. A value of 0 or less defaults to
config.tolerance
.classsification – Frequency classification indicating which type of medium to use. One of
"electrical"
or"optical"
.
- Returns:
List of polyhedra.
Note
The mask specification in this object is not taken into account. All structures are used in the extrusion and no dilation is applied.
- static from_json(json_str)¶
Create an extrusion specification object from a json string.
- Parameters:
json_str – Strig containing the json data.
- Returns:
ExtrusionSpec instance.
- get_medium(classification)¶
Return electrical or optical medium for this extrusion specification.
- Parameters:
classification – One of
"electrical"
or"optical"
.- Returns:
Medium.
See also
- json¶
Json representation of this extrusion specification.
- limits¶
Extrusion limits.
- mask_spec¶
Extrusion mask specification.
- medium¶
Extrusion medium.
- sidewall_angle¶
Extrusion sidewall_angle.