Skip to content

Commit

Permalink
Merge pull request #822 from HelgeGehring/fix_spirals
Browse files Browse the repository at this point in the history
minor fixes of the spirals
  • Loading branch information
joamatab committed Nov 7, 2022
2 parents 48c395b + 06ed90e commit 379e775
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gdsfactory/components/spiral_double.py
Expand Up @@ -47,7 +47,7 @@ def spiral_double(
component.add_port("o1", port=spiral1.ports["o2"])
component.add_port("o2", port=spiral2.ports["o2"])

component.info["length"] = float(path.length())
component.info["length"] = float(path.length() + bend.info["length"]) * 2
return component


Expand Down
9 changes: 5 additions & 4 deletions gdsfactory/components/spiral_heater.py
Expand Up @@ -35,15 +35,16 @@ def spiral_racetrack(
c = gf.Component()

bend_s = c << bend_s_factory(
(straight_length, -min_radius * 2 - spacings[0]), cross_section=cross_section
(straight_length, -min_radius * 2 + 1 * spacings[0]),
cross_section=cross_section,
)

ports = []
for port in bend_s.ports.values():
for i in range(len(spacings)):
bend = c << bend_factory(
angle=180,
radius=min_radius + np.sum(spacings[: i + 1]),
radius=min_radius + np.sum(spacings[:i]),
p=0,
cross_section=cross_section,
)
Expand Down Expand Up @@ -184,11 +185,11 @@ def spiral_racetrack_heater_doped(
heater_bot = c << heater_straight

heater_bot.connect("e1", spiral.ports["o1"].copy().rotate(180)).movey(
-spacing * (num // 2)
-spacing * (num // 2 - 1)
)

heater_top.connect("e1", spiral.ports["o2"].copy().rotate(180)).movey(
spacing * (num // 2)
spacing * (num // 2 - 1)
)

c.add_ports(spiral.ports)
Expand Down

0 comments on commit 379e775

Please sign in to comment.