18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-03 08:55:22 +01:00
Commit Graph

5 Commits

Author SHA1 Message Date
miloszunio 0df107ecd9 fix(editor): a point of the brush line given twice puts no model past the end of the line
A double-click on the last point gave a piece of no length at the end, whose direction fell back to +x, so the last place of a row went along the line past its end instead of to its side. The brush now ignores a click within 0.1 m of the point before, and the line itself skips a point given twice, for any caller. Tests: the doubled end point, and the line_most limit of a regular line.
2026-11-20 16:49:19 +01:00
Claude 2a4802bf12 fix(editor): the keys of the line of the brush only while the brush is the one along a line
Points left from a line, after a switch to the circle or to the single model, were put by Enter there, and
Backspace and Esc took them back unseen. Enter, Backspace and Esc now act on the line only while the brush
is the one of many models along a line (brush_on_line()).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QRgQ1K1Qu7TCsa74zsNURd
2026-11-17 02:36:21 +01:00
Claude 81097b6edf fix(editor): the brush of models after the review of #375, and the many put along a line
The review:
- editorScatter.cpp starts with stdafx.h, as the other editor sources the unit tests build do: without it the
  glm of the tests (GLM_FORCE_*) and its own were two definitions of the same templates, and the distance
  checks of test_scatter went wrong with GCC.
- The uniform fill stops at dab_most (2000) models a dab, as the random and the feathered fills do, and the
  status says so. Its points are Spacing apart by the grid, so they're checked only against what the earlier
  dabs put near the circle, no longer against each other.
- Undo and redo end a stroke still held: the models so far are the step taken back, and the next dabs don't
  go into another step of the history.

New: the brush of many models "Along a line". LMB clicks the points of a line on the ground, Backspace takes
the last one back, Esc drops the line, Enter puts the models along it, one step of the history.
- The band reaches Width each side of the line (0: one row on the line).
- Regular: rows Spacing apart along and across the line, every other row shifted by half, each model moved
  off its place by up to the Irregularity share of the spacing. Irregular: anywhere in the band, at the
  density asked for, the spacing kept, fewer towards the edges if asked.
- The size of the models goes from their own on the line to Size at the edges (percent) at the edges of the
  band, on top of the turn and the scale of the brush.
- Where the line bends, the rows on the inner side don't put two models on one place.
- One line puts 20000 models at most.

Polish for the new texts. Unit tests for the limit of the uniform fill and for the line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QRgQ1K1Qu7TCsa74zsNURd
2026-11-17 01:53:25 +01:00
Claude 644689ca28 chore(editor): the brush and the ASCII track names cleaned up for Sonar (init-statements, std::numbers::pi, ranges, the dab of the stroke and the settings of many models in functions of their own)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DDcMn1Q7wdYkbxDUWscNHZ
2026-11-14 23:00:52 +01:00
Claude afc43b5832 feat(editor): the brush of models as one model or many in a circle
The brush of the node bank put one model under the cursor every time it went the spacing further, with no idea of an area. It's two ways now:

- Single model: LMB puts one model at the cross on the ground.
- Many models: while LMB is held, models land in a circle of the radius chosen along the cursor's path, a new dab every half radius (or spacing). The circle fills at random (a density a 100 m², no closer than the spacing), uniformly (a grid of triangles as wide as the spacing, fixed to the world, so strokes over one another don't double it) or feathered (fewer towards the edge). A whole stroke is one step of the history.

Every model is turned (fixed angles about x, y, z, or random up to ± degrees about each) and scaled (fixed percent along x, y, z, or random ± percent, one for all the axes or each its own). A cross under the cursor and the circle of the brush are drawn on the ground.

Where the models go and how they're turned and scaled is in editor/editorScatter (engine-free), with tests in tests/unit/test_scatter.cpp.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DDcMn1Q7wdYkbxDUWscNHZ
2026-11-14 22:17:03 +01:00