Links with a width

A link that takes up room

For twenty-three fields a link on this site has been a distance between two points, and a distance cannot collide with anything, because it is not anywhere. Give every link a body and a question arrives that none of the constraint equations can ask.

Assumes What is still outside.

Here is the one obvious geometric question this site has never answered.

The crank rocker in the first field turns. Its links are steel, say a fifth of a unit thick. Do any two of them try to be in the same place?

The boundary essay named this three phases ago and filed it honestly: “whether two links collide is also geometry, and it is the one obvious geometric question this site does not answer, because a link here is a distance constraint and has no width. That is a real gap rather than a boundary.” It has stayed a gap since, through five more fields, and every one of them added mechanisms whose parts nobody asked to be made of anything.

The reason is a single line of modelling that has been right for twenty-three fields. A link on this site is a distance constraint: an equation saying that two named joints stay a fixed length apart. That is exactly the right model for what those fields ask. A mobility count does not depend on how fat a bar is. Neither does a coupler curve, a transmission angle, a screw system or a tolerance band. And a distance constraint is not anywhere: it is a scalar equation on four coordinates, and a scalar equation cannot be in the way of anything.

A link, as a distance and as a body. The same two links every field before this one has drawn as lines, drawn as the material they are made of. A bar is a rectangle with its ends rounded off to the bosses that surround its pins, and it is convex; a bell crank is two arms meeting at a shared pin, and it is not — its inner corner turns the wrong way by 0.52, which is the single fact that puts it outside every separating-axis test here. The pins are marked because they are what has not changed: the constraint equations are the same, the solve is the same, and the positions are the same. What is new is everything between the pins.
Fig. 1 The two links this field needs, drawn as the material they are made of. Everything about the pins is unchanged; everything between them is new.

What arrives with the width

Give every link a body and four things change at once. None of them is a force, which is worth saying at the start, because the words clearance, contact and interference have force written all over them in most engineering writing and none of it is here. Every quantity in this field is a distance between two shapes at a configuration this site’s solver produced.

The constraint is an inequality, and it is not in the loop. Loop closure is a set of equations that a configuration satisfies; the solver drives their residual to zero and the configuration is what comes back. A body test is not one of them. It does not enter the Jacobian, it changes no position the solver returns, it has no effect on the mobility and it cannot be differentiated into a velocity. All it ever does is refuse what the solver already produced. That is a genuinely different kind of statement about a mechanism, and it is the first one on this site that arrives after the solve rather than inside it.

It is not local. Every equation this site writes involves the two joints at the ends of one link. A body test involves two links that may share nothing at all: no joint, no equation, no path through the graph shorter than the whole chain. On Peaucellier’s cell the pair that meets is a long arm and the crank, which are at opposite ends of the kinematic chain. And the count grows differently: eight links give ten pin joints and twenty-eight pairs to test.

It is not smooth. The gap between two convex shapes is a piecewise-smooth function of the configuration, with a corner wherever the closest pair of features changes from one edge to another. So its minimum over a motion is not found where a derivative vanishes, and every instrument this site has for finding extrema — the dead centres, the limit positions, the stationary points of a curvature — is the wrong instrument.

And the plane was a convenience. Two bars that overlap have to be at different heights. A planar mechanism, in the sense every field before this one has meant, is a stack of parallel planes, and which link goes in which plane is a decision nothing in the plane makes.

The room Watt's linkage needs. The shaded region is every point any part of this machine occupies at some position of its drive, computed as an occupancy grid over 150 solved configurations and outlined by marching squares — so the outline drawn is the boundary of the set the area was counted from rather than a second object that agrees with it. Its area is 7.75 square units, filling 55% of the box that contains it. The dashed rectangle is the box the joints need, which is what every figure that treats links as lines could have told you; the material needs a box 28% larger in area.
Fig. 2 What a body makes computable: the room a machine’s material needs over a whole drive.

What a body is, here

A link body is a polygon given in its link’s own coordinates: u running along the link from its first joint to its second as a fraction of the link’s length, v across it in the same units. That is exactly the convention attach uses for a coupler point, so a corner given here and a coupler point given there mean the same thing by the same numbers, and a body can be pinned to a coupler point by giving them the same pair.

