Otwieranie szuflady

This commit is contained in:
Rafal 2025-05-29 18:42:11 +00:00
parent ef59ef8cd1
commit f175d053b8
1 changed files with 17 additions and 10 deletions

View File

@ -46,7 +46,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 29, "execution_count": 30,
"id": "0859af03-2222-4b9d-b6fe-04bbc2794516", "id": "0859af03-2222-4b9d-b6fe-04bbc2794516",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
@ -54,23 +54,23 @@
"name": "stdout", "name": "stdout",
"output_type": "stream", "output_type": "stream",
"text": [ "text": [
"cc\n" "c\n"
] ]
}, },
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"<cad_viewer_widget.widget.CadViewer at 0x1485fde484a0>" "<cad_viewer_widget.widget.CadViewer at 0x1534a50d6d80>"
] ]
}, },
"execution_count": 29, "execution_count": 30,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
], ],
"source": [ "source": [
"podnies_karnister = False\n", "podnies_karnister = False\n",
"otwarta_szuflada = True\n", "otwarta_szuflada = Teuje\n",
"\n", "\n",
"\n", "\n",
"# Wymiary szkieletu boxa (mm)\n", "# Wymiary szkieletu boxa (mm)\n",
@ -138,7 +138,7 @@
"\n", "\n",
"\n", "\n",
"if otwarta_szuflada == True:\n", "if otwarta_szuflada == True:\n",
" szuflada_stan = (-dl/2+dl_sz/2-dl_sz,0,wys/2-profil+15)\n", " szuflada_stan = (-dl/2+dl_s/z/2-dl_sz,0,wys/2-profil+15)\n",
"else:\n", "else:\n",
" szuflada_stan = (-dl/2+dl_sz/2,0,wys/2-profil+15)\n", " szuflada_stan = (-dl/2+dl_sz/2,0,wys/2-profil+15)\n",
" \n", " \n",
@ -147,8 +147,15 @@
" with Locations(szuflada_stan):\n", " with Locations(szuflada_stan):\n",
" Box(dl_sz,sz_sz-(2*prowadnica),wys_sz)\n", " Box(dl_sz,sz_sz-(2*prowadnica),wys_sz)\n",
" offset(amount=-15, openings=szuflada.faces().filter_by(Axis.Z)[-1])\n", " offset(amount=-15, openings=szuflada.faces().filter_by(Axis.Z)[-1])\n",
" with Locations((0,0,wys_sz/2)):\n", " if otwarta_szuflada == True:\n",
" Box(dl_sz,sz_sz-2*prowadnica,sklejka)\n", " with Locations((-dl_sz/4,45.960,wys_sz/2+154.68)):\n",
" Box(dl_sz/2-sklejka,sz_sz-2*prowadnica,sklejka, rotation=(-45,0,0))\n",
" else: \n",
" with Locations((-dl_sz/4,0,wys_sz/2)):\n",
" Box(dl_sz/2-sklejka,sz_sz-2*prowadnica,sklejka)\n",
" \n",
" with Locations((dl_sz/4,0,wys_sz/2)):\n",
" Box(dl_sz/2,sz_sz-2*prowadnica,sklejka)\n",
" \n", " \n",
"with BuildPart() as wyciecie:\n", "with BuildPart() as wyciecie:\n",
" with Locations(szuflada_stan):\n", " with Locations(szuflada_stan):\n",
@ -197,8 +204,8 @@
"\n", "\n",
"# show(szuflada)\n", "# show(szuflada)\n",
"# show_all()\n", "# show_all()\n",
"# show(razem)\n", "show(razem)\n",
"show(zlew,test)" "# show(zlew,test)"
] ]
}, },
{ {