NEW: shaker plate model (#1)
This commit is contained in:
parent
453cf1dd12
commit
f15729f5ad
2 changed files with 89 additions and 0 deletions
BIN
shaker_plate.stl
Normal file
BIN
shaker_plate.stl
Normal file
Binary file not shown.
89
src/shaker_plate.ipynb
Normal file
89
src/shaker_plate.ipynb
Normal file
|
@ -0,0 +1,89 @@
|
||||||
|
{
|
||||||
|
"cells": [
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"%matplotlib inline"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"import math\n",
|
||||||
|
"\n",
|
||||||
|
"import numpy as np\n",
|
||||||
|
"import matplotlib.pyplot as plt"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"fig, ax = plt.subplots()\n",
|
||||||
|
"plt.xlim(-5, 150)\n",
|
||||||
|
"plt.ylim(-5, 150)\n",
|
||||||
|
"ax.set_aspect(1)\n",
|
||||||
|
"\n",
|
||||||
|
"cx, cy, r1, r2, r3, rh, rp = 72.5, 72.5, 72.5, 63.5, 50.0, 6.0, 4.5\n",
|
||||||
|
"\n",
|
||||||
|
"ax.add_artist(plt.Circle((cx, cy), r1, color='red'))\n",
|
||||||
|
"print('tube coords (lower left)')\n",
|
||||||
|
"for angle in np.arange(0, math.pi*2, math.pi/12):\n",
|
||||||
|
" x = (r2 * math.cos(angle)) + cx\n",
|
||||||
|
" y = (r2 * math.sin(angle)) + cy\n",
|
||||||
|
" print(round(x - rh, 1), round(y - rh, 1))\n",
|
||||||
|
" ax.add_artist(plt.Circle((x, y), rh, color='black'))\n",
|
||||||
|
"print('###')\n",
|
||||||
|
"print('post coords (lower left)')\n",
|
||||||
|
"for angle in np.arange(0, math.pi*2, math.pi*2/3):\n",
|
||||||
|
" x = (r3 * math.cos(angle)) + cx\n",
|
||||||
|
" y = (r3 * math.sin(angle)) + cy\n",
|
||||||
|
" print(round(x - rh, 1), round(y - rh, 1))\n",
|
||||||
|
" ax.add_artist(plt.Circle((x, y), rh, color='white'))\n",
|
||||||
|
"print('###')\n",
|
||||||
|
"print('post-hole coords (lower left)')\n",
|
||||||
|
"for angle in np.arange(0, math.pi*2, math.pi/3):\n",
|
||||||
|
" x = (r3 * math.cos(angle)) + cx\n",
|
||||||
|
" y = (r3 * math.sin(angle)) + cy\n",
|
||||||
|
" print(round(x - rp, 1), round(y - rp, 1))\n",
|
||||||
|
" ax.add_artist(plt.Circle((x, y), rp, color='black'))"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"kernelspec": {
|
||||||
|
"display_name": "Python 3",
|
||||||
|
"language": "python",
|
||||||
|
"name": "python3"
|
||||||
|
},
|
||||||
|
"language_info": {
|
||||||
|
"codemirror_mode": {
|
||||||
|
"name": "ipython",
|
||||||
|
"version": 3
|
||||||
|
},
|
||||||
|
"file_extension": ".py",
|
||||||
|
"mimetype": "text/x-python",
|
||||||
|
"name": "python",
|
||||||
|
"nbconvert_exporter": "python",
|
||||||
|
"pygments_lexer": "ipython3",
|
||||||
|
"version": "3.6.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 2
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue