Add possibility of adding label when adding fiber array #2535
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I added the possibility of adding a text to a structure when adding a fiber array. I believe this functionality is useful, since this way one can add an identifier to a test structure when adding fiber arrays. Doing it this way allows to place the labels with respect to the grating couplers, which is likely the safest placement so as to not interact with the component itself.
You can choose to place the label in different positions:
add_fiber_array(c, dev_id='abc', text=text_m3, id_placement="l")
will place the label at the left of the grating coupler array:add_fiber_array(c, dev_id='abc', text=text_m3, id_placement="r")
will place the label at the right of the grating coupler array:add_fiber_array(c, dev_id='abc', text=text_m3, id_placement="center")
will place the label at the center of the grating coupler array:add_fiber_array(c, dev_id='abc', text=text_m3, id_placement="s")
will place the label at the center of the grating coupler array but below the array:By default no text is added.