Skip to content

Commit

Permalink
Merge pull request #10 from gdsfactory/fix_installer
Browse files Browse the repository at this point in the history
Fix installer
  • Loading branch information
joamatab authored Oct 14, 2023
2 parents 284504a + ebd811d commit 915e8bb
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 14 deletions.
2 changes: 1 addition & 1 deletion notebooks/10_layout.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"try:\n",
" import google.colab\n",
" is_running_on_colab = True\n",
" !pip install gdsfactory klayout > /dev/null\n",
" !pip install gdsfactory[cad] > /dev/null\n",
" \n",
"except ImportError:\n",
" is_running_on_colab = False"
Expand Down
40 changes: 27 additions & 13 deletions notebooks/10_layout_full.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"try:\n",
" import google.colab\n",
" is_running_on_colab = True\n",
" !pip install gdsfactory klayout > /dev/null\n",
" !pip install gdsfactory[cad] > /dev/null\n",
" \n",
"except ImportError:\n",
" is_running_on_colab = False"
Expand All @@ -53,7 +53,7 @@
"outputs": [],
"source": [
"import gdsfactory as gf\n",
"gf.CONF.display_type = 'klayout' # for plotting in Colab notebook"
"gf.CONF.display_type = 'klayout'"
]
},
{
Expand All @@ -69,9 +69,7 @@
"\n",
"![](https://i.imgur.com/oeuKGsc.png)\n",
"\n",
"In gdsfactory **all dimensions** are in **microns**\n",
"\n",
"based on [UCSB workshop](https://github.com/aisichenko/gdsfactory-workshop-ucsb) workshop"
"In gdsfactory **all dimensions** are in **microns**"
]
},
{
Expand Down Expand Up @@ -100,17 +98,17 @@
"source": [
"import gdsfactory as gf\n",
"\n",
"E = gf.components.ellipse(radii=(10, 5), layer=(1, 0))\n",
"R = gf.components.rectangle(size=[15, 5], layer=(2, 0))\n",
"C = gf.geometry.boolean(A=E, B=R, operation=\"not\", precision=1e-6, layer=(3, 0))\n",
"e = gf.components.ellipse(radii=(10, 5), layer=(1, 0))\n",
"r = gf.components.rectangle(size=[15, 5], layer=(2, 0))\n",
"b = gf.geometry.boolean(e, r, operation=\"not\", precision=1e-6, layer=(3, 0))\n",
"# Other operations include 'and', 'or', 'xor', or equivalently 'A-B', 'B-A', 'A+B'\n",
"\n",
"# Plot the originals and the result\n",
"D = gf.Component(\"bool\")\n",
"D.add_ref(E)\n",
"D.add_ref(R).movey(-1.5)\n",
"D.add_ref(C).movex(30)\n",
"D.plot()"
"c = gf.Component(\"bool\")\n",
"c.add_ref(e)\n",
"c.add_ref(r).movey(-1.5)\n",
"c.add_ref(b).movex(30)\n",
"c.plot()"
]
},
{
Expand Down Expand Up @@ -412,6 +410,14 @@
"c.write_gds(\"demo.gds\", with_metadata=True)"
]
},
{
"cell_type": "markdown",
"id": "71ca1661",
"metadata": {},
"source": [
"You can also write it in OASIS format"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -424,6 +430,14 @@
"c.write_oas(\"demo.oas\")"
]
},
{
"cell_type": "markdown",
"id": "5fd055d9",
"metadata": {},
"source": [
"Or in STL for 3D printing or for integrating with other 3D CAD or simulation tools."
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit 915e8bb

Please sign in to comment.