Skip to content

Commit 96cfe54

Browse files
committed
DLW-Markers: Size adjustable
1 parent 1e5fbb3 commit 96cfe54

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

gdshelpers/geometry/chip.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -527,24 +527,25 @@ def show(self, layers: Optional[List[int]] = None, padding=5):
527527
ax.set_aspect(1)
528528
plt.show()
529529

530-
def add_dlw_marker(self, label: str, layer: int, origin):
530+
def add_dlw_marker(self, label: str, layer: int, origin, box_size=2.5):
531531
"""
532532
Adds a marker for 3D-hybrid integration
533533
534534
:param label: Name of the marker, needs to be unique within the device
535535
:param layer: Layer at which the marker and markers should be written
536536
:param origin: Position of the marker
537+
:param box_size: Size of the box of the marker
537538
"""
538539
from gdshelpers.parts.marker import DLWMarker
539540
from gdshelpers.parts.text import Text
540541

541-
self.add_to_layer(layer, DLWMarker(origin))
542+
self.add_to_layer(layer, DLWMarker(origin, box_size=box_size))
542543
self.add_to_layer(std_layers.parnamelayer1, Text(origin, 2, label, alignment='center-center'))
543544

544545
self.add_dlw_data('marker', label, {'origin': list(origin), 'angle': 0})
545546

546547
def add_dlw_taper_at_port(self, label: str, layer: int, port: Port, taper_length: float, tip_width=.01,
547-
with_markers=True):
548+
with_markers=True, box_size=2.5):
548549
"""
549550
Adds a taper for 3D-hybrid-integration at a certain port
550551
@@ -556,6 +557,7 @@ def add_dlw_taper_at_port(self, label: str, layer: int, port: Port, taper_length
556557
:param with_markers: for recognizing the taper markers near to the taper are necessary.
557558
In certain designs the standard positions are not appropriate and
558559
can therefore be disabled and manually added
560+
:param box_size: Size of the box of the markers
559561
"""
560562
from gdshelpers.parts.text import Text
561563

@@ -572,7 +574,7 @@ def add_dlw_taper_at_port(self, label: str, layer: int, port: Port, taper_length
572574
if with_markers:
573575
for i, (v, l) in enumerate(itertools.product((-20, 20), (taper_length, 0))):
574576
self.add_dlw_marker(str(label) + '-' + str(i), layer,
575-
port.parallel_offset(v).longitudinal_offset(l).origin)
577+
port.parallel_offset(v).longitudinal_offset(l).origin, box_size=box_size)
576578

577579

578580
if __name__ == '__main__':

0 commit comments

Comments
 (0)