A bar is drawn as an octagon rather than a rectangle, and the reason is not decoration. A real bar’s ends are round, because the boss has to surround the pin: the material at each end is a disc and the sides are the tangents between the two discs. An octagon keeps the two facts that matter — the end is wider than the middle, and the corner is cut — and a square-ended bar is the commonest way a body test reports interference the real part does not have.

The width is given in the mechanism’s own length units and not as a fraction of each link. A machine is cut from stock and stock has a thickness: a four-bar made from one plate has the same width on its crank and on its coupler, and the crank is the one for which that width is a large fraction of its length. Quoting a fraction per link would hide the question this whole field asks — which link is fat relative to what it has to get past — behind a number chosen per link to look reasonable. Every table here is at one width, 0.16 units, on mechanisms whose links run from 1 to 5. That is a bar between a sixteenth and a third as wide as it is long, which is where real linkage stock sits.

crank rocker: the closest pair at one positionThe site's standard four-bar: ground 4, crank 1, coupler 3.5, rocker 3. Every joint is where the solver put it, exactly as in the linkage field; the material is the only thing added. The heavy segment joins the two closest points over every pair of parts that is tested — which excludes pairs sharing a pin, since their material surrounds that pin by construction — and its length is the gap: **0.5772** here, between coupler · frame. A negative value is a penetration depth, the distance the pair would have to be moved apart, and it is drawn in the warning colour.gap 0.5772positioned by solving, not by drawing
Fig. 3 The site’s own four-bar, with its links given a width and nothing else changed. The heavy segment is the closest approach between the two parts that are allowed to meet.
Peaucellier's cell: the closest pair at one positionEight links, ten pins and an exact straight line — the site's densest planar loop. Every joint is where the solver put it, exactly as in the linkage field; the material is the only thing added. The heavy segment joins the two closest points over every pair of parts that is tested — which excludes pairs sharing a pin, since their material surrounds that pin by construction — and its length is the gap: **0.1983** here, between long arm B · crank. A negative value is a penetration depth, the distance the pair would have to be moved apart, and it is drawn in the warning colour.gap 0.1983positioned by solving, not by drawing
Fig. 4 Eight links, ten pins and twenty-eight pairs, of which fourteen share a joint and are not tested. The one that is closest here has no joint and no equation in common with its partner.

Which pairs are tested is a decision, and it is made once

Two parts whose links share a joint overlap at that joint by construction. Both surround the same pin — that is what a pin is — so their material is in the same place at every configuration, always, whatever the rest of the mechanism does. Testing them would report every mechanism as interfering everywhere, and a test that always fires reports nothing.

So joined pairs are excluded from the collision test. They come back in the next field over, where the question is which plane each link is built in and joined pairs are precisely the ones that may not share one. Stating the rule once, in the code, is the difference between a measurement and a convention that drifts: on the four-bar it leaves two pairs out of six, and on Peaucellier’s cell fourteen out of twenty-eight.

What is left is the honest list. For a four-bar it is the crank against the rocker and the coupler against the frame. For a machine with something bolted to its frame — a post, a stop, a housing wall — it is every moving part against that.

a four-bar with a bell crank: the closest pair at one positionThe crank rocker with its rocker replaced by an L — the field's non-convex part. Every joint is where the solver put it, exactly as in the linkage field; the material is the only thing added. The heavy segment joins the two closest points over every pair of parts that is tested — which excludes pairs sharing a pin, since their material surrounds that pin by construction — and its length is the gap: **0.1494** here, between coupler · frame. A negative value is a penetration depth, the distance the pair would have to be moved apart, and it is drawn in the warning colour.gap 0.1494positioned by solving, not by drawing
Fig. 5 The same measurement on a machine with a dented part in it. Nothing about the shape changes what is computed; it changes only how the answer is arrived at.

The number, and its sign

The gap between two convex polygons is computed in two regimes and both are wanted.

Apart, the answer is the smallest distance between an edge of one and an edge of the other, which is exact and needs no approximation anywhere.

Together, the answer is a penetration depth: the smallest distance the pair would have to be moved to separate them, taken as the least overlap over every edge normal of both. That is the number a designer wants, because it says how much material has to go — a test that reports they collide and stops cannot say by how much and therefore cannot say what would fix it.

