A link that takes up room
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.
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.
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.
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.
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.
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.
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.
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.
- A gap is a number Links with a width
- Six things a body is not Drawn wrongly
- The room a machine sweeps Links with a width
- A body is all size Links with a width
- The gap is a straight line in the metal Links with a width
- A link may be bent Links with a width
About the same objects
Not linked from either essay — found by the objects both name.
- A gap with corners in it clearance · interference · link body · signed clearance · witness pair
- A sweep that missed nothing interference · link body · signed clearance · witness pair
- The gap is a straight line in the metal interference · link body · signed clearance · witness pair
- Where a hinge pin can go clearance · constraint · interference · rigid body
- A piano hinge is not forty door hinges clearance · constraint · mobility
- A shape with a dent in it interference · link body · signed clearance
What links here
The 8 of 19 essays linking to this one that name the most of the same objects.
- A clearance inside a tolerance box As built
- A link may be bent Links with a width
- The crank that cannot turn all the way Links with a width
- Two bars that have to cross Links with a width
- A body is all size Links with a width
- A pin is not a point Links with a width
- The arm that hits itself One path to the tool
- The block in the guide has a length What a joint is
The objects this essay names
Each one links to every other essay that touches it.
ClearanceConstraintInterferenceLink bodyMobilityRigid bodySigned clearanceWitness pair