Skip to main content

Module mill_faces

Module mill_faces 

Source
Expand description

The block a ball-end mill leaves: the box below the mill’s lower envelope (the third piece of the ball-end raster construction).

The top is the plan’s regions (crate::mill_plan), each a face on its part’s own surface: a tube’s cylinder (its seam along the top of the cylinder, which the underside never reaches), a ball’s sphere (its poles on a level diameter and its seam over the top), or the stock’s top plane. The regions come from the plan’s graph: each edge twice, once with the region on its left; each region’s boundary cycles walked by the next edge clockwise at every vertex; a counter-clockwise cycle (in plan, from above) an outer boundary and a clockwise one a hole, in the smallest outer boundary of its part that holds it.

Each edge’s curve is cubic through its points again (about a 32nd of the radius apart, each on the curve where its parts meet), and each face’s image of it in its surface’s parameters is cubic through the same points inverted onto the surface at the same parameters, never fitted. The four walls are planes under the envelope’s section along the box’s sides, the floor a plane. The plan names every edge’s two faces, so the solid is assembled directly (no sewing): each edge one record, used once each way; each face’s sense set so its normal points out of the stock; the result validated.

Enums§

Sides
What closes a plan’s top below: four upright walls over a level floor at bottom (a block milled over level ground: the chart is the plan), or one floor on the plane through origin square to normal (which points out of the stock) that every side of the box lifts onto (a dome’s base).

Constants§

MILL_FACES_REFUSAL
The prefix of every refusal of this module.

Traits§

Faces
The surfaces a plan’s parts lie on: each part’s surface, which way is out of the stock at a point of it, and a chart point (x, y, height) lifted into space.

Functions§

block_from_plan
The solid below plan’s top (each region a face on its part’s surface, read through faces), closed by sides; each edge’s points again about spacing apart in the chart.
milled_block
The solid of the box plan.bounds × [bottom, the plan’s top] below envelope, its top read by plan.