Renfort pour le cadre
This commit is contained in:
+31
-22
@@ -6,16 +6,16 @@
|
|||||||
"metadata": {
|
"metadata": {
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"ExecuteTime": {
|
"ExecuteTime": {
|
||||||
"end_time": "2026-05-22T01:25:54.666792544Z",
|
"end_time": "2026-05-22T18:32:07.989017130Z",
|
||||||
"start_time": "2026-05-22T01:25:54.440667158Z"
|
"start_time": "2026-05-22T18:32:07.752507264Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"source": [
|
"source": [
|
||||||
"from build123d import *\n",
|
"from build123d import *\n",
|
||||||
"from ocp_vscode import show, set_port\n",
|
"from ocp_vscode import show, set_port\n",
|
||||||
"\n",
|
"\n",
|
||||||
"A3_largueur = 105\n",
|
"A3_largueur = 148\n",
|
||||||
"A3_hauteur = 148\n",
|
"A3_hauteur = 210\n",
|
||||||
"\n",
|
"\n",
|
||||||
"stand_bordure = 5 # de chaque coté\n",
|
"stand_bordure = 5 # de chaque coté\n",
|
||||||
"stand_epaisseur = 5\n",
|
"stand_epaisseur = 5\n",
|
||||||
@@ -49,24 +49,24 @@
|
|||||||
"name": "stdout",
|
"name": "stdout",
|
||||||
"output_type": "stream",
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
"Plane(o=(-101.50, 0.00, 0.00), x=(0.00, 0.00, 1.00), z=(-1.00, -0.00, 0.00))\n",
|
"Plane(o=(-50.00, 0.00, 0.00), x=(0.00, 0.00, 1.00), z=(-1.00, -0.00, 0.00))\n",
|
||||||
"c\n"
|
"+\n"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"execution_count": 15
|
"execution_count": 116
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"ExecuteTime": {
|
"ExecuteTime": {
|
||||||
"end_time": "2026-05-22T17:29:08.227823509Z",
|
"end_time": "2026-05-22T18:35:49.426903482Z",
|
||||||
"start_time": "2026-05-22T17:29:07.494508009Z"
|
"start_time": "2026-05-22T18:35:48.369326760Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"source": [
|
"source": [
|
||||||
"A3_largueur = 105\n",
|
"A3_largueur = 148\n",
|
||||||
"A3_hauteur = 148\n",
|
"A3_hauteur = 210\n",
|
||||||
"\n",
|
"\n",
|
||||||
"stand_bordure = 5 # de chaque coté\n",
|
"stand_bordure = 5 # de chaque coté\n",
|
||||||
"stand_epaisseur = 5\n",
|
"stand_epaisseur = 5\n",
|
||||||
@@ -98,6 +98,7 @@
|
|||||||
" Rectangle(A3_largueur - 10, A3_hauteur - 10)\n",
|
" Rectangle(A3_largueur - 10, A3_hauteur - 10)\n",
|
||||||
" extrude(amount=-1.8, mode=Mode.SUBTRACT)\n",
|
" extrude(amount=-1.8, mode=Mode.SUBTRACT)\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
" # extrusion du rail\n",
|
||||||
" stand_backface = faces().filter_by(Plane.XY).sort_by(Axis.Z)[-1]\n",
|
" stand_backface = faces().filter_by(Plane.XY).sort_by(Axis.Z)[-1]\n",
|
||||||
" with BuildSketch(stand_backface):\n",
|
" with BuildSketch(stand_backface):\n",
|
||||||
" with Locations((0, stand_backface.width / 2)):\n",
|
" with Locations((0, stand_backface.width / 2)):\n",
|
||||||
@@ -111,9 +112,17 @@
|
|||||||
" align=(Align.CENTER, Align.MAX))\n",
|
" align=(Align.CENTER, Align.MAX))\n",
|
||||||
" loft(mode=Mode.SUBTRACT)\n",
|
" loft(mode=Mode.SUBTRACT)\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
" # rajout des renforts\n",
|
||||||
|
" middle_angle_plane = Plane(origin=(stand_bordure + 10, stand_backface.center().Y, 0)).rotated(\n",
|
||||||
|
" (0, -stand_angle_pied / 2, 0))\n",
|
||||||
|
" with BuildSketch(middle_angle_plane):\n",
|
||||||
|
" with GridLocations(0, stand_largueur - stand_bordure, 1, 2):\n",
|
||||||
|
" Rectangle(10, 5)\n",
|
||||||
|
" extrude(until=Until.NEXT, both=True)\n",
|
||||||
|
"\n",
|
||||||
"cadre = cadre.part\n",
|
"cadre = cadre.part\n",
|
||||||
"\n",
|
"\n",
|
||||||
"clearance = 0.2\n",
|
"clearance = 0.5\n",
|
||||||
"\n",
|
"\n",
|
||||||
"with BuildPart() as rail:\n",
|
"with BuildPart() as rail:\n",
|
||||||
" with BuildSketch(Plane.XY) as sk1:\n",
|
" with BuildSketch(Plane.XY) as sk1:\n",
|
||||||
@@ -143,7 +152,7 @@
|
|||||||
"rail_joint = LinearJoint(\n",
|
"rail_joint = LinearJoint(\n",
|
||||||
" label=\"insert\",\n",
|
" label=\"insert\",\n",
|
||||||
" to_part=rail,\n",
|
" to_part=rail,\n",
|
||||||
" axis=Axis((rail.faces()\n",
|
" axis=-Axis((rail.faces()\n",
|
||||||
" .filter_by(Plane.YZ)\n",
|
" .filter_by(Plane.YZ)\n",
|
||||||
" .sort_by(Axis.X)[-1]\n",
|
" .sort_by(Axis.X)[-1]\n",
|
||||||
" .offset(-(A3_hauteur + stand_bordure) / 2))\n",
|
" .offset(-(A3_hauteur + stand_bordure) / 2))\n",
|
||||||
@@ -156,7 +165,7 @@
|
|||||||
"cadre_joint.connect_to(rail_joint, position=0)\n",
|
"cadre_joint.connect_to(rail_joint, position=0)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# Or move to a specific position\n",
|
"# Or move to a specific position\n",
|
||||||
"cadre_joint.connect_to(rail_joint, position=0)\n",
|
"cadre_joint.connect_to(rail_joint, position=60)\n",
|
||||||
"assembly = Compound(children=[cadre, rail])\n",
|
"assembly = Compound(children=[cadre, rail])\n",
|
||||||
"cog = assembly.center(CenterOf.MASS)\n",
|
"cog = assembly.center(CenterOf.MASS)\n",
|
||||||
"cog_marker = Sphere(2).locate(Location(cog))\n",
|
"cog_marker = Sphere(2).locate(Location(cog))\n",
|
||||||
@@ -168,35 +177,35 @@
|
|||||||
"name": "stdout",
|
"name": "stdout",
|
||||||
"output_type": "stream",
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
"cc+\n"
|
"c++\n"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"execution_count": 92
|
"execution_count": 126
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"ExecuteTime": {
|
"ExecuteTime": {
|
||||||
"end_time": "2026-05-22T17:26:35.126466252Z",
|
"end_time": "2026-05-22T18:10:39.214716262Z",
|
||||||
"start_time": "2026-05-22T17:26:35.071890866Z"
|
"start_time": "2026-05-22T18:10:39.161736598Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"source": "Compound(children=[cadre, rail]).center(CenterOf.MASS)",
|
"source": "Plane.XY.rotated()",
|
||||||
"id": "9c05871fcb7d0f44",
|
"id": "9c05871fcb7d0f44",
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"Vector(54.041693811711, -57.5, 6.2695039269171)"
|
"Plane(o=(0.00, 0.00, 0.00), x=(1.00, 0.00, 0.00), z=(0.00, 0.00, 1.00))"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 89,
|
"execution_count": 96,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"output_type": "execute_result"
|
"output_type": "execute_result"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"execution_count": 89
|
"execution_count": 96
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"metadata": {
|
"metadata": {
|
||||||
|
|||||||
Reference in New Issue
Block a user