--- jupyter: description: 'A clevis as a 3D CAD exercise: a dimensioned drawing with a full section to model in planex2d or any CAD system, a solution from a U profile padded, a pin hole through both prongs and a blind hole for the rod, and the volume, mass and center of mass to check a model against.' --- # Clevis A clevis joins a rod to a link. The rod screws into its base, and a pin passes through both prongs of its fork and the link between them. As a solid, it is a U profile padded, a pin hole cut through both prongs at once, and a blind hole in its base. Model the clevis from the drawing in planex2d or in any CAD system, then check its volume, mass and center of mass against the values at the end of the page. A solution in planex2d follows. ![The clevis exercise: a dimensioned drawing of a fork with a pin hole through both prongs and a blind hole for the rod, in a full section, a side view and an isometric](../_static/gallery/clevis.png){.result} ```python import math import netgen.occ as occ import planex as px ``` ```python nbsphinx="hidden" from docs_figures import Row, Views ``` ## The profile The profile is the front view, sketched in the front plane, the plane with its normal toward the viewer, $-y$. It has $x$ to the right and $z$ up, with the origin in the middle of the bottom. The outline runs from the bottom left corner along the bottom, up the right side, over the right prong, down into the fork, across its bottom and up the left prong's inside. With `auto_constraint=True`, the flags `px.Horizontal` and `px.Vertical` become constraints. The clevis is 40 wide and 50 high, its fork 16 wide and 30 deep. The left prong's inside and top mirror the right ones about the vertical axis, which sets their directions too. With these, nothing in the sketch is left free (Figure 1): ```python front = px.XZ u = px.Sketch(front, auto_constraint=True) u.Move((-20, 0)).Line(40, px.Horizontal, id="bottom") u.Turn(90).Line(50, px.Vertical, id="right_side") # Turn(90) turns the pen left, Turn(-90) right u.Turn(90).Line(12, px.Horizontal, id="right_top") u.Turn(90).Line(30, px.Vertical, id="right_cheek") u.Turn(-90).Line(16, px.Horizontal, id="fork_bottom") u.Turn(-90).Line(30, id="left_cheek") u.Turn(90).Line(12, id="left_top") u.Close(px.Vertical, id="left_side") u.Constrain("bottom.mid", "origin", px.Coincident) u.Constrain("bottom", px.Distance, 40, id="width") u.Constrain("right_side", px.Distance, 50, id="height") u.Constrain("right_cheek", "left_cheek", px.Distance, 16, id="gap") u.Constrain("right_cheek", px.Distance, 30, id="fork_depth") u.Constrain("left_cheek", "right_cheek", "V", px.SymmetricCarriers) u.Constrain("left_top", "right_top", "V", px.SymmetricCarriers) print("status", u.status, "| degrees of freedom", u.dof) ``` ```python nbsphinx="hide-input" Row((u, "Every dimension and tie of the profile", {"constraints": True}), caption="The fully constrained profile") ``` ## The clevis `px.Pad` extrudes the profile 15 to both sides of the front plane, 30 in all (Figure 2): ```python clevis = px.Pad(u, 15, length2=15) ``` ```python nbsphinx="hide-input" Views(("The U profile padded 30 deep", [(clevis, "shade"), (clevis, "ink")]), angles=(-60, 0, 30), caption="The clevis") ``` ## The pin hole The pin hole, 12 across, is sketched on the right prong's outside, the face highest in $x$. The sketch's axes there are $y$ and $z$, the global origin projected onto the face giving its origin, so its vertical axis runs through the middle of the clevis's depth. The hole's center lies on that axis, 15 below the face's projected top edge. `until=px.last` cuts the hole through the right prong, across the fork and through the left prong, to the last face it crosses (Figure 3): ```python side = clevis.faces.Max(occ.X) pin = px.Sketch(side) pin.Project(side.edges.Max(occ.Z), id="top_edge") pin.Circle(12 / 2, center=(0, 30), id="pin_hole") pin.Constrain("pin_hole", px.Diameter, 12, id="pin_d") pin.Constrain("pin_hole.center", "top_edge.Edge.0", px.Distance, 15, id="pin_from_top") pin.Constrain("pin_hole.center", "V", px.Coincident) print("status", pin.status, "| degrees of freedom", pin.dof) clevis = px.Pocket(clevis, pin, until=px.last) # through both prongs, to the last flat face it crosses ``` ```python nbsphinx="hide-input" Row((pin, "The pin hole on the right prong, the clevis behind it", {"plot": {"show_parent": clevis, "show_constraints": True}}), (clevis, "The pin hole through both prongs", {"views": [(clevis, "shade"), (clevis, "ink")], "angles": (-60, 0, 30)}), caption="The pin hole") ``` ## The rod hole The rod screws into a blind hole in the base, the tapping hole of 10.2 for an M12 thread, 18 deep, sketched on the bottom, the face lowest in $z$ (Figure 4): ```python rod = px.Sketch(clevis.faces.Min(occ.Z)) rod.Circle(10.2 / 2, id="rod_hole") rod.Constrain("rod_hole.center", "origin", px.Coincident) rod.Constrain("rod_hole", px.Diameter, 10.2, id="rod_d") clevis = px.Pocket(clevis, rod, 18) # 18 deep, against the face's normal: up into the base ``` ```python nbsphinx="hide-input" Views(("The rod hole in the base", [(clevis, "shade"), (clevis, "ink")]), angles=(-120, 0, 30), caption="The rod hole") ``` ## The checks These are the volume, the mass in steel S235 (7.85 g/cm³) and the center of mass, with the origin in the middle of the bottom, to compare with your own model. The volume is the profile's area, $40 \cdot 50$ less the fork's $16 \cdot 30$, times 30, less the pin hole through the two prongs, 12 thick each, and the rod hole. The clevis is symmetric about two planes, so its center of mass lies on the vertical axis: ```python exact = (40 * 50 - 16 * 30) * 30 - math.pi * 6**2 * 2 * 12 - math.pi * 5.1**2 * 18 c = clevis.center print("volume", round(clevis.mass, 1), "mm³, exact", round(exact, 1)) print("mass", round(clevis.mass * 7.85e-6, 3), "kg") print("center of mass", round(c.z, 2), "above the bottom, off the axis by", round(math.hypot(c.x, c.y), 6)) ``` The clevis as STEP, for another CAD system: ```python clevis.WriteStep("clevis.step") ``` The clevis as STEP: [clevis.step](clevis.step) ```python nbsphinx="hidden" import sys sys.path.insert(0, "..") import matplotlib.pyplot as plt from drawings import Pictorial, SheetFigure, View from gallery import save_figure # the full section through the plane y = 0, the symmetry plane (no designation needed): the part behind it seen from # the front, its cut faces hatched; the view from the left with the pin hole half = clevis * occ.Box((-30, 0, -1), (30, 30, 60)) cut = [f for f in half.faces if abs(f.center.y) < 1e-6 and f.bounding_box[1].y - f.bounding_box[0].y < 1e-6] left = px.Plane(normal=(-1, 0, 0), axis=(0, -1, 0)) # the view from the left: -y to the right, z up pin_z = pin.Measure("pin_hole")["center"][2] section = View([(u, {"width": -12, "height": 32, "gap": 58, "fork_depth": -32})], solid=half, plane=front, hidden_edges=False, hatch=cut, axes=[((0, -4), (0, 22)), ((-24, pin_z), (24, pin_z))], measures=[((-5.1, 0), (5.1, 0), -24, "⌀10,2"), ((-3, 0), (-3, 18), -3, 18)]) side_view = View([(pin, {"pin_from_top": 22, "pin_d": (135, "leader")})], solid=clevis, plane=left, hidden_edges=False, at=(75, 0), axes=[((0, -4), (0, 54))], measures=[((-15, 0), (15, 0), -12, 30)]) pictorial = Pictorial(clevis, at=(75, -50), width=40) drawing = SheetFigure([section, side_view, pictorial], margin=25, notes=("planex2d.org", "3D exercise 09"), first_angle=True) print("scale", drawing.planex_scale, "| paper", [round(v * 25.4) for v in drawing.get_size_inches()], "mm") save_figure(drawing, "clevis", dpi=200) plt.close(drawing) ```