trochoid_law's fixture stock stands beside the part, not over it (the aligned stock covers one quarter)

Open Beginner friendly
#1,608 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
testing

Research direction

The fixture is job() in crates/app/tests/trochoid_law.rs, which places the 40x40x8 box stock at pos (-20,-20,0) and (20,-20,0) with a quarter turn; the comment there is wrong. Check the stock's world bounds with stock_world_aabb_for after a SetStock, as the issue describes, then move the stock to the origin in both cases and assert its bounds. Also check circular_pick_law.rs and circular_entity_law.rs for the same offset. Done means the suite passes with the stock centred over the part and the comment corrected.

Written by the indexing model from the issue text.

Description

area:2d bug effort:low P7 source:agent

What happens: crates/app/tests/trochoid_law.rs (#1593, merged with PR #1597) places its 40 x 40 x 8 box stock at pos (-20, -20, 0) for the aligned case and at pos (20, -20, 0) with a quarter turn for the turned case. Its comment says the box "lands on [-20, 20]^2 again". A box stock stands centred on its place, so the aligned stock is on [-40, 0]^2 and the turned one on [0, 40] x [-40, 0]: each covers one quarter of the part ([-20, 20]^2).

Measured while writing keep_law.rs for #1603: SetStock of a 50 x 50 box at pos (-25, -25, 0) gives stock_world_aabb_for = (-50, -50) .. (0, 0).

Effect: the suite's verdicts still hold (the op-level gouges do not read the stock), but the aligned-stock rows are weaker than they read: the program sim judges a quarter of the part, and "a legal slot posts on the aligned stock" is posted against a stock that does not hold the part. engrave_law.rs and keep_law.rs (PR for #1595 / #1603) place the stock at the origin and assert its bounds.

Done means: trochoid_law.rs's job() places the stock centred over the part on both cases (pos at the origin; the quarter turn keeps the footprint), asserts the stock's bounds, the comment is corrected, and the suite still passes. Check circular_pick_law.rs / circular_entity_law.rs for the same placement.

Related: #1593, #1603.

Dominant language
Rust
Stars
8
Forks
11
Avg merge
7h 10m
Merged PRs (30d)
740

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NeoTech/Camcraft

All issues in NeoTech/Camcraft

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.