Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .agents/skills/3d-print-modeling/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ Read [fdm-design-principles.md](./references/fdm-design-principles.md) and impor
* When a monolithic enclosure contains a wide, shallow internal pocket (such as a rotary shutter slot under a sloped hopper floor) whose `0°` roof would trap unremovable internal supports if printed flat, pre-orient the body tilted **`45°–47°` onto an un-engraved exterior wall** (with a `2.0 mm` bed-stabilization chamfer), flare internal pocket/slot roofs (`+5°..+17°`), and draft opposing inner walls (`5°`) so **100% of internal faces sit `> 45°` from horizontal** (`0.0 g` internal support). Configure `.3mf` project settings with `enable_support = 1`, `support_type = tree(auto)`, `support_on_build_plate_only = 1`, and `support_threshold_angle = 45` so tree supports touch **only** the plain exterior wall while keeping all branded/customizable faces vertical or skyward.
12. **Enclosed Mechanism 3D Kinematic Insertion Trajectory Audit & Dual-Lock Snap Handle:**
* Split trapped internal sliders/shutters into a **slide-in internal member** (with a planar XY elastic C-jaw socket) + **snap-in keyed external handle** (pushed straight through the housing slot) + **coaxial locking pivot pin**. Run a continuous multi-step 3D B-Rep insertion trajectory check (`20+` 6-DOF poses from outside the housing to the seated position) asserting **`0.000000 mm³` boolean collision** at every step.
13. **Organic Sculpting Zero-Support & Single-Solid Engineering Patterns:**
* **Never attach floating tangent decorative details** (such as detached 3D leaves or unbridged clip tabs) that can separate into multiple connected components or overhang > 45°. Sculpt organic surface foliage/garlands directly as `<= 40°` beveled **integral bas-relief** into the outer mesh skin (`connected_components == 1`, `0.00 mm²` overhang).
* **Support-Free Curved Handles (`sweep_support_free_branch_handle`):** Keep the centerline monotonically ascending (`dz > 0`, slope `<= 40°` from vertical) with both start/end caps buried deep inside the main body wall (`0.00 mm²` overhang), and swell ONLY the skyward (`+Z`) upper crest to achieve lush rounded arches with zero underside overhangs.
* **Wide Horizontal Overhead Arches (Print-Flat Horizontal YZ-Dovetail Lock):** Never print a wide semicircular carry arch monolithically over an open hollow vessel. Print the arch **flat on its side at `Z = 0`** (`0.00%` overhang and `5×` stronger continuous-fiber PETG/PLA lifting strength) with `28°–32°` horizontal YZ-dovetail tenons that slide horizontally (`+X → -X`) into twin bark/wall-blended rim buttress pockets (supported below by `<= 38°` ramps)—mechanically pull-out proof under vertical `+Z` lifting loads.
* **Angled Spout / Coupling Stubs & Helical Wedge-Cam Collars:** Elevate stubs to **`>= 48°` above horizontal** (`<= 42°` from vertical), omit `45°` inward tip chamfers (which push the `6 o'clock` bevel past `90°`), and place bayonet lugs at `12`, `4`, and `8` o'clock (`6 o'clock` underside lug-free → `0.00 mm²` overhang). Every bayonet collar or swivel socket **MUST** incorporate a helical wedge-cam clamping ramp (`~10°` draw, `40°–43.6°` inner cam bevel matching the stub lug underside) + positive rotation stop + crush-rib / TPU / rubber seal, verified by **both** `assert_bayonet_cam_lock_action()` (zero-collision entry/lock + active wedge engagement) and **`assert_nut_slides_over_part()`** (`0.000000 mm³` 36-pose kinematic slide-over collision from tip to flange). Avoid bare-PETG multi-link snap hoses below tank waterlines; use monolithic spouts or 1-piece hose-barb adapters for real silicone/vinyl tubing.
* **Watertight Vessel Floor & Hydraulic Passage Integrity Gate (`clip_bore_above_floor` + `assert_watertight_vessel_integrity`):** For any hollow watertight vessel with an angled side-wall bore (watering cans, pitchers, planters, tanks), ALWAYS hard-clip the angled bore cutter strictly above `Z >= floor_thick_mm + 0.5 mm` so a downward-tilted bore can NEVER groove or puncture the tank floor. Programmatically assert BOTH `volume(solid_floor_disk - vessel_body) == 0.000000 mm³` (100% unbroken watertight floor across full interior radius) AND `volume(spout_flow_probe ^ vessel_body) == 0.000000 mm³` (unobstructed water passage into cavity), and visually inspect a top-down interior + bottom-face render before delivery.

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,8 @@ When engineering enclosures, faceplates, signage, or flush multi-color inlays ac
- This leaves flat `13–16 mm` `Z = 0` stability feet under every valley trough while rising at `47°` from horizontal (`43°` overhang → strictly `<= 45°`, `0.00%` overhangs) to pointed cathedral arches beneath each crest and thin curved outer wings—typically cutting solid volume by **`~55–60%`** and real sliced filament by **`~28–40%`**.
- Place compact vertical-walled `Z = 0` piers ONLY where mechanical interlocks require backing (corner sockets, dovetail ends, bow-tie bosses, short spine piers), allowing the open `47°` wavy underside tunnel itself to double as the drop-in loading bay for underside locking keys.

7. **Flexible TPU (`95A`) Direct-Feed Slicing & Concise Filament Catalog Hygiene:**
- **Direct Top-Feed & Zero AMS for Standard `95A` TPU:** Standard flexible TPU (`85A–95A`) must bypass AMS / rear-buffer routing to prevent gear buckling and rubber-band stretching. Route a short extra `4 × 2.5 mm` PTFE guide tube (`~25–45 cm`, bend radius `R >= 60 mm`) directly from an overhead/close low-friction dry spool straight into the toolhead pneumatic collet, with **Top Glass REMOVED** and **Front Door OPEN** (`chamber < 30 °C`).
- **PEI Release Layer & Flow Ceiling:** Print `95A` TPU at `222 / 225 °C` nozzle, **`35 °C` Textured PEI with Glue Stick as a release barrier** (never `> 50 °C` bare PEI), Flow `1.00`, **$V_{max} = 3.6\text{ mm}^3/\text{s}$** (`25–45 mm/s` linear speeds), Retraction `0.4 mm @ 20 mm/s` + Wipe `ON`, **Avoid Crossing Walls `ON`**, and dry **`65–70 °C` for `6–8 h`**. Always use the printer's **Unload** command rather than yanking warm filament manually.
- **Filament Profile & Catalog Hygiene Rule:** When cataloging filaments, profiles, and visual guides, record only **brand, filament type/grade, SKU (e.g., `Kingroon TPU 95A`, SKU `C0468`), and technical printing specs** (temperatures, drying, flow, retraction, bed prep, feeding). Never clutter profiles, tables, or reference cards with store/listing packaging details (`10KG`, `10 × 1 kg bundle`, warehouse region `US/EU`, or color-specific purchase variants).

7 changes: 6 additions & 1 deletion .agents/skills/bambu-studio-ai/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Inspects an `.stl` or `.3mf` mesh against the **Bambu Lab P2S** profile:
* Bounding box vs. P2S `256 × 256 × 256 mm` volume.
* Watertight / Manifold verification.
* `Z = 0` bed adhesion contact footprint check.
* **Support-Free Overhang Audit:** Calculates the percentage and area of downward-facing triangles exceeding `45°` from vertical (excluding the `Z = 0` build plate base) and flags any region that would require supports in Bambu Studio.
* **Support-Free Overhang & Single-Solid Audit (`analyze.py`):** Calculates both the connected-component count (`connected_components == 1` — catching any detached/floating islands like floating leaves or bridged clips!) and the percentage/area of downward-facing triangles exceeding `45°` and `60°` from vertical (`severe_overhang_60_area < 60 mm²`). **NEVER bypass `analyze.py` `overall_pass` on main body plates!**
* Saves a JSON/Markdown printability report in `models/<model-name>/previews/analysis_report.md`.

```powershell
Expand Down Expand Up @@ -102,6 +102,11 @@ Whenever packing multiple trays/modules and multi-color AMS sub-parts into a sin
* Verify `curr_bed_type` has non-zero bed temperature for every filament slot (e.g., `"Textured PEI Plate"` for PETG/PLA/ASA — never `"Cool Plate"` with PETG HF, which fails slicing with `Filaments are not compatible with the plate type`).
* On large parts (`>= 235 mm` on a `256 mm` bed), explicitly set `brim_type = "no_brim"`, `brim_width = "0"`, and `skirt_loops = "0"` so G-code never exceeds `[0, 256]`.
* On **multi-color plates**, keep `enable_prime_tower = "1"`, shift large multi-color objects to open a `>= 55 mm` collision-free strip (e.g., `Y = 100 mm` for a `190 mm` deep model), and position `wipe_tower_x/y` cleanly inside that open strip (e.g., `(185, 205)` with `prime_tower_width = "35"`) so strict cloud/local slicers never report prime-tower collisions.
13. **Mandatory Zero-Support & Zero-Floating-Island G-Code Gate (No Bypasses Allowed):**
* **Never bypass `analyze.py` `overall_pass` on Plate 1 / hero bodies** by silently turning on `enable_support = 1` instead of fixing the geometry.
* Every exported part must verify **`connected_components == 1`** (zero floating or detached sub-meshes), **`is_watertight_manifold == True`**, and **`overhang_gt_60deg_area_mm2 < 60.0`** (`< 25.0 mm²` strict target for sculpted parts).
* During live `bambu-studio.exe --slice` verification, assert **`0` `;TYPE:Support` lines** in the generated `.gcode` and **`0` `"floating"` / `"unsupported overhang"` warnings** in Bambu Studio CLI output across every plate whenever the design is required to be support-free.
* For hollow watertight vessels with angled side-wall bores (watering cans, tanks, planters), also verify `volume(solid_floor_disk - vessel_body) == 0.000000 mm³` and inspect a top-down interior + bottom-face render to confirm zero floor gouging or puncture.

