Skip to content

KerfScript 0.13.1: living hinges print solid, closed solids in 3D files - #16

Closed
JulyJ wants to merge 6 commits into
mainfrom
print-solid-hinges
Closed

JulyJ wants to merge 6 commits into
mainfrom
print-solid-hinges

Conversation

@JulyJ

@JulyJ JulyJ commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

KerfScript 0.13.1: fixes for the 3D files, mostly the print layout.

  • In the print layout a part that bends on a living hinge prints solid, in its bent shape; the cuts of living_hinge() and flex_rect() are left out of it.
  • symbol(solid = true) engraves only the drawing's detail, not slivers in the rounded inside corners of its outline.
  • close(r, sharp = true) closes gaps and leaves inside corners as drawn.
  • Every body of a 3D file is a closed solid for bent parts with marks, strips bent round to meet themselves, and areas that touch at a corner.
  • Each part and mark body of meshBodies() has matrix; meshBodies() and toModel() take hinges; a mark that is a living hinge's cuts has hinge: true.

Laser output is unchanged; the language stays 0.3.

npm run check: 934 pass, 0 fail, 9 skipped (wasm not built).

JulyJ added 6 commits December 2, 2026 13:12
In the print layout a part that bends on a living hinge is made bent and
without the hinge's cuts: living_hinge() repeats its cuts on a layer of
its own, so the cuts of a hinge are told from a part's other cuts, which
stay. A bent part on its own or in a stack stands on its lower edge as
one object with what is glued on it. meshBodies() and toModel() take
hinges to choose. The laser's files and the other layouts are unchanged.
symbol(solid = true) engraved the silhouette less the drawing, which
includes the fillet that closing leaves in every inside corner of the
outline: slivers along the edge of a plain silhouette, which printed as
loose flakes with open meshes. The engraving now leaves that rounding
out, and anything under a tenth of a millimetre wide. close() takes
sharp = true to close gaps without rounding inside corners.
A bent part was built from bands with walls between them inside, so a
slicer saw four faces on an edge. The bands now join edge to edge with
no wall at a seam, and a strip bent round to meet itself has none where
its ends meet. Areas that touch at a corner are drawn a hundredth of a
millimetre apart there, so each is a closed solid.
Strips of an area thinner than 0.004 mm and corners closer than a 3D
file holds came out as faces with no thickness, or as edges with four
faces. Each area is opened by that much, put on a grid of a thousandth
of a millimetre and joined again before it is extruded. A hole that
touches an edge or another hole gives way at that corner, the ends of a
strip bent into a full circle are welded to the same corners, and a bend
that ends at the edge of its part leaves no band of no width beyond it.
meshBodies() adds matrix to a part or mark body: the 4 x 4 matrix, row
by row as the assembly's, from the part's own coordinates to the body's
in the layout, so a program can place the outline itself in the print or
flat layout. A part bent on a living hinge has none.
JulyJ added a commit that referenced this pull request Dec 3, 2026
…es (#16)

In the print layout a part that bends on a living hinge prints solid, in
its bent shape, with the hinge's cuts left out. symbol(solid = true)
engraves only the drawing's detail, not slivers in the rounded corners
of its outline, and close(r, sharp = true) leaves inside corners as
drawn. Bent parts with marks, strips bent round to meet themselves and
areas that touch at a corner are closed solids. Each part and mark body
of meshBodies() has matrix; meshBodies() and toModel() take hinges.
Laser output is unchanged; language stays 0.3.
@JulyJ

JulyJ commented Dec 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged into main as e8d755c.

@JulyJ JulyJ closed this Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant