Ajustement dimension des embossing
This commit is contained in:
+34
-23
@@ -6,22 +6,15 @@
|
|||||||
"metadata": {
|
"metadata": {
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"ExecuteTime": {
|
"ExecuteTime": {
|
||||||
"end_time": "2026-05-16T16:06:57.388758263Z",
|
"end_time": "2026-05-17T23:28:42.138106727Z",
|
||||||
"start_time": "2026-05-16T16:06:29.224097165Z"
|
"start_time": "2026-05-17T23:28:27.883466201Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"source": [
|
"source": [
|
||||||
"from itertools import product\n",
|
"from itertools import product\n",
|
||||||
"\n",
|
"\n",
|
||||||
"from ocp_vscode import show\n",
|
|
||||||
"\n",
|
|
||||||
"\"\"\"\n",
|
|
||||||
"punch-guide — build123d\n",
|
|
||||||
"4 pièces : superieure, inferieure, couvercle, (bac)\n",
|
|
||||||
"Exporte chaque pièce en STEP et STL dans ./exports/\n",
|
|
||||||
"\"\"\"\n",
|
|
||||||
"\n",
|
|
||||||
"from build123d import *\n",
|
"from build123d import *\n",
|
||||||
|
"from ocp_vscode import show\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# ─────────────────────────────────────────────────────────────────────────────\n",
|
"# ─────────────────────────────────────────────────────────────────────────────\n",
|
||||||
"# PARAMÈTRES — modifier ici uniquement\n",
|
"# PARAMÈTRES — modifier ici uniquement\n",
|
||||||
@@ -64,7 +57,7 @@
|
|||||||
"ailettes_ecart = 26 # mm\n",
|
"ailettes_ecart = 26 # mm\n",
|
||||||
"ailettes_epaisseur = 3 # mm\n",
|
"ailettes_epaisseur = 3 # mm\n",
|
||||||
"ailettes_hauteur = 30 # mm\n",
|
"ailettes_hauteur = 30 # mm\n",
|
||||||
"ailettes_profondeur = 20 # mm\n",
|
"ailettes_profondeur = 21 # mm\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# Trou d'évacuation (confettis)\n",
|
"# Trou d'évacuation (confettis)\n",
|
||||||
"evac_taille = 48.0 # mm — côté du carré (45 + jeu)\n",
|
"evac_taille = 48.0 # mm — côté du carré (45 + jeu)\n",
|
||||||
@@ -117,7 +110,7 @@
|
|||||||
"# léger offset pour centrer la zone à extruder dans l'axe de l'extrudeuse\n",
|
"# léger offset pour centrer la zone à extruder dans l'axe de l'extrudeuse\n",
|
||||||
"fente_y = fente_largeur / 2 - tracte_extrusion_center_y_offset\n",
|
"fente_y = fente_largeur / 2 - tracte_extrusion_center_y_offset\n",
|
||||||
"fente_z_abs = epaisseur_fond + zone_extrusion_offset_hauteur # hauteur absolue depuis le bas\n",
|
"fente_z_abs = epaisseur_fond + zone_extrusion_offset_hauteur # hauteur absolue depuis le bas\n",
|
||||||
"fente_profondeur = tract_extrusion_center_x_offset + zone_extrusion_offset_avant + epaisseur_paroi\n",
|
"fente_profondeur = tract_extrusion_center_x_offset + zone_extrusion_offset_avant + epaisseur_paroi + 3\n",
|
||||||
"\n",
|
"\n",
|
||||||
"bloc_extrudeur_int_x = cav_dim_x\n",
|
"bloc_extrudeur_int_x = cav_dim_x\n",
|
||||||
"bloc_extrudeur_int_y = max(cav_dim_y, fente_largeur + fente_y)\n",
|
"bloc_extrudeur_int_y = max(cav_dim_y, fente_largeur + fente_y)\n",
|
||||||
@@ -297,18 +290,25 @@
|
|||||||
" cx = (min_x + max_x) / 2\n",
|
" cx = (min_x + max_x) / 2\n",
|
||||||
"\n",
|
"\n",
|
||||||
" with BuildSketch(front_plane) as sk:\n",
|
" with BuildSketch(front_plane) as sk:\n",
|
||||||
" add([s.translate((-cx, 0, 0)) for s in logo_shapes])\n",
|
" add([s.translate((-cx, -4, 0)) for s in logo_shapes])\n",
|
||||||
" scale(by=0.7)\n",
|
" scale(by=0.6)\n",
|
||||||
"\n",
|
"\n",
|
||||||
" extrude(amount=-1, mode=Mode.SUBTRACT) # 1.5 mm de profondeur\n",
|
" extrude(amount=-1, mode=Mode.SUBTRACT) # 1.5 mm de profondeur\n",
|
||||||
"\n",
|
"\n",
|
||||||
" # Affichage du nom sur les deux cotés de la boite\n",
|
" # Affichage du nom sur les deux cotés de la boite\n",
|
||||||
" left_face = faces().filter_by(Axis.Y).sort_by(Axis.Y)[0]\n",
|
" left_face = faces().filter_by(Axis.Y).sort_by(Axis.Y)[0]\n",
|
||||||
" right_face = faces().filter_by(Axis.Y).sort_by(Axis.Y)[-1]\n",
|
" right_face = faces().filter_by(Axis.Y).sort_by(Axis.Y)[-1]\n",
|
||||||
|
" line_spacing = 17\n",
|
||||||
" for side_face in [left_face, right_face]:\n",
|
" for side_face in [left_face, right_face]:\n",
|
||||||
" # side_face = Plane(side_face).rotated((0, 90, 0))\n",
|
" # side_face = Plane(side_face).rotated((0, 90, 0))\n",
|
||||||
" with BuildSketch(side_face.translate((0, 0, -5))) as sk:\n",
|
" with BuildSketch(side_face.translate((0, 0, 7))) as sk:\n",
|
||||||
" Text(\"GUI-O-TRACTINE\\n3000\",\n",
|
" Text(\"DETRACTOR\",\n",
|
||||||
|
" font_size=20,\n",
|
||||||
|
" align=Align.CENTER,\n",
|
||||||
|
" font=\"Tanker\",\n",
|
||||||
|
" rotation=-90)\n",
|
||||||
|
" with Locations((-line_spacing,0)):\n",
|
||||||
|
" Text(\"3000\",\n",
|
||||||
" font_size=20,\n",
|
" font_size=20,\n",
|
||||||
" align=Align.CENTER,\n",
|
" align=Align.CENTER,\n",
|
||||||
" font=\"Tanker\",\n",
|
" font=\"Tanker\",\n",
|
||||||
@@ -362,6 +362,17 @@
|
|||||||
" top_edges = (edges(Select.LAST).filter_by(Axis.X).sort_by(Axis.Z)[-4:])\n",
|
" top_edges = (edges(Select.LAST).filter_by(Axis.X).sort_by(Axis.Z)[-4:])\n",
|
||||||
" chamfer(top_edges, length=0.5)\n",
|
" chamfer(top_edges, length=0.5)\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
" # on enlève le bas des ailettes\n",
|
||||||
|
" points = [\n",
|
||||||
|
" (0, 0), # Premier sommet\n",
|
||||||
|
" (0, -ailettes_profondeur), # Deuxième sommet\n",
|
||||||
|
" (ailettes_profondeur, -ailettes_profondeur) # Troisième sommet\n",
|
||||||
|
" ]\n",
|
||||||
|
" with BuildSketch(Plane.XZ):\n",
|
||||||
|
" with Locations((cav_dim_x / 2, 0)):\n",
|
||||||
|
" Polygon(points, align=(Align.MAX, Align.CENTER))\n",
|
||||||
|
" extrude(amount=ailettes_ecart / 2 + ailettes_epaisseur, mode=Mode.SUBTRACT, both=True)\n",
|
||||||
|
"\n",
|
||||||
" with BuildPart() as p_bottom:\n",
|
" with BuildPart() as p_bottom:\n",
|
||||||
" add(bottom)\n",
|
" add(bottom)\n",
|
||||||
" top_face = faces().filter_by(Plane.XY).sort_by(Axis.Z)[-1]\n",
|
" top_face = faces().filter_by(Plane.XY).sort_by(Axis.Z)[-1]\n",
|
||||||
@@ -468,8 +479,8 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"show(\n",
|
"show(\n",
|
||||||
" make_bloc_extrudeur(),\n",
|
" make_bloc_extrudeur(),\n",
|
||||||
" make_bac_recup().translate((0, 0, -(bloc_extrudeur_ext_z / 2 + 2 * gap))),\n",
|
" make_bac_recup().translate((0, 0, -(bac_hauteur/2 + bloc_extrudeur_ext_z / 2) + emboitement_profondeur)),\n",
|
||||||
" make_couvercle().translate((0, 0, bloc_extrudeur_ext_z / 2 + gap)),\n",
|
" make_couvercle().translate((0, 0, couv_ext_z/2 + bloc_extrudeur_ext_z / 2 - emboitement_profondeur)),\n",
|
||||||
" names=[\"superieure\", \"inferieure\", \"couvercle\"],\n",
|
" names=[\"superieure\", \"inferieure\", \"couvercle\"],\n",
|
||||||
" colors=[\"#ff7800\", \"#000000\", \"#000000\"],\n",
|
" colors=[\"#ff7800\", \"#000000\", \"#000000\"],\n",
|
||||||
")"
|
")"
|
||||||
@@ -483,7 +494,7 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"execution_count": 124
|
"execution_count": 157
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"metadata": {
|
"metadata": {
|
||||||
@@ -588,8 +599,8 @@
|
|||||||
{
|
{
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"ExecuteTime": {
|
"ExecuteTime": {
|
||||||
"end_time": "2026-05-15T13:58:22.949409543Z",
|
"end_time": "2026-05-17T23:37:18.404982125Z",
|
||||||
"start_time": "2026-05-15T13:58:10.759490392Z"
|
"start_time": "2026-05-17T23:37:03.924008868Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
@@ -605,12 +616,12 @@
|
|||||||
"True"
|
"True"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 121,
|
"execution_count": 158,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"output_type": "execute_result"
|
"output_type": "execute_result"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"execution_count": 121
|
"execution_count": 158
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
|
|||||||
Reference in New Issue
Block a user