---

Expand Down
49 changes: 39 additions & 10 deletions .agents/skills/bambu-studio-ai/scripts/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,38 @@ def analyze_mesh(stl_path: Path) -> dict:
severe_overhang_60_area = 0.0
signed_volume = 0.0

# Edge map for manifold check (quantized to 1e-4 mm)
# Edge map for manifold check + Union-Find for connected-component floating-island detection
edge_counts = {}
vert_ids = {}
parent = []

def get_vid(qv):
vid = vert_ids.get(qv)
if vid is None:
vid = len(parent)
vert_ids[qv] = vid
parent.append(vid)
return vid

def find(x):
while parent[x] != x:
parent[x] = parent[parent[x]]
x = parent[x]
return x

def union(a, b):
ra, rb = find(a), find(b)
if ra != rb:
parent[rb] = ra

def qvert(v):
return (round(v[0], 4), round(v[1], 4), round(v[2], 4))

for v1, v2, v3 in triangles:
qv1, qv2, qv3 = qvert(v1), qvert(v2), qvert(v3)
id1, id2, id3 = get_vid(qv1), get_vid(qv2), get_vid(qv3)
union(id1, id2)
union(id2, id3)
for a, b in ((qv1, qv2), (qv2, qv3), (qv3, qv1)):
edge = (a, b) if a < b else (b, a)
edge_counts[edge] = edge_counts.get(edge, 0) + 1
Expand Down Expand Up @@ -152,6 +176,8 @@ def qvert(v):

