pyboxbuilder.compartments.finger_outline.scoop_profile¶
-
pyboxbuilder.compartments.finger_outline.scoop_profile(radius: float, height: float, top_rounding: float =
5.0, bottom_rounding: float | None =None) Bosl2Shape2D[source]¶ Build the 2-D side profile of an edge scoop, in the X-Z plane.
Two radii and three straight runs, read from the top down:
===========... ...=========== flat top surface ''.. ..'' r1: rolls the top \ / over into the wall | | straight throat '.. ..'' r2: wall into floor ''--'' flat bottomr1 (
top_rounding) turns the flat top surface into the scoop wall: the arc leaves the top face horizontally, so the surface rolls over the rim instead of meeting the cut at an edge, and arrives vertical at the throat. r2 (bottom_rounding) turns the wall into the floor, leaving a flat bottom for a piece to sit on rather than a semicircular trough.Both arcs are tangent at both ends, so the whole outline is smooth without needing a parametric blend: the tangency is what makes it so, and two radii say it more directly than any curve fitted between them.
- Parameters:¶
- radius: float¶
Half-width of the straight throat — the narrowest part.
- height: float¶
Height from the floor to the rim.
- top_rounding: float =
5.0¶ r1, how far the mouth rolls out at the rim.
0gives a square-topped slot.- bottom_rounding: float | None =
None¶ r2, the fillet from the throat into the flat bottom.
Nonederives it as half the throat half-width;0gives a square floor. Capped so part of the base stays flat whatever is asked for.
- Returns:¶
The profile as 2-D geometry, floor at
y=0, rim aty=height, centred onx=0.- Raises:¶
ValueError – If
radiusorheightis not positive, or either radius is negative.