{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "42f10d1f",
   "metadata": {},
   "outputs": [],
   "source": [
    "from openscad import *\n",
    "hub=l_extrude(circle(52/2),15)\n",
    "rim_sec=square([30,15])\n",
    "path_rim=c2t3(circle(208/2-30))\n",
    "rim=path_extrudec(rim_sec,path_rim)\n",
    "spoke_path=trns([0,0,7.5],[[i/4,10*sin(i*pi/180)] for i in arange(30,360-30,5)])\n",
    "spoke_sec=circle(4)\n",
    "spoke=path_extrude(spoke_sec,spoke_path)\n",
    "fillet_hub=fillet_sol2sol(hub,spoke,2,10,1)\n",
    "fillet_rim=fillet_sol2sol(rim,spoke,2,10,0)\n",
    "with open('/Users/sanjeevprabhakar/iCloud Drive (Archive)/Documents/Download/openscad/trial.scad','w+') as f:\n",
    "    f.write(f'''\n",
    "include<dependencies2.scad> \n",
    "render(){{\n",
    "{swp(hub)}\n",
    "{swp_c(rim)}\n",
    "{swp(spoke)}\n",
    "{swp_c(fillet_hub)}\n",
    "{swp_c(fillet_rim)}\n",
    "\n",
    "}}\n",
    "''')\n",
    "\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "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.8.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
