wobblyhead hg > 3dprints > house_number
diff README.md @ 4:4836a7408849
more elaborate hole finding
| author | ark |
|---|---|
| date | 2026-11-03 15:51 +0100 |
| parents | f5ff6f1a5454 |
| children |
line wrap: on
line diff
--- a/README.md Tue Nov 03 13:54:57 2026 +0100 +++ b/README.md Tue Nov 03 15:51:23 2026 +0100 @@ -1,7 +1,7 @@ # House number 3D-printed house numbers, or any other text, to fix to a wall. Each glyph -is a separate flat piece with two countersunk screw holes. Distance washers +is a separate flat piece with countersunk screw holes. Distance washers behind the holes keep it off the wall and take up unevenness. Instead of screws, magnets pressed into the washers can hold the glyph. The glyphs print face down. A two-colour look with an outline band is possible on a @@ -77,52 +77,48 @@ - glyph: one glyph per print, all glyphs at the same size. For both, the script reports the largest size unrotated and at the best -angle between 0 and 90 degrees. In Helvetica Bold, "24" reaches 189 mm in -the text layout and 278 mm per glyph; rotation gains nothing. In SF Extra -Compressed Thin, turning the glyphs by 45 degrees raises the size per glyph -from 278 to 325 mm. +angle between 0 and 90 degrees. Rotation helps narrow fonts: in SF Extra +Compressed Thin, 45 degrees raises the size per glyph from 278 to 325 mm. The holes are placed for one size, by default the largest unrotated size in the glyph layout. `--layout`, `--angle` (-1 for the best) and `--size` choose another. OpenSCAD can scale to any size later; it then checks that the screw heads still fit. -### Screw holes +### Mounting points -Each glyph gets two holes, one near its upper and one near its lower end: +The script looks for the best mounting points on each glyph: spread wide, +so the glyph sits firmly on its washers and does not tip, and each in the +middle of a stroke with room for the screw head (8 mm, `--head-d`) plus a +wall of 2 line widths (`--wall-lines`). For magnets, pass the magnet +diameter as `--head-d`. -1. Only points where the screw head (8 mm, `--head-d`) plus a wall of 2 - line widths (`--wall-lines`) fits inside the glyph are considered. -2. The glyph's main axis is found from its inked area. It follows the slant - of italic and script fonts and turns sideways for wide glyphs. - `--vertical-axis` forces it upright. -3. Along the axis, the holes aim at 85% and 15% of the glyph length - (`--target`). Distance from the axis is penalised (`--side-weight`); - sitting in the middle of the stroke is rewarded (`--centre-weight`). -4. Where no point has room for the head, the hole goes to the thickest - point of that half, and the script warns. +By default each glyph gets two holes, near its upper and lower end. +`--holes` sets the most holes per glyph, up to 6. Three holes make a glyph +sit flat; more are used only where they clearly improve the hold. In +Futura Bold, "W" and "H" get four, most glyphs three, and "I" two. The +script prints the number of holes per glyph, and why it stayed below the +maximum. It warns where a head does not fit. -For magnets, pass the magnet diameter as `--head-d`, so the holes go where -the magnet plus the wall fits. +Further options tune the placement, see `--help`. The comments in +`make_glyphs.py` describe the method. The check images show the glyph in grey, the area with room for the head in -green, the axis in blue and the holes in red, orange where the head does not -fit. +green, the axis or the hole polygon and the centre in blue, and the holes in +red, orange where the head does not fit. ### Glyphs of several parts Glyphs such as "i", "รค" or "%" consist of separate parts. The script reports them and works out a backing that connects them, see below. A hole -can land in a separate part when the target position lies there, such as -the dot of "i". +can land in a separate part, such as the dot of "i". ### Fonts with overlapping outlines Many fonts, variable fonts in particular, draw glyphs from overlapping or self-crossing contours. OpenSCAD's SVG import would turn the overlaps into -holes. The script splits and groups the contours so the imported shape -matches the font, and compares the result with the font's own filling. Both -scripts report a difference. +holes. The scripts correct this and report where the result still differs +from the font's own filling. ## The model @@ -151,9 +147,9 @@ `glyph_layers` sets the thickness, 6 layers by default: 1.2 mm at 0.2 mm layers. `backing` adds `backing_layers` (4 by default) behind the glyph, -covering its outline. For glyphs of several parts the backing is the outline -grown and shrunk back, so the parts join; where that does not work, it fills -the convex hull. The gaps between parts are bridged and may need supports. +covering its outline. For glyphs of several parts the backing also fills +the gaps between the parts, or, where they lie far apart, the convex hull. +The gaps are bridged and may need supports. ### Screws @@ -202,16 +198,12 @@ With `two_colour`, the glyph is split into a body and a decal: - The decal is a band of `band_width` (4 mm) along the glyph outline, - `decal_layers` thick (2, at most 10). It is limited to the glyph + `decal_layers` thick: 2 by default, at most 10 and at most the glyph thickness less 2 layers. -- The band is `band_width` wide on the face and narrows by one layer height - per layer at its inner edge. The edge slopes away from the body, so the - nozzle can reach the body's lower layers next to the decal. How many - layers the nozzle clears depends on its shape; test it on your printer. - A warning is shown when the top layer of the band is narrower than a - line width. -- The body fills the decal layers inside the band, with no gap to the - decal. +- The band narrows towards the back, so the nozzle can reach the body's + first layers next to the decal. How many decal layers the nozzle clears + depends on its shape; test it on your printer. A warning is shown when + the band's top layer gets narrower than a line width. - Both contain the same frame, one layer high and one line width wide, around the glyphs. It makes the slicer place both parts in the same spot. @@ -228,8 +220,9 @@ ### Export Render (F6) and export the 3D parts as STL. The file name echoed in the -console carries font, text, glyph, options, size, angle and print settings, -for example +console carries font, text, glyph, options, size, angle and print settings. +A maximum hole count other than 2 adds `h` and the count after the +attachment, such as `cs_h3_`. For example: house_number_body_Futura-Bold_24_g0_2cd2_cs_s2780a0t6_lw40lh20.stl
