板面艺术几何:Hilbert/等弧阵列/灯光画
Hilbert 曲线走线(4 模式、电阻估算)、圆周等弧长阵列变换、像素图分色灯光画三层(阻焊/铜层/背面)SVG;板面装饰与加热丝设计离线核心。
Badges only claim the demo-run passed on that host; cross-host installation is handled by the adapter layer.
Preview gallery
Generate an order-3 Hilbert curve with resistance estimate, sample a circle path into 12 equal-arc points at 1.5x array scale, and split the pixel grid into three light-paint SVG layers.
Content matches the files inside the package; extracted by the publish pipeline.
LCEDA board art geometry bundle
Offline re-implementation of the geometry cores of three LCEDA extensions (eext-hilbert-creator Unlicense, svg-pailie Apache-2.0, pcb-light-paint Apache-2.0); see references/PROVENANCE.md.
What the script computes
scripts/demo.mjs (Node >= 20, no dependencies):
- Hilbert curve: mutual-recursion turtle grammar (One/Two/Three/Four, mode 0-3 picks the start symbol), step = size / 2^order, exactly 4^order - 1 segments. Order capped at 8 (our guard; upstream has no cap). Copper resistance R = rho * L_mm / (1000 * W_mm * 0.035) for rho 0.0175 and 0.01851 ohm*mm^2/m. Output targets layer TOP, net HILBERT; defaults 20 mm, 0.254 mm width, order 5.
- SVG path sampling (svg-pailie): own parser/flattener for M/L/H/V/C/S/Q/T/A/Z (absolute + relative), cubic/quadratic beziers at 16 segments, arcs at >= 32 segments with radius correction; circle helper uses 4 beziers with kappa 0.5522847498. N points sampled at equal arc length (step = total / (N-1)), then optional scale about the bbox center, reverse (p' = 2c - p) and translate to a target centroid.
- Light paint (pcb-light-paint): nearest-palette classification over 6 colors (deep blue 22,31,125 / light blue 93,167,227 / deep green 25,53,34 / light green 249,225,149 / black 6,16,8 / white 230,234,235), alpha 0 = transparent; image cap 1500x1400. Uniform white border crop (>= 90% row/col match, scan <= min(120, edge/3)); if the crop would remove >= 50% of a dimension it is skipped with a warning. Layer separation: front mask = deep green + light green + black, front copper = light blue + black, back mask = light green (mirrored); run-length rect SVG per layer.
- Artifacts: hilbert.csv/svg, pailie.csv/svg, light-.svg, light-stats.csv.
Run
node scripts/demo.mjs --out-dir <dir> [--input <json>]
Default input: scripts/fixtures/input.json. stdout is an
edaskills.report.v1 report.
Input shape: { "hilbert"?: {order?, mode?, sizeMm?, widthMm?}, "pailie"?: {path? | circle:{cx,cy,r}, count?, scale?, reverse?, target?:{x,y}, prefix?}, "lightPaint"?: {width, height, pixels:[r,g,b,a,...]} }.
When to use
- Generate Hilbert-curve copper art / resistive traces with a known segment count and DC resistance.
- Place LEDs or other components along any SVG outline at equal arc spacing (text signs, logos).
- Separate a light-paint artwork into solder-mask / copper layers before vectorizing in the editor.
Not for: the editor-side vectorization itself (closed SDK parameters are documented in procedures), image editing UI, or impedance-controlled routing (the Hilbert resistance is DC only).
Dependencies
Demo run
node v24.19.0 · 2026/11/19
- [info] HILBERT_OK (order 3 mode 0): 63 segments (4^n-1), length 157.5 mm, R=0.310 ohm (rho 0.0175) / 0.328 ohm (rho 0.01851), layer TOP net HILBERT
- [info] PAILIE_OK (LED): 12 equal-arc-length positions from 66 flattened path points
- [info] LIGHT_PAINT_OK (24x16): classified white:144, deep-green:1, light-green:221, light-blue:16, black:2; crop t2 b2 l2 r2; back mask mirrored
FAQ
Ratings & reviews
Not rated0 ratings
Sign in to rate this skill.
Sign inVersions
- v1.0.0Latest32.7 KB
首发种子版本。