2026-09-08 11:50:32 -07:00
2026-08-11 14:41:33 -07:00
2026-09-07 12:11:43 -07:00
2026-08-11 14:41:33 -07:00
2026-09-08 11:50:32 -07:00
2026-09-08 11:50:32 -07:00
2026-09-08 11:50:32 -07:00
2026-08-11 14:41:33 -07:00
2026-08-11 14:41:33 -07:00
2026-08-11 14:41:33 -07:00
2026-08-11 14:41:33 -07:00
2026-09-08 11:50:32 -07:00
2026-09-08 11:50:32 -07:00
2026-08-11 14:41:33 -07:00

MoonModel

MoonModel creates terrain-accurate lunar globes as generic, material-aware 3MF files. It supports a solid one-piece display Moon intended for slicer-controlled sparse infill, an optional hollow one-piece Moon, a hollow eight-section large Moon, arbitrary named filament colors, nozzle-aware tonal dithering, optional coordinate lines, magnetic-box configuration, and a separate orbital-triskelion stand.

Setup and use

bundle install
bundle exec ruby bin/moon_model

The executable begins with require "bundler/setup", so all application imports use the locked Bundler environment. To reproduce a run:

bundle exec ruby bin/moon_model --config config/example.yml --output build/example

The wizard first asks for a model name, then asks about the printer/tooling envelope, intended use, palette, grid, size or scale, one-piece interior, vertical exaggeration, and assembly hardware. Named models are written to build/<name>/. Selecting an existing generated name offers to revise it, using its saved configuration as the defaults for a fresh wizard run. It displays maximum one-piece/eight-section sizes in millimeters and inches and a terrain-relief cheat sheet before generation.

Output

One-piece runs create moon.3mf. Their interior defaults to a watertight solid volume so the slicer can apply balanced sparse infill without generating inaccessible cavity supports; shell.interior: hollow retains the thin-wall alternative. Segmented runs remain hollow and create eight print files, an assembled preview, and an assembly-key file. The optional one-piece orbital stand is emitted as orbital_triskelion_stand.3mf without a material assignment; its footprint scales with the Moon and is capped to the usable printer bed. Three rounded stems fork toward neighboring pads, connecting each finely curved concave saddle to two branches through flared cradles. The stand is a single watertight mesh with flat table contact. Print it upright; small local supports may be needed under the elevated branches and pads. Inspect the slicer's layer and support previews. Its saddles use conservative terrain-radius bounds and a configurable 10 mm default clearance above the central hub; irregular terrain may still limit the actual contact patch. Every run includes its reusable YAML configuration, a slicer/spool manifest, and assembly instructions. Revisions are generated in a temporary directory and atomically replace the prior generated directory only after successful validation; unrelated directories are never overwritten. --output DIR continues to override the named default location.

To generate an updated stand separately from an existing Moon, use a new output directory:

bundle exec ruby script/generate_stand.rb build/single_piece_4color/config.yml build/single_piece_4color_stand_organic

This reuses the saved Moon sizing and terrain settings without regenerating or replacing its print files. The stand output includes its configuration, geometric clearance/overhang statistics, and printing notes.

Colors are closed surface inlay volumes over a continuous structural body. Palette entry order defines filament slots 1 through N. The 3MF records portable material names/display colors and Bambu Studio part names/slot assignments; confirm the numbered slots against physical AMS or external-spool filaments. The structural body and first-color surface remain separate bodies assigned to the same filament 1, so an N-color Moon may show N+1 bodies. The file has no fixed palette limit, though the printer and filament system will impose practical limits.

Modeling notes

  • The first palette entry is the structural material.
  • Reflectance is mapped across the palette by perceptual luminance and deterministic spatial dithering.
  • Grid lines override reflectance. They are contrasting inlays for multicolor output and debossed for one-color output.
  • A requested final-envelope diameter is rescaled after exaggeration so it fits. Datum/scale mode preserves the lunar datum diameter and reports the larger resulting envelope.
  • One-piece spherical prints require slicer-generated adhesion/support. Section files are moved above the build plane but may still need slicer-specific support decisions.

See data/SOURCES.md for data provenance and ROADMAP.md for milestones and acceptance gates.

Developer visual QA renders front, back, left, right, top, bottom, and isometric views:

blender --background --python script/render_previews.py -- build/example/moon.3mf build/example/previews

The renderer also accepts --moon EXISTING_MOON.3mf --moon-center-z HEIGHT for an assembled preview, or --focus X Y Z --span MM for junction details. script/inspect_stand.py independently checks an exported stand's connectivity, winding, table contact, and triangle intersections in Blender. script/plot_sliced_stand.py plots actual Bambu G-code model/support paths using NumPy and Matplotlib; it does not alter G-code or send it to a printer.

S
Description
No description provided
Readme
14 MiB
Languages
Ruby 90.8%
Python 9.2%