Browse Source

Ajout des pochoirs et du débourreur

master
hadware 2 months ago
parent
commit
1f9caafba5
  1. 79
      debourreur.ipynb
  2. 239
      pochoirs.ipynb
  3. 13
      poignee.ipynb

79
debourreur.ipynb

@ -0,0 +1,79 @@
{
"cells": [
{
"metadata": {
"ExecuteTime": {
"end_time": "2026-07-02T09:49:12.702573972Z",
"start_time": "2026-07-02T09:49:09.132035063Z"
}
},
"cell_type": "code",
"source": [
"from build123d import *\n",
"from ocp_vscode import set_port, show\n",
"\n",
"A6_largueur = 105\n",
"A6_hauteur = 148\n",
"fente_hauteur = 2\n",
"\n",
"with BuildPart() as bp:\n",
" Box(A6_hauteur - 2, A6_largueur - 2, fente_hauteur - 0.5)\n",
" e = edges(Select.LAST)\n",
" chamfer(e, length=0.5)\n",
" top_face = faces().filter_by(Plane.XY).sort_by(Axis.Z)[-1]\n",
" with BuildSketch(top_face):\n",
" with Locations((0,-40)):\n",
" Text(\"DEBOURRATOR 2000\", font_size=\"15\", font=\"Tanker\")\n",
" with GridLocations(110, 0, 2, 1):\n",
" Text(\"↑\", font_size=\"30\", font=\"Tanker\")\n",
" extrude(amount=-0.3, mode=Mode.SUBTRACT)\n",
"\n",
"set_port(3939)\n",
"show(bp.part)\n",
"export_stl(bp.part, \"/tmp/debourreur.stl\")"
],
"id": "a32cfe0f76b167e",
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"+\n"
]
},
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"execution_count": 23
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

239
pochoirs.ipynb

@ -0,0 +1,239 @@
{
"cells": [
{
"metadata": {
"ExecuteTime": {
"end_time": "2026-07-02T18:16:23.748002421Z",
"start_time": "2026-07-02T18:16:21.955278754Z"
}
},
"cell_type": "code",
"source": [
"from build123d import *\n",
"from ocp_vscode import set_port, show\n",
"\n",
"POCHOIR_LARGEUR = 240\n",
"POCHOIR_HAUTEUR = 130\n",
"POCHOIR_EPAISSEUR = 2.5\n",
"\n",
"with BuildPart() as bp:\n",
" Box(POCHOIR_LARGEUR, POCHOIR_HAUTEUR, POCHOIR_EPAISSEUR)\n",
" e = edges(Select.LAST)\n",
" chamfer(e, length=0.5)\n",
" top_face = faces().filter_by(Plane.XY).sort_by(Axis.Z)[-1]\n",
" with BuildSketch(top_face):\n",
" Text(\"UN MOTEUR\\nDE VOITURE\", font_size=\"40\", font='Saira Stencil Bold', align=Align.CENTER)\n",
" with Locations((0, -55)):\n",
" with GridLocations(150, 0, 2, 1):\n",
" Circle(7)\n",
" Rectangle(7, 20, align=(Align.CENTER, Align.MAX))\n",
" extrude(amount=-POCHOIR_EPAISSEUR, mode=Mode.SUBTRACT)\n",
"\n",
"set_port(3939)\n",
"show(bp.part)\n",
"export_stl(bp.part, \"/tmp/pochoir_titre_moteur.stl\")"
],
"id": "a32cfe0f76b167e",
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"+\n"
]
},
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 97,
"metadata": {},
"output_type": "execute_result"
}
],
"execution_count": 97
},
{
"metadata": {
"ExecuteTime": {
"end_time": "2026-07-02T18:22:24.575120152Z",
"start_time": "2026-07-02T18:22:23.946618083Z"
}
},
"cell_type": "code",
"source": [
"spacings = [10, 15, 20, 30, 50, 75, 100]\n",
"with BuildPart() as bp:\n",
" with BuildSketch(top_face):\n",
" for spacing,loc in zip(spacings, GridLocations(0, 30, 1, len(spacings))):\n",
" with Locations(loc):\n",
" Rectangle(spacing + 3, 7 - 0.5, align=(Align.CENTER, Align.CENTER))\n",
" with GridLocations(spacing + 7 * 2, 0, 2, 1):\n",
" Circle(7 - 0.5)\n",
" extrude(amount=POCHOIR_EPAISSEUR, mode=Mode.ADD)\n",
"\n",
"set_port(3939)\n",
"show(bp.part)\n",
"export_stl(bp.part, \"/tmp/link.stl\")"
],
"id": "80e56f1810785853",
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"+\n"
]
},
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 105,
"metadata": {},
"output_type": "execute_result"
}
],
"execution_count": 105
},
{
"metadata": {
"ExecuteTime": {
"end_time": "2026-07-02T15:53:20.046310135Z",
"start_time": "2026-07-02T15:53:17.447143764Z"
}
},
"cell_type": "code",
"source": [
"POCHOIR_LARGEUR = 195\n",
"POCHOIR_MOTEUR_HAUTEUR = 230\n",
"\n",
"moteur_emboss_svg: ShapeList = import_svg(\"vector/moteur.svg\")\n",
"moteur_emboss = Compound(moteur_emboss_svg)\n",
"\n",
"with BuildPart() as bp:\n",
" Box(POCHOIR_LARGEUR, POCHOIR_MOTEUR_HAUTEUR, POCHOIR_EPAISSEUR)\n",
" e = edges(Select.LAST)\n",
" chamfer(e, length=0.5)\n",
" top_face = faces().filter_by(Plane.XY).sort_by(Axis.Z)[-1]\n",
" with BuildSketch(top_face):\n",
" add(moteur_emboss.translate(-moteur_emboss.center() + (0,8,0)))\n",
" scale(by=0.32)\n",
"\n",
" with Locations((0, POCHOIR_MOTEUR_HAUTEUR / 2 - 12)):\n",
" with GridLocations(150, 0, 2, 1):\n",
" Circle(7)\n",
" Rectangle(7, 20, align=(Align.CENTER, Align.MIN))\n",
"\n",
" extrude(amount=-POCHOIR_EPAISSEUR, mode=Mode.SUBTRACT)\n",
"\n",
"set_port(3939)\n",
"show(bp.part)\n",
"export_stl(bp.part, \"/tmp/pochoir_moteur.stl\")"
],
"id": "ff8d99133cc42da7",
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"+\n"
]
},
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 96,
"metadata": {},
"output_type": "execute_result"
}
],
"execution_count": 96
},
{
"metadata": {
"ExecuteTime": {
"end_time": "2026-07-02T18:17:31.609718043Z",
"start_time": "2026-07-02T18:17:29.622247335Z"
}
},
"cell_type": "code",
"source": [
"POCHOIR_LARGEUR = 195\n",
"POCHOIR_SEAU_HAUTEUR = 230\n",
"\n",
"seau_emboss_svg: ShapeList = import_svg(\"vector/seau.svg\")\n",
"seau_emboss = Compound(seau_emboss_svg)\n",
"\n",
"with BuildPart() as bp:\n",
" Box(POCHOIR_LARGEUR, POCHOIR_SEAU_HAUTEUR, POCHOIR_EPAISSEUR)\n",
" e = edges(Select.LAST)\n",
" chamfer(e, length=0.5)\n",
" top_face = faces().filter_by(Plane.XY).sort_by(Axis.Z)[-1]\n",
" with BuildSketch(top_face):\n",
" add(seau_emboss.translate(-seau_emboss.center() + (0,-100,0)))\n",
" scale(by=0.30)\n",
"\n",
" with Locations((0, POCHOIR_SEAU_HAUTEUR / 2 - 12)):\n",
" with GridLocations(150, 0, 2, 1):\n",
" Circle(7)\n",
" Rectangle(7, 20, align=(Align.CENTER, Align.MIN))\n",
"\n",
" extrude(amount=-POCHOIR_EPAISSEUR, mode=Mode.SUBTRACT)\n",
"\n",
"set_port(3939)\n",
"show(bp.part)\n",
"export_stl(bp.part, \"/tmp/pochoir_seau.stl\")"
],
"id": "d01344a44e67a9c6",
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"+\n"
]
},
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 98,
"metadata": {},
"output_type": "execute_result"
}
],
"execution_count": 98
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

13
poignee.ipynb

@ -6,8 +6,8 @@
"metadata": {
"collapsed": true,
"ExecuteTime": {
"end_time": "2026-05-24T17:45:15.002996810Z",
"start_time": "2026-05-24T17:45:13.605491729Z"
"end_time": "2026-07-03T00:12:21.164271444Z",
"start_time": "2026-07-03T00:12:19.610252249Z"
}
},
"source": [
@ -100,7 +100,10 @@
"show(compound)\n",
"export_step(compound, \"/tmp/poignee.step\")\n",
"export_step(corps, \"/tmp/corps_poignee.step\")\n",
"export_step(plateau, \"/tmp/plateau_poignee.step\")"
"export_step(plateau, \"/tmp/plateau_poignee.step\")\n",
"export_stl(compound, \"/tmp/poignee.stl\")\n",
"export_stl(corps, \"/tmp/corps_poignee.stl\")\n",
"export_stl(plateau, \"/tmp/plateau_poignee.stl\")"
],
"outputs": [
{
@ -116,12 +119,12 @@
"True"
]
},
"execution_count": 147,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"execution_count": 147
"execution_count": 4
},
{
"metadata": {

Loading…
Cancel
Save