non_manifold_edges = sum(1 for c in edge_counts.values() if c != 2)
is_watertight = non_manifold_edges == 0
connected_components = len({find(i) for i in range(len(parent))})
is_single_solid = connected_components == 1
volume_cm3 = abs(signed_volume) / 1000.0

fits_p2s = (
Expand All @@ -166,8 +192,8 @@ def qvert(v):
)

overhang_pct = (overhang_45_area / total_area * 100.0) if total_area > 0 else 0.0
# Allow minor horizontal bridge areas (e.g., teardrop truncated ceiling or sacrificial screw bridge < 150 mm^2)
support_free_pass = severe_overhang_60_area < 150.0 and overhang_pct < 5.0
# Strict support-free threshold: disallow wide horizontal ceilings/floating ledges (>60 deg)
support_free_pass = severe_overhang_60_area < 60.0 and overhang_pct < 3.5

report = {
"file": str(stl_path),
Expand All @@ -183,13 +209,15 @@ def qvert(v):
"bed_contact_area_mm2": round(bed_contact_area, 1),
"is_watertight_manifold": is_watertight,
"non_manifold_edges": non_manifold_edges,
"connected_components": connected_components,
"is_single_connected_solid": is_single_solid,
"fits_p2s_256mm": fits_p2s,
"fits_safe_margin_250mm": fits_safe,
"overhang_gt_45deg_area_mm2": round(overhang_45_area, 2),
"overhang_gt_60deg_area_mm2": round(severe_overhang_60_area, 2),
"overhang_gt_45deg_percent": round(overhang_pct, 2),
"support_free_verdict": "PASS (Support-Free Ready)" if support_free_pass else "WARN (Check Overhangs/Bridges)",
"overall_pass": is_watertight and fits_p2s and bed_contact_area > 10.0 and support_free_pass,
"support_free_verdict": "PASS (Support-Free Ready)" if support_free_pass else "FAIL (Overhangs Exceed Support-Free Limit)",
"overall_pass": is_watertight and is_single_solid and fits_p2s and bed_contact_area > 10.0 and support_free_pass,
}
return report

