Skip to content

Text (stuck on) test: a capsule's round top keeps the lay straight on (#1231) - #1359

Open
mlugo-apx wants to merge 1 commit into
henmedia:mainfrom
mlugo-apx:capsule-straight-on
Open

mlugo-apx wants to merge 1 commit into
henmedia:mainfrom
mlugo-apx:capsule-straight-on

Conversation

@mlugo-apx

Copy link
Copy Markdown
Contributor

The capsule case @marcus040473 suggested on #1324, as a small pull request on main as you asked: the rod was the only test that pins "keep straight on", and a round top guards that choice better.

Summary

  • A capsule helper (a cylinder with half spheres at both ends, closed and wound outward, as cylinder beside it) and one test: "Layerling" turned on end near the capsule's top comes out whole, torn at no point, and the mesh closed.
  • It guards the other arm of the choice in refined(). On the rod the letters lie clearly more whole straight on (0.955 against 0.535), so the wholeness decides; on the capsule they lie as whole either way (0.718), within WHOLE_MARGIN, and straight on is kept because it tears less (0 points against 36).

Testing

On 005885d (on main at d7550dc):

  • npm test -- tests/unit/surfaceTextureText.test.ts (22 tests) and npm run typecheck
  • Fails when the fold is kept regardless (if (false && over.creased): torn 36) and when the choice is reversed; passes unchanged, three runs, about 0.7 s.

🤖 Generated with Claude Code

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