Skip to content

Commit d3a72bf

Browse files
committed
Minor doc and test update
1 parent 9b3deca commit d3a72bf

File tree

3 files changed

+8
-15
lines changed

3 files changed

+8
-15
lines changed

docs/src/routes.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ A `Route` supports endpoint inspection much like a `Path` does:
6060

6161
### Channel routing
6262

63-
`RouteChannels` offer a way to run routes in parallel, with routes joining or leaving a channel at different points. Using `SingleChannelRouting`, we can set the "track" (a path offset from the channel centerline) for each route through the channel, as well as some rules for joining and leaving the channel from route start and end points. Here's a basic example with a straight channel:
63+
`RouteChannels` offer a way to run routes in parallel, with routes joining or leaving a channel at different points. Using [`Paths.SingleChannelRouting`](@ref), we can set the "track" (a curve offset from the channel centerline) for each route to follow through the channel, as well as some rules for joining and leaving the channel from route start and end points. Here's a basic example with a straight channel:
6464

6565
```@example 1
6666
using DeviceLayout, .PreferredUnits, FileIO
@@ -101,7 +101,7 @@ for (pa, p1) in zip(paths, p1s)
101101
end
102102
c = Cell("test")
103103
render!.(c, paths, GDSMeta())
104-
render!(c, channel_path, GDSMeta(2))
104+
render!(c, channel_path, GDSMeta(1))
105105
save("straight_channel.svg", flatten(c); width=6inch, height=2inch);
106106
nothing; # hide
107107
```
@@ -139,7 +139,7 @@ for (pa, p1) in zip(paths, p1s)
139139
end
140140
c = Cell("test")
141141
render!.(c, paths, GDSMeta())
142-
render!(c, channel_path, GDSMeta(2))
142+
render!(c, channel_path, GDSMeta(1))
143143
save("bspline_channel.svg", flatten(c); width=6inch, height=4inch);
144144
nothing; # hide
145145
```
@@ -175,7 +175,7 @@ for (pa, p1) in zip(paths, p1s)
175175
end
176176
c = Cell("test")
177177
render!.(c, paths, GDSMeta())
178-
render!(c, channel_path, GDSMeta(2))
178+
render!(c, channel_path, GDSMeta(1))
179179
save("compound_channel.svg", flatten(c); width=6inch, height=4inch);
180180
nothing; # hide
181181
```

test/test_channels.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ function test_schematic_single_channel()
127127
rule,
128128
spacer1 => :p1_west,
129129
spacer2 => :p1_east,
130-
Paths.SimpleTrace(1μm),
130+
Paths.CPW(1μm, 1μm),
131131
GDSMeta()
132132
)
133133
r2 = route!(
@@ -144,6 +144,8 @@ function test_schematic_single_channel()
144144
# Track assignment means pa1 track is 100um below pa2 track
145145
@test pathlength(pa1) 2 * (450μm + pi * 50μm + 0.4mm) + 1mm atol = 1nm
146146
@test pathlength(pa2) 2 * (350μm + pi * 50μm + 0.4mm) + 1mm atol = 1nm
147+
c = Cell("test", nm)
148+
return render!(c, pa1, GDSMeta()) # No error
147149
end
148150

149151
@testset "Channels" begin
@@ -183,8 +185,6 @@ end
183185
)
184186
Paths.set_track!(rule, pa2, 1)
185187
route!(pa2, Point(0.1mm, 0.1mm), 0, rule, Paths.CPW(2nm, 2nm))
186-
c = Cell("test", nm)
187-
render!(c, pa2, GDSMeta()) # No error
188188
@test length(pa2) == 1 # Channel segment turned into waypoint
189189

190190
## Schematic-level routing

test/test_routes.jl

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,7 @@
118118
@test α1(pa) == α_end
119119

120120
# Use StraightAnd45 with incompatible waypoints
121-
r4 = Route(
122-
Paths.StraightAnd45(min_bend_radius=20, max_bend_radius=20),
123-
p_start,
124-
p_end,
125-
α_start,
126-
α_end,
127-
waypoints=waypoints
128-
)
121+
r4 = Route(Paths.StraightAnd45(20), p_start, p_end, α_start, α_end, waypoints=waypoints)
129122
@test_throws ErrorException (pa = Path(r4, sty))
130123

131124
# Use StraightAnd45

0 commit comments

Comments
 (0)