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
4 changes: 2 additions & 2 deletions shell/export/print/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ Designed for a **0.4 mm nozzle**, ~0.2 mm layers.

## Support blocks (TopShell, BottomShell)
`TopShell_with_buck.stl` and `BottomShell_with_buck.stl` include a few plain rectangular blocks in the big open voids, already in the right place (separate lumps in the same STL, sitting on the bed). `TopShell.stl` / `BottomShell.stl` are the bare shells (default).
- TopShell: 2 blocks (about 13.5 and 3.6 cm3; the one out front under the OLED housing was dropped, `--max-y 50`). BottomShell: 2 side blocks (about 4 cm3 each).
- TopShell: 10 blocks: the big one in the main cavity (about 13.5 cm3), one by the posts (about 3.4 cm3), and 8 small ones around the face buttons and under the thumbstick (side strips, between the button columns, beside and behind the stick; 0.5 to 2.3 cm3 each, all at least 0.3 mm from the part). The one out front under the OLED housing was dropped (`--max-y 50`). BottomShell: 2 side blocks (about 4 cm3 each).
- Each block keeps 0.3 mm or more from the part on every side, and its flat top is lifted to about 0.2 mm under the lowest roof point above it. The sloped parts of the roof, and everything else, still use normal slicer supports.
- In OrcaSlicer load the STL and answer yes to "split into parts". Give the block parts 1 wall and about 5% infill, no supports.
- Regenerate with `tools/gen_buck.py <bare print stl> <out stl>` (needs numpy, scipy, scikit-image, trimesh, rtree).
- Regenerate with `tools/gen_buck.py <bare print stl> <out stl> [--max-y 50] [--band -20.5 22.5]` (`--band` adds the small face-button/thumbstick blocks; TopShell uses both flags) (needs numpy, scipy, scikit-image, trimesh, rtree).

## Built-in breakaway supports
- Tapered pillars: 1.0 mm base, 0.6 mm tip (0.7/0.5 mm in tight spots), ending 0.2 mm below the part so they snap off.
Expand Down
228,730 changes: 114,363 additions & 114,367 deletions shell/export/print/step/BottomShell.step

Large diffs are not rendered by default.

Binary file modified shell/export/print/stl/BottomShell.stl
Binary file not shown.
Binary file modified shell/export/print/stl/BottomShell_with_buck.stl
Binary file not shown.
Binary file modified shell/export/print/stl/TopShell_with_buck.stl
Binary file not shown.
9 changes: 8 additions & 1 deletion shell/export/print/tools/gen_buck.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,16 @@ def _max_rect(m):
start=s0
st.append((start,cur))
return best
def make_boxes(tris,extra=2,min_cm3=3.0,max_boxes=3):
def make_boxes(tris,extra=2,min_cm3=3.0,max_boxes=3,band=None):
solid,x0,y0,m=solid_grid(tris)
fill,_,_=make_buck_from(solid,x0,y0,need_all=True)
# downsample 2x in XY and Z, erode by `extra` coarse voxels so the blocks stay well clear
f=fill[:fill.shape[0]//2*2,:fill.shape[1]//2*2,:fill.shape[2]//2*2]
f=f.reshape(f.shape[0]//2,2,f.shape[1]//2,2,f.shape[2]//2,2).all(axis=(1,3,5))
f=ndimage.binary_erosion(f,structure=np.ones((3,3,1)),iterations=extra,border_value=1)
cx,cz=CX*2,CZ*2; boxes=[]
if band: # only keep free space whose y lies inside the band
ys=y0+np.arange(f.shape[1])*cx; f[:,(ys<band[0])|(ys+cx>band[1]),:]=False
for _ in range(max_boxes):
best=None; acc=np.ones(f.shape[:2],bool)
for k in range(f.shape[2]):
Expand Down Expand Up @@ -157,6 +159,11 @@ def raise_top(tris,b,gap=Z_GAP,side=0.3):
if __name__=='__main__':
# usage: gen_buck.py in_print_plain.stl out_with_buck.stl (boxes are added as extra lumps in place)
tris=load(sys.argv[1]); boxes=make_boxes(tris,extra=1,min_cm3=2.5,max_boxes=4)
if '--band' in sys.argv: # extra small blocks in a y band, e.g. around the face buttons / thumbstick: --band -20 22
i=sys.argv.index('--band'); bb=(float(sys.argv[i+1]),float(sys.argv[i+2]))
boxes+=make_boxes(tris,extra=1,min_cm3=0.3,max_boxes=8,band=bb)
if '--max-y' in sys.argv: # drop blocks out past this print-frame y (e.g. outside the shell, under the OLED housing)
my=float(sys.argv[sys.argv.index('--max-y')+1]); boxes=[b for b in boxes if b[3]<=my]
boxes=[raise_top(tris,b) for b in boxes]
allt=np.concatenate([tris]+[box_tris(b) for b in boxes]) if boxes else tris
write(sys.argv[2],allt,'part+buck')
Expand Down
52,689 changes: 26,345 additions & 26,344 deletions shell/export/step/BottomShell.step

Large diffs are not rendered by default.

Binary file modified shell/export/stl/BottomShell.stl
Binary file not shown.
Binary file modified shell/fusion/SnipsShell.f3d
Binary file not shown.
Loading