def get_shapely_object(self): if not self._in_wgs or not self._out_wgs: self._calculate(do_in_wgs=True, do_out_wgs=True) markers = [DLWMarker(pos) for pos in self.marker_positions] return geometric_union(self._out_wgs + self._in_wgs + markers)
def add_dlw_marker(self, label, layer, origin): """ Adds a marker for 3D-hybrid integration :param label: Name of the marker, needs to be unique within the device :param layer: Layer at which the marker and markers should be written :param origin: Position of the marker """ self.add_to_layer(layer, DLWMarker(origin)) self.add_to_layer(std_layers.parnamelayer1, Text(origin, 2, label, alignment='center-center')) self.add_dlw_data('marker', label, {'origin': origin.tolist()})
def add_dlw_marker(self, label: str, layer: int, origin, box_size=2.5): """ Adds a marker for 3D-hybrid integration :param label: Name of the marker, needs to be unique within the device :param layer: Layer at which the marker and markers should be written :param origin: Position of the marker :param box_size: Size of the box of the marker """ from gdshelpers.parts.marker import DLWMarker from gdshelpers.parts.text import Text self.add_to_layer(layer, DLWMarker(origin, box_size=box_size)) self.add_to_layer(std_layers.parnamelayer1, Text(origin, 2, label, alignment='center-center')) self.add_dlw_data('marker', label, { 'origin': list(origin), 'angle': 0 })