You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I noticed a bug while trying to use gplugins.gmeep to simulate a 3D geometry including waveguides with angled sidewalls. Specifically the tapered polygons defined by the shapes in a layer are always extruded "bottom up" (rather than "top down"), introducing gaps at waveguide junctions which are connected in your layer geometry. See the example below, where gaps appear between connected subcomponents of a gf.components.coupler defined using a single waveguide layer with ~25deg sidewall angles (where 0deg is vertical).
In the image above, the X-Z and Y-Z cross section plots correspond to the dashed red lines in the top X-Y refractive index plot generated with the meep simulation, and X-Y index plots are shown at three different values of z.
This also means that patterned waveguide widths are mapped to the layer bottom (the LayerLevel's zmin). I think that in some cases it is conventional for the pattern widths to correspond to the waveguide top widths. Am I doing something wrong? If not it would be nice to update gmeep.get_meep_geometry.get_meep_geometry_from_component to avoid these gaps in 3D geometries and expose some control over whether the layer pattern corresponds to the top or bottom when sidewall_angle!=0.
The optional width_to_z property of LayerLevels seems apt for controlling this if it isn't deprecated. Briefly playing around with this in a local branch, I was able to get the behavior I wanted (extruding the layer pattern "top down") by identifying layers with sidewall angles, placing their polygons at z=zmin+height, and extruding downward by passing axis = mp.Vector3(0,0,-1) to meep.geom.Prism. The pasted snippet below shows my hotfix. I can submit a pull request with a more general version of this controlled by width_to_z if it looks like the right approach, but I imagine there could be a smarter way.
I had also tried to merge all the polygons in the coupler component above and was having trouble getting them to robustly merge, so I was worried that would be too fragile for components with lots of connected sub-components. That also still maps the pattern to the polygon bottoms at 'zmin', which I would guess is the less-common case for etched waveguides with angled sidewalls.
What do you think? Is there a significant downside to extruding downward from 'zmin+height' or at least exposing the option to do so?
I think I noticed a bug while trying to use
gplugins.gmeep
to simulate a 3D geometry including waveguides with angled sidewalls. Specifically the tapered polygons defined by the shapes in a layer are always extruded "bottom up" (rather than "top down"), introducing gaps at waveguide junctions which are connected in your layer geometry. See the example below, where gaps appear between connected subcomponents of agf.components.coupler
defined using a single waveguide layer with ~25deg sidewall angles (where 0deg is vertical).In the image above, the X-Z and Y-Z cross section plots correspond to the dashed red lines in the top X-Y refractive index plot generated with the meep simulation, and X-Y index plots are shown at three different values of
z
.This also means that patterned waveguide widths are mapped to the layer bottom (the
LayerLevel
'szmin
). I think that in some cases it is conventional for the pattern widths to correspond to the waveguide top widths. Am I doing something wrong? If not it would be nice to updategmeep.get_meep_geometry.get_meep_geometry_from_component
to avoid these gaps in 3D geometries and expose some control over whether the layer pattern corresponds to the top or bottom whensidewall_angle!=0
.gplugins/gplugins/gmeep/get_meep_geometry.py
Line 67 in 98c0de2
The optional
width_to_z
property ofLayerLevel
s seems apt for controlling this if it isn't deprecated. Briefly playing around with this in a local branch, I was able to get the behavior I wanted (extruding the layer pattern "top down") by identifying layers with sidewall angles, placing their polygons atz=zmin+height
, and extruding downward by passingaxis = mp.Vector3(0,0,-1)
tomeep.geom.Prism
. The pasted snippet below shows my hotfix. I can submit a pull request with a more general version of this controlled bywidth_to_z
if it looks like the right approach, but I imagine there could be a smarter way.Thanks for all of your great work.
The text was updated successfully, but these errors were encountered: