[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81211":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":11,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":13,"stars30d":13,"stars90d":13,"forks30d":13,"starsTrendScore":13,"compositeScore":14,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":15,"fork":15,"defaultBranch":16,"hasWiki":17,"hasPages":17,"topics":18,"createdAt":9,"pushedAt":9,"updatedAt":19,"readmeContent":20,"aiSummary":21,"trendingCount":13,"starSnapshotCount":13,"syncStatus":12,"lastSyncTime":22,"discoverSource":23},81211,"cad-power-animations","GordenSun\u002Fcad-power-animations","GordenSun","Parametric build123d CAD models with mechanical-power animations, deployed as a static three.js viewer to GitHub Pages.",null,"JavaScript",25,2,0,1.43,false,"main",true,[],"2026-06-12 02:04:12","# CAD Power Animations\n\nParametric CAD models that explain how mechanical power flows through real\nmachines, built entirely with open-source tools and rendered live in a\nstatic three.js viewer that ships to GitHub Pages.\n\nTwo models live here today:\n\n| Model      | Story                                                                          |\n| ---------- | ------------------------------------------------------------------------------ |\n| F1 race car | Four-cylinder cut-away engine. Pistons push → crank rotates → drive shaft → differential → rear wheels. |\n| Bicycle    | Crank arm → chainring → chain → rear cog → rear wheel → bike rolls forward.    |\n\n## Stack\n\n- **[build123d](https:\u002F\u002Fgithub.com\u002Fgumyr\u002Fbuild123d)** — Python parametric CAD,\n  generates the assembly as a labeled `Compound` of solids.\n- **[CAD Skills](https:\u002F\u002Fwww.cadskills.xyz\u002F)** (`earthtojake\u002Ftext-to-cad`) —\n  agent-skill toolkit that handles STEP generation, GLB\u002Ftopology export, and\n  CAD Explorer rendering.\n- **`.\u003Cname>.step.js` sidecar** — a tiny ES module per model that exports a\n  `manifest` (parameter definitions + occurrence-id features) and an\n  `update(ctx)` function that drives part transforms from the live parameters.\n  The same sidecar runs inside the CAD Explorer locally **and** in the static\n  Pages viewer.\n- **`site\u002F`** — a hand-rolled three.js viewer (~500 LOC) that loads the GLB,\n  reparents each top-level `o1.N` occurrence into a wrapper group, and runs\n  the sidecar's `update()` every frame to apply matrices and colors.\n\n## Layout\n\n```\nmodels\u002F\n  f1_car\u002F\n    f1_car.py          # build123d generator\n    f1_car.step        # exported STEP (one solid compound)\n    .f1_car.step.glb   # mesh + STEP_topology extension\n    .f1_car.step.js    # animation sidecar\n    renders\u002F           # PNG \u002F GIF previews used as thumbnails\n  bicycle\u002F\n    bicycle.py\n    bicycle.step\n    .bicycle.step.glb\n    .bicycle.step.js\n    renders\u002F\n\nsite\u002F\n  index.html           # landing page (model cards)\n  viewer.html          # generic ?model=... viewer page\n  viewer.js            # three.js + STEP-module sidecar runner\n  style.css\n  build-models.sh      # copies models\u002F -> site\u002Fmodels\u002F for deployment\n\n.agents\u002Fskills\u002F        # CAD Skills installed via `npx skills add`\n```\n\n## Regenerating a model\n\n```bash\nsource .venv\u002Fbin\u002Factivate\npython .agents\u002Fskills\u002Fcad\u002Fscripts\u002Fstep models\u002Fbicycle\u002Fbicycle.py\n```\n\nThis rewrites `bicycle.step`, the hidden `.bicycle.step.glb`, and assorted\ntopology sidecars. Open it locally with:\n\n```bash\nnpm --prefix .agents\u002Fskills\u002Frender\u002Fscripts\u002Fviewer run dev:ensure -- \\\n  --workspace-root \"$PWD\" --file models\u002Fbicycle\u002Fbicycle.step\n```\n\n## Adding a new model\n\n1. Drop a new `\u003Cname>.py` in `models\u002F\u003Cname>\u002F` that exposes a `gen_step()`\n   returning a labeled `Compound`.\n2. Generate `models\u002F\u003Cname>\u002F\u003Cname>.step` with the launcher above.\n3. Write `models\u002F\u003Cname>\u002F.\u003Cname>.step.js` (ES module exporting\n   `{ manifest, update(ctx) }`). Reference parts by `#o1.N` selectors in\n   `manifest.features`.\n4. Render a hero PNG (`models\u002F\u003Cname>\u002Frenders\u002Fhero.png`) so the landing card\n   has a thumbnail.\n5. Register the model in `site\u002Fviewer.js` `MODELS = { ... }`.\n6. Add a card to `site\u002Findex.html`.\n\n## Deploying to GitHub Pages\n\nA GitHub Actions workflow (`.github\u002Fworkflows\u002Fpages.yml`) bundles `site\u002F` +\nthe necessary files from `models\u002F` and publishes them to Pages on every\npush to `main`. After the first run, enable Pages in the repository\n**Settings → Pages → Build and deployment → GitHub Actions**.\n","该项目通过参数化构建123d CAD模型来展示机械动力如何在真实机器中流动，并使用three.js渲染为静态网页部署到GitHub Pages。核心功能包括利用Python的build123d库生成参数化的CAD装配体，以及通过JavaScript模块驱动动画效果，支持从STEP文件导出至GLB格式并进行拓扑扩展。项目目前包含F1赛车发动机和自行车两个模型，详细展示了动力传输过程。适用于教育领域、工程设计培训或任何需要可视化机械工作原理的场景。","2026-06-11 04:03:54","CREATED_QUERY"]