One number carries both, with a sign: positive is a gap, negative is a depth. And the sign is the whole content of the field. Every other quantity this site computes is a magnitude that gets better or worse — an error, a deviation, a band, an angle. This one has a side. On one side of zero there is a machine and on the other there is a pile of parts that will not go together, and no amount of refinement moves the boundary between them.

The gap is a function, and it has corners. The smallest gap over every tested pair, at each of 360 solved positions of the crank. Two things are visible that a check at the ends could not report. The minimum, 0.1041, is in the middle of the travel and not at either end. And the curve has 4 corners, each one a change in which pair is closest — the colours — so the function is piecewise smooth rather than smooth, and its minimum is not where a derivative vanishes. Refining off the sample grid by golden section moves the answer by 1.4e-5, which is what a corner rather than a smooth minimum looks like.
Fig. 6 The same measurement at every position of a whole turn. The minimum is in the middle of the travel, and the curve has corners where the closest pair changes.

What the site’s own four-bar does

Here is the answer to the question at the top, and it is not the answer this site’s first field would have led anybody to expect.

Give the crank rocker of the opening essay links 0.16 units wide, sweep it through a full turn at 180 solved positions, and the smallest gap over the tested pairs is −0.432: the coupler and the frame bar are not merely touching but fully crossed, for the whole of the turn, by the entire width of the coupler. Every position solved to 10⁻¹⁴. The Grashof classification is unchanged. The mobility is one by formula and one by rank. The transmission angle is exactly what it always was.

The mechanism is fine and the machine is impossible, and nothing that was ever computed about it before this field could tell the difference.

The same reading comes back on almost everything in the catalogue. Watt’s linkage: −0.432. The drag link: −0.432, between its crank and its rocker rather than its coupler and its frame. Peaucellier: −0.432 again, between a long arm and the crank. The number repeats because it is saturated — two long bars fully crossed have to be moved apart by the whole of one width, and the depth stops growing once the crossing is complete.

Chebyshev’s linkage is the exception, at +0.380 over its own arc, and it is the exception for a reason worth keeping: its two long arms cross in the drawing and do not cross in fact, because over the travel it has they never occupy the same place at the same time. Which is a preview of the distinction this field turns out to be about.

The bound that says the sweep missed nothing. Every corner of every body is an affine function of its link's two joints, so its speed is the same combination of the joint velocities the mechanism already solves for — and the largest corner speed anywhere on this drive is V = 1.255 per radian. A distance between point sets is 1-Lipschitz in those points, so from each sample the gap can fall no faster than V: the fine lines are those cones. Where two cones cross is the least the gap can be between the samples, and at 60 samples that is 0.0383 — positive, so nothing was missed. The same bound refuses the twelve-sample sweep of the stud machine, where the bound is -0.281.
Fig. 7 One of the four routes: a bound on what the gap can do between two samples of a sweep.

How the answers are checked, given that there is nothing to compare them to

Every field on this site has a habit: no quantity is published until two routes have produced it. A mobility is counted by formula and measured as a rank. A velocity is solved and then differenced. A ratio is derived and then swept. The habit exists because the site’s figures are drawn from computations, and a computation that has never been contradicted is a computation nobody has tested.

A gap has no classical formula to be checked against, so the second routes here are built rather than inherited, and there are four of them.

Against a closed form, where a shape has one. Two axis-aligned squares a known distance apart, a square and a point, a pair overlapped by a known amount — these are what the separating-axis machinery is calibrated on, because its winding convention, its outward normal and its choice of the smallest overlap are each a place where a plausible version returns a plausible number.

Against brute force. The gap between two dented polygons is computed by decomposing both and taking the best answer over the pairs of pieces; the check samples both outlines at four hundred points a side and takes the smallest distance between samples, which knows nothing about pieces, axes or convexity. On the bell crank and block above the two agree to 5 × 10⁻³, which is the sampling of the brute-force route rather than an error in the exact one.

Against a different quadrature. A swept area is counted on a lattice and estimated from random points, and where a shape has an analytic area — a body carried by a link that turns all the way round sweeps a disc — both are compared against πR².

And against a bound. The last one is the field’s own invention and the one it needed most: a sweep is a finite set of samples and a collision can hide between two of them, so the samples are accompanied by a Lipschitz bound saying what the gap can do in between. That turns 180 positions were looked at and nothing was found into a statement about a continuum, and it is the subject of its own essay because the bound is exact and the reason it is exact is that a body’s corners are affine in its link’s two joints.

Chebyshev's linkage: the closest pair at one positionGround 4, arms 5, coupler 2 — the linkage whose two long arms cross. Every joint is where the solver put it, exactly as in the linkage field; the material is the only thing added. The heavy segment joins the two closest points over every pair of parts that is tested — which excludes pairs sharing a pin, since their material surrounds that pin by construction — and its length is the gap: **1.5783** here, between left arm · right arm. A negative value is a penetration depth, the distance the pair would have to be moved apart, and it is drawn in the warning colour.gap 1.5783positioned by solving, not by drawing
Fig. 8 The exception in the catalogue: a linkage whose two long arms cross on the page and never occupy the same place at the same instant.

Two bodies at the same place at different times

A coupler curve can cross itself. The tracing point comes back to a point it has already visited, at a different crank angle, and the curve drawn on the page has a node in it. Nothing collides. The point was there twice and the two times are different.

That is not a quibble; it is the definition. Interference is a condition on configurations, not on paths. Two parts interfere when their material is in the same place at the same configuration, and a picture of a whole motion — a coupler curve, a swept region, a centrode, every trace this site has ever drawn — has thrown the time away and cannot answer it. A great many published mechanism drawings show links crossing on the page and are perfectly correct, because the crossing is a crossing of two curves rather than of two bodies.

This is why the gap has to be computed at each configuration and then minimised, rather than computed once from the picture. It is also why a check at the two ends of a travel is worthless: on the machine in the figures above the minimum sits in the middle of the turn and both ends read healthy.

The plane, given up

The reading above — that the site’s own four-bar has its coupler inside its frame by a full width — is not a statement that the four-bar cannot be built. Everyone has seen one. It is a statement that it cannot be built in one plane, which is a different thing, and the difference is the third dimension the drawing has been quietly using all along.

Assign the four links to parallel planes so that no two conflicting parts share one, and the machine goes together. The smallest number of planes that works is a property of the mechanism, it is computable, and for this four-bar it is three rather than the two a reader might guess. Out-of-plane offsets change no length, no angle, and no position; the mechanism is planar in exactly the sense it always was; and the offsets are what make it a machine rather than a diagram.

That is where this field goes next, and it is worth noticing what has happened to the object. The first ten fields on this site take a mechanism and ask what it does. This one takes the same mechanism, gets the same answer, and asks a question whose answer is not a motion at all: how many planes, which link in which, and what does the machine’s material occupy while it moves.

What this field will not do

The list is short and it is the same list the boundary essay drew, with one item moved across it.

No force, in any form. Contact force, friction, deflection, wear, and anything at all about what happens after two bodies meet. A negative clearance here says the mechanism as dimensioned cannot be made of solid material. What a real one would do about it — bind, spring, wear a groove, break — is outside this site in exactly the way the eight disclaimers say it is.

No dynamics. The bodies here have shape and no mass. A swept region is a set of points, not a moment of inertia.

No manufacturing. How a part is cut, what its corners cost, whether the shape can be moulded: all real, all decided by processes this site does not model.

What has moved across the line is the gap itself. It was named an omission rather than a boundary, and the reason given was that it “needs no new physics, only a body attached to each link and a collision test”. That turned out to be true and to be an understatement: the body and the test are half a day’s work, and what they open is a field with a dozen questions in it that the rest of the site cannot ask — a function with corners, a colouring with an ordering, a region with an area, a free space in pieces, and a four-bar that turns all the way round exactly when it cannot be built with bearings at both ends.

What this makes readable

Essays that name this one as a prerequisite.

About the same objects

Not linked from either essay — found by the objects both name.

What links here

The 8 of 19 essays linking to this one that name the most of the same objects.

The objects this essay names

Each one links to every other essay that touches it.

ClearanceConstraintInterferenceLink bodyMobilityRigid bodySigned clearanceWitness pair