|
209 | 209 | pa = Path{Float64}() |
210 | 210 | straight!(pa, 20.0, Paths.Trace(x -> 2.0 * x)) |
211 | 211 | render!(c, pa) |
| 212 | + revsty = reverse(pa[1]).sty |
| 213 | + @test Paths.width(revsty, 0) == Paths.trace(pa[1].sty, 20) |
| 214 | + @test Paths.extent(revsty)(20) == 0.5 * Paths.width(pa[1].sty)(0) |
212 | 215 | end |
213 | 216 |
|
214 | 217 | @testset "Straight, SimpleCPW" begin |
|
228 | 231 | p(20.082731241720513, 1.7128648145206729), |
229 | 232 | p(0.5197792270443984, -2.4453690018345142) |
230 | 233 | ] |
| 234 | + revsty = reverse(pa[1]).sty |
| 235 | + @test Paths.trace(revsty, 0) == Paths.trace(pa[1].sty, 20) |
| 236 | + @test Paths.trace(revsty, 20) == Paths.trace(pa[1].sty, 0) |
231 | 237 |
|
232 | 238 | c = Cell("main", pm2μm) |
233 | 239 | pa = Path(μm2μm, α0=12°) |
|
249 | 255 | ] * 10^6 |
250 | 256 | end |
251 | 257 |
|
252 | | - # @testset "Straight, GeneralCPW" begin |
253 | | - # |
254 | | - # end |
| 258 | + @testset "Straight, GeneralCPW" begin |
| 259 | + c = Cell{Float64}("main") |
| 260 | + pa = Path(NoUnits, α0=12°) |
| 261 | + straight!(pa, 20.0, Paths.CPW(x -> 2 * x, x -> 3 * x)) |
| 262 | + revsty = reverse(pa[1]).sty |
| 263 | + @test Paths.trace(revsty, 0) == Paths.trace(pa[1].sty, 20) |
| 264 | + @test Paths.trace(revsty, 20) == Paths.trace(pa[1].sty, 0) |
| 265 | + end |
255 | 266 |
|
256 | 267 | @testset "Turn, SimpleTrace" begin |
257 | 268 | c = Cell{Float64}("main") |
|
424 | 435 | p(50000.0nm, -4000.0nm), |
425 | 436 | p(0.0nm, -5000.0nm) |
426 | 437 | ] |
| 438 | + revsty = reverse(pa[1]).sty |
| 439 | + @test Paths.trace(revsty, 0.0μm) == Paths.trace(pa[1].sty, 50.0μm) |
| 440 | + @test Paths.trace(revsty, 50.0μm) == Paths.trace(pa[1].sty, 0.0μm) |
427 | 441 |
|
428 | 442 | @test_throws "length" split(Paths.TaperCPW(10.0μm, 6.0μm, 8.0μm, 2.0μm), 10μm) |
429 | 443 |
|
|
447 | 461 | pa = Path(μm) |
448 | 462 | turn!(pa, π / 2, 20μm, Paths.TaperTrace(10μm, 20μm)) |
449 | 463 | render!(c, pa, GDSMeta(0)) |
| 464 | + @test Paths.trace(pa[1].sty, 0μm) == 10μm |
450 | 465 |
|
451 | 466 | @test (elements(c)[1]).p[1] ≈ p(0.0nm, -5000.0nm) |
452 | 467 | @test (elements(c)[1]).p[end] ≈ p(0.0nm, 5000.0nm) |
|
556 | 571 | straight!(pa, 20μm, Paths.Trace(15μm)) |
557 | 572 | straight!(pa, 20μm, Paths.Trace(20μm)) |
558 | 573 | simplify!(pa) |
| 574 | + revsty = reverse(pa[1]).sty |
| 575 | + @test Paths.trace(revsty, 10μm) == Paths.trace(pa[1].sty, 50μm) |
| 576 | + @test Paths.trace(revsty, 50μm) == Paths.trace(pa[1].sty, 10μm) |
559 | 577 |
|
560 | 578 | pa2 = split(pa[1], 20μm) |
561 | 579 | @test length(pa2) == 2 |
|
0 commit comments