Expand All @@ -205,11 +233,12 @@ def format_markdown_report(r: dict) -> str:
"| :--- | :--- | :--- |",
f"| **1. P2S Build Volume (`256×256×256 mm`)** | {'PASS' if r['fits_p2s_256mm'] else 'FAIL'} | `{dims['x']} × {dims['y']} × {dims['z']} mm` |",
f"| **2. Watertight / Manifold Mesh** | {'PASS' if r['is_watertight_manifold'] else 'FAIL'} | `{r['triangle_count']} tris` (`{r['non_manifold_edges']}` non-manifold edges) |",
f"| **3. Part Volume & Filament Est.** | INFO | `{r['volume_cm3']} cm³` (~`{round(r['volume_cm3'] * 1.24, 1)} g` PLA solid / ~`{round(r['volume_cm3'] * 1.24 * 0.35, 1)} g` @ 20% infill) |",
f"| **4. Bed Alignment (`Z_min`)** | {'PASS' if abs(r['bounds_z_mm']['min_z']) <= 0.05 else 'WARN'} | `Z_min = {r['bounds_z_mm']['min_z']} mm` |",
f"| **5. First-Layer Bed Contact** | {'PASS' if r['bed_contact_area_mm2'] >= 25.0 else 'WARN'} | `{r['bed_contact_area_mm2']} mm²` on build plate |",
f"| **6. Support-Free Overhangs (`<= 45°`)** | {r['support_free_verdict']} | `{r['overhang_gt_45deg_area_mm2']} mm²` (`{r['overhang_gt_45deg_percent']}%` of surface) `> 45°` |",
f"| **7. Steep Overhang / Bridge Area (`> 60°`)** | {'PASS' if r['overhang_gt_60deg_area_mm2'] < 150.0 else 'WARN'} | `{r['overhang_gt_60deg_area_mm2']} mm²` (small bridges/teardrop caps OK) |",
f"| **3. Single Connected Solid (Zero Floating Islands)** | {'PASS' if r['is_single_connected_solid'] else 'FAIL'} | `{r['connected_components']}` connected component(s) |",
f"| **4. Part Volume & Filament Est.** | INFO | `{r['volume_cm3']} cm³` (~`{round(r['volume_cm3'] * 1.24, 1)} g` PLA solid / ~`{round(r['volume_cm3'] * 1.24 * 0.35, 1)} g` @ 20% infill) |",
f"| **5. Bed Alignment (`Z_min`)** | {'PASS' if abs(r['bounds_z_mm']['min_z']) <= 0.05 else 'WARN'} | `Z_min = {r['bounds_z_mm']['min_z']} mm` |",
f"| **6. First-Layer Bed Contact** | {'PASS' if r['bed_contact_area_mm2'] >= 25.0 else 'WARN'} | `{r['bed_contact_area_mm2']} mm²` on build plate |",
f"| **7. Support-Free Overhangs (`<= 45°`)** | {r['support_free_verdict']} | `{r['overhang_gt_45deg_area_mm2']} mm²` (`{r['overhang_gt_45deg_percent']}%` of surface) `> 45°` |",
f"| **8. Steep Overhang / Bridge Area (`> 60°`)** | {'PASS' if r['overhang_gt_60deg_area_mm2'] < 60.0 else 'FAIL'} | `{r['overhang_gt_60deg_area_mm2']} mm²` (must be `< 60 mm²` for support-free FDM) |",
"",
]
return "\n".join(lines)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
("AGENTS.md", "AGENTS.md"),
("FILAMENTS.md", "FILAMENTS.md"),
("SPEED_TUNING_GUIDE.md", "SPEED_TUNING_GUIDE.md"),
("TPU_P2S_VISUAL_GUIDE.md", "TPU_P2S_VISUAL_GUIDE.md"),
("profiles", "profiles"),
(".agents/skills/3d-print-modeling", ".agents/skills/3d-print-modeling"),
(".agents/skills/bambu-studio-ai", ".agents/skills/bambu-studio-ai"),
Expand Down Expand Up @@ -127,9 +128,13 @@ def sanitize_public_agents_md(text: str) -> str:
)


# Files inside synced directories that store personal workspace history and should be generalized/skipped in public BambuForge
# Files inside synced directories that store personal workspace history or model-specific builders and should be skipped in public BambuForge
SKIP_IN_PUBLIC = {
"feedback-log.jsonl",
"sport_media_v2_core.py",
"sport_media_v2_pipeline.py",
"watering_can_hydraulics.py",
"watering_can_sculpt_engine.py",
}


Expand Down
Loading
Loading