Comments (2)
fixed by d6ef9cb
from kfactory.
not really fixed
try this
import gdsfactory as gf
import numpy as np
c = gf.Component()
waveguide_width = 1
ring_width = 1
ring_radius = 114
layer = (2,0)
couple_radius = 10
gap_up = 1
xs = gf.cross_section.cross_section(width=waveguide_width, layer=layer)
coupler1 = gf.path.arc(radius=couple_radius, start_angle=-90, angle=90)
coupler1 = c << (coupler1.extrude(xs))
coupler1.dmovey(-couple_radius)
coupler1.dmove(
[(ring_radius + couple_radius + 0.5 * (ring_width + waveguide_width) + gap_up) * np.cos(135 / 180 * np.pi),
(ring_radius + couple_radius + 0.5 * (ring_width + waveguide_width) + gap_up) * np.sin(135 / 180 * np.pi)])
coupler2 = gf.path.arc(radius=couple_radius, start_angle=-180, angle=90)
coupler2 = c << (coupler2.extrude(xs))
coupler2.dmovey(-couple_radius)
coupler2.dmove(
[(ring_radius + couple_radius + 0.5 * (ring_width + waveguide_width) + gap_up) * np.cos(45 / 180 * np.pi),
(ring_radius + couple_radius + 0.5 * (ring_width + waveguide_width) + gap_up) * np.sin(45 / 180 * np.pi)])
route = gf.routing.route_single(
c,
coupler1['o2'],
coupler2['o1'],
bend=gf.components.bend_circular,
radius=-0.005 + 0.5 * abs(coupler1.ports['o2'].dx - coupler2.ports['o1'].dx),
cross_section=xs,
)
print(route.length)
c.show()
the lenght should be around pi*80
from kfactory.
Related Issues (20)
- routing with bboxes seems to ignore the bboxes HOT 2
- Implement __contains__ in KCellSettings
- use_mirror flag in connect does not behave as expected HOT 1
- Regression tests HOT 2
- routing regressions
- to_dbu fails on negative numbers HOT 1
- Check version of klayout GUI vs python klayout version
- Euler bend pcells not snapping to grid HOT 2
- routing issues HOT 1
- changelog in docs are not up to date
- Change enclosures and similar to use layer names instead of indexes
- Allow multiple KCellEnclosures
- Object has been destroyed already in Cell.name when loading from gds HOT 2
- Add "tags" to cell decorator HOT 2
- Double `or` printed in `src/kfactory/kcell.py`
- Add a DOE packing function
- raise error for imposible routes HOT 1
- Support `kcl.cell(include_module=True)` HOT 8
- Flattening removes texts
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kfactory.