Commit Graph
947 Commits
Author SHA1 Message Date
dotCooCoo 1b38f8cf7f Merge main into feat/3d-rendered-paints 2026-12-05 21:08:23 -08:00
.CooCoo 7478e3f61e Merge pull request #11022 from dotCooCoo/feat/3d-raster-color-mode
3D and Materials: Raster Settings › Color makes the rendered image RGB, grayscale or bitmap
2026-12-05 20:54:50 -08:00
dotCooCoo 3551fa0e7c 3D and Materials: Bitmap on a transparent background makes black and transparent pixels
With Background set to Transparent, the 3D rendered image's Bitmap color
model now makes each pixel opaque black or fully transparent: a dark pixel
at least half covered is black, and a light pixel or one less than half
covered is transparent. Before, white pixels stayed white and edge pixels
kept partial coverage. With a white background each pixel is still black
or white.

`RENDER_COLOR_MODELS` is exported from the effects crate beside
`RENDER_BACKGROUNDS` and `RENDER_QUALITIES`.

Docs: docs/three-d.md, docs/mcp.md, docs/target-app-parity.md, params text.
2026-12-05 17:59:49 -08:00
dotCooCoo e6ed3a2a4c Effects: Glowing Edges scales its glow by the whole object's strongest edge at every zoom
Glowing Edges divides each pixel's edge strength by the strongest edge in
its input (crates/effects/src/pixel/edges.rs:45-56), but its reach let the
renderer crop the raster to the view once the object passed the pixel
budget. A zoomed-in frame then took the peak from the part in view, so the
same edge glowed at a different brightness depending on the zoom and on
where the view was, and a pan within a kept crop's margin kept the earlier
crop's peak.

Glowing Edges now has no nearby reach, as Torn Edges and Cutout, whose
results also depend on the whole object: past the budget the whole object
is filtered at a lower resolution, and whole-pixel pans reuse that raster.
2026-12-05 17:11:28 -08:00
dotCooCoo 60c752ff25 3D and Materials: test shadow plane images per ink and the raster work Check counts
With Shadows on, solids in the same opacity and blending mode share one
shadow plane image and solids in different ones get their own, and each
plane image casts only the shadows of the solids in its run. A new test
checks the image order and inks, the plane coverage, the layer plan and
the casters of each plane's scene.

Check counts raster work only for the triangles an image draws. A new
test finds the work limit of one solid's own image and shows that an
unseen duplicate in the scene does not raise it, that drawing both
solids does, and that the image draws within that limit.
2026-12-05 16:46:29 -08:00
dotCooCoo d83fa66454 3D and Materials: Raster Settings › Color makes the rendered image RGB, grayscale or bitmap
The 3D effects' `render` object takes `colorModel` (`document`, the default,
`grayscale` or `bitmap`). Grayscale gives each pixel of the rendered image the
Rec. 709 luma of its color, and Bitmap makes it black or white, after the
background and with each pixel's transparency kept, as Effect › Rasterize does
with the same model ids. Edge pixels are mapped from their straight color
before the coverage is rounded. Grayscale and Bitmap images are stored as gray
PNGs, and the model is part of the rendered image's cache key.

Any other value is refused with an error and leaves the object and the undo
history unchanged. The setting is saved with the effect.

Render Settings › Raster Settings… gets a Color row (RGB, Grayscale, Bitmap).
It opens blank for a selection that holds different models, and OK sets the
picked model on every selected object in one undo step.

Docs: docs/three-d.md, docs/mcp.md, docs/target-app-parity.md, params text.
2026-12-05 16:24:16 -08:00
dotCooCoo cb63a90ca3 3D and Materials: test the 16-image limit and the shared pixel limit when rendered 3D draws
Adds tests that draw a see-through object whose two images each fit the
pixel limit alone but not together, and one with 16 and 17 see-through
fills, so removing the shared limit or the image cap fails a test. The
white-background test now uses a see-through solid past the pixel limit
and compares its fallback with the same object in shaded mode.
2026-12-05 15:20:49 -08:00
dotCooCoo f033a17bd0 3D and Materials: rendered 3D draws see-through and blended solid colors in their opacity and blending mode
Render Settings > Rendered drew the shaded faces instead of the image whenever
a solid's fill or stroke was below 100% opacity or in a blending mode other
than Normal. Such a solid now draws its own image in that opacity and blending
mode, lit and shadowed as in the single image, in the order of the fills and
strokes; with Shadows on, the shadow plane draws first, one image for each run
of solids in the same opacity and blending mode. An effect on one fill or
stroke draws its shadow plane behind the object's other fills and strokes, and
with background white one white rectangle goes behind its images. A solid at
0% opacity draws nothing, casts no shadow and is left out of the image's size
and of the rendered mesh budget. The images share the pixel and work limits;
past 16 images the shaded faces are drawn.

Revolve on a group still draws its shaded faces when a member's surface is
see-through or blended, now with its own warning. Gradients, patterns,
mapped graphics and masked members keep the shaded faces.
2026-12-05 14:27:44 -08:00
dotCooCooandFredApps 777e0be488 Canvas: arrowhead bounds follow the painted head, and the pasteboard fade has no seams
The visual bounds of a stroke with arrowheads added a square around each
end point, as wide as the head's reach. With the arrowhead's align set to
"Tip on the end point", the head lies back along the path, so the
selection box reached past the tip by the head's whole length, leaving
empty room in front of the arrow. The bounds now take the box of each
head's outline from the same geometry the canvas paints, so the box ends
at the tip. The arrowhead geometry moves from vectorcraft-effects to
vectorcraft-doc so that the bounds code can use it; vectorcraft-effects
re-exports the same items.

The fade outside the artboards filled each of its pieces on its own, and
each faded out along the edges it shares with the next, so thin lighter
lines ran from the artboard's corners to the edges of the canvas. The
pieces are now filled as one unfeathered mesh (Draw::data_fill_tiled).

Fixes #10221
Fixes #10225

Co-authored-by: FredApps <[email protected]>
2026-12-05 13:46:17 -08:00
dotCooCoo 755d28c333 3D: Revolve renders on groups and on fills and strokes
In Render Settings > Rendered, Revolve on a group or layer drew its
shaded faces and reported "Revolve renders on a single object only".
Revolve on a fill or stroke did the same. Extrude & Bevel, Inflate and
Rotate already draw an image in both cases.

- On a group, every member's surface is swept about the shared axis
  into one mesh list and drawn as one image, with the shadow plane
  placed from every member that casts. A member that is not an opaque
  solid color in Normal blending, or that sits in a group with an
  opacity mask or a blending mode, keeps the shaded faces and reports
  why, as the other effects do. The painted bounds of the group are the
  image's rectangle.
- On a fill or stroke, that paint's surface is drawn as its own image
  under the effects after its Revolve, as Extrude & Bevel, Inflate and
  Rotate draw a rendered fill or stroke.
- When a group's members, or the clipping groups, blends and symbol
  instances in it, can't be revolved, a rendered Revolve on the group
  reports the reason in the status bar and the command's warning.
- The object, fill and stroke paths share one helper for the image, so
  the eligibility checks and the shadow plane are the same in each.

Docs: docs/mcp.md, docs/three-d.md, docs/target-app-parity.md.
2026-12-04 23:33:48 -08:00
dotCooCoo 76cbd16361 3D: Rotate in rendered mode checks every fill it draws
Rotate draws a plane for every fill and stroke, but rendered mode only
checked the top fill and the strokes before drawing the image. A
gradient fill below a solid top fill was drawn as a flat color in the
rendered image instead of falling back to shaded faces with the
warning. Extrude & Bevel and Inflate still check only the top fill and
strokes they build solids from.
2026-12-04 11:36:44 -08:00
.CooCoo edcb80db38 Merge pull request #10429 from dotCooCoo/feat/3d-rendered-tier
3D: Render Settings › Rendered draws the solid as a lit image with shadows from every light
2026-12-04 09:24:53 -08:00
dotCooCoo 014ed9a190 Merge main into feat/3d-rendered-tier 2026-12-03 10:38:52 -08:00
dotCooCoo 9c11c47f75 Doc tests: unsafe code is denied in doc tests too
Rustdoc builds each doc test as its own crate, without the workspace's
`unsafe_code = "deny"` and without a library's `#![forbid(unsafe_code)]`,
so a doc test holding an `unsafe` block passed `cargo test --doc`.

- Every library root now carries `#![doc(test(attr(forbid(unsafe_code))))]`,
  or `deny` in cad, eps and metafile, which rely on the workspace lint.
- `cargo xtask layers` reports a library whose doc tests are missing the
  attribute, or use `deny` where the library forbids unsafe code.
- AGENTS.md names the rule next to the `unsafe` allowlist.
2026-12-03 09:51:28 -08:00
.CooCoo 3a6e384f45 Merge pull request #10459 from dotCooCoo/fix/halftone-grid-styles
Vector Halftone: add Grid, Grid Angle, Grid Dots and Grid Dots Angle styles
2026-12-03 07:26:20 -08:00
.CooCoo 7a14274d56 Merge pull request #10211 from dotCooCoo/feat/vector-3d-materials
3D: Roughness and Metallic on the Materials tab shade and export the surface
2026-12-03 07:21:12 -08:00
dotCooCoo 5d784fb626 Merge main into fix/halftone-grid-styles 2026-12-02 15:15:55 -08:00
dotCooCoo c679af091d Vector Halftone: write each round dot with four curves again
The cell-clipped dots split every elliptical arc at 45 degrees, and the
quadrants were joined with a zero-length line where they met on an axis.
A round dot that stays inside its cell had 8 curves and 3 extra anchors
instead of 4 curves, and the halftone's SVG export grew to about twice
its size.

- Arcs are split at 90 degrees, one curve per quarter turn.
- Quadrants and spot corners that meet at the same point are joined
  without a line, so the join adds no anchor.

Tests: an unclipped Circle and Ellipse dot is 4 curves and no line, and
no dot shape repeats an anchor where its quadrants or corners meet.
2026-12-02 13:31:19 -08:00
dotCooCoo 20a5e42555 3D: check the unshaded pixel with a test-lint-clean assertion
The gate's test-lint step failed on `unshaded_surfaces_show_their_paint`:
its `assert!(...all(...))` had no length or emptiness check. The test now
takes the largest channel difference and asserts it is `Some(0..=1)`, so an
empty comparison fails and the one-unit tolerance per channel is unchanged.
2026-12-02 11:25:17 -08:00
dotCooCoo 37a8aa85e5 3D: rendered mode checks the paints it draws and reports Pathfinder fallback
- Rendered eligibility reads only the top fill and strokes, the same items
  the solids are built from, so a lower gradient fill no longer blocks it.
- A later Pathfinder effect falls back to shaded faces with the paths-only
  warning, as geometry effects do.
- Live 3D edits show the fallback warning for one or several objects.
- Raster Settings shows the resolution field as mixed when the selected
  objects' effective resolutions differ.
- A curved highlight edge that crosses its neighbor keeps the outline.
2026-12-02 06:35:52 -08:00
dotCooCoo d41bf48738 Vector Halftone: round dots inside the cell keep four anchors
Circle and Ellipse dots that fit inside their cell use the four-anchor
ellipse path again; the quadrant builder is kept for dots that need
clipping. The style tests use a gray fill, so an explicit shape that is
ignored changes the result. docs/control-protocol.md lists the dialog's
style field.
2026-12-02 06:19:35 -08:00
dotCooCoo f902da5d30 Merge main into feat/vector-3d-materials 2026-12-02 02:25:15 -08:00
dotCooCoo 00b3d4ca06 3D: rendered mode keeps perspective depths close to the eye
The clip matrix refused a depth range whose depth slope came out
negative, which happens when the nearest point is close to the eye
(eye 100, depths 0 to 99.5), and the solid fell back to shaded faces.
The mapped depth rises between the two ends whenever w is positive at
both, so the check now tests w and the mapped depths instead of the
slope. A test covers that range and a range that reaches the eye.

The resolution test also checks that the rendered image carries its
pixels, and docs/mcp.md and docs/target-app-parity.md say that
rendered shadows need both Shading and Shadows on.
2026-12-02 02:11:55 -08:00
dotCooCoo c0d184b457 Merge main into feat/3d-rendered-tier 2026-12-02 00:28:46 -08:00
dotCooCoo c58415b307 Tests: color and effects tests check behavior, not their own tables
Parse tests in the color crate looped over every id or label and parsed
it back. Blend modes, policies, harmony rules, recolor methods and WCAG
categories parse by looking the text up in that same table, so those
loops could not fail. They now parse representative ids, labels and
spellings, and the edge cases: "Color" next to "Color Burn", empty
text, and a label where only ids parse.

- default_swatches_parse read swatch.rs as text. It now checks the
  built swatches: no two solid swatches share a color (a bad hex
  literal falls back to black), and the Sunset and Ocean stops equal
  the swatches their literals name.
- loads_system_cmyk_icc ran only on macOS and returned early without
  the system profile. loads_icc_files_and_refuses_bad_ones runs on every
  native target: a missing file is an I/O error naming the path, a file
  that is not a profile is refused, and a built-in profile's bytes are
  refused for their name.
- the_other_libraries_keep_classic_mixing_and_centered_midpoints is
  removed: those libraries are built with Gradient::new's defaults.
- pixel_timings and bench_catalog_lookup are removed. They were ignored
  and only printed timings.
- Checks over lists that can be empty now also check the count:
  reverse and move keep every stop, a conic draws its 4 wedges, each
  harmony gives at least two colors, the fit leaves patches out, the
  wireframe draws edges, a flat warp keeps its anchors, a gradient
  stroke has slices, and fitted dashes on a curve are drawn.
- the_effects_are_colour_adjustments_in_their_own_menu checks one
  add-on effect and one effect outside it instead of every entry.
2026-12-01 17:24:39 -08:00
dotCooCoo 9c26334a4a Vector Halftone: unknown styles keep Shape and Angle; refuse a non-string style
The dialog hides Shape and Angle, and leaves them out of the command,
only for a style that names a preset. Custom, no style and a style this
build does not know keep the stored Shape and Angle on screen, since the
renderer uses them. object.vectorHalftone refuses a null or non-string
style; Custom applies only when the key is left out. The shape docs now
say that partial-tone circle, ellipse and diamond dots stay inside their
cell, sized to keep the tone's coverage.
2026-12-01 14:12:51 -08:00
.CooCoo 4596f1a8be Merge pull request #10374 from dotCooCoo/fix/swallowed-regression-guards
Tests: guards check the environment, not the output under test
2026-12-01 14:10:23 -08:00
dotCooCoo 1b7cde01de Vector Halftone: full-tone dots fill the cell; Style picker shows any stored case
A dot at full tone is now the cell's exact square for every shape but
Line, which keeps its overlap along the row. Before, a full-tone Diamond
or Grid Dots dot was built from its clipped shape, leaving near-duplicate
corner anchors and small gaps between cells.

The live effect's dialog and the Appearance panel's inline editor spell a
stored style such as GRIDDOTS or CUSTOM as the picker's id, so the picker
shows it selected while its choice ids stay the ones the dialog accepts.
2026-12-01 13:40:15 -08:00
dotCooCoo 193034f469 Vector Halftone: refuse unknown live styles; join dot quadrants cleanly
effect.apply and effect.setParams stored an unknown style such as
"gridDot", which the effect drew as Custom while the dialog hid Shape
and Angle. Both commands now refuse it before editing, as
object.vectorHalftone does, and accept the named styles in any letter
case.

Dot quadrants that meet on an axis, and the corner cutouts of Euclidean
and Elliptical dots past half tone, were joined with a zero-length line
that added duplicate anchors. They now join directly. A zero-tone dot
gives an empty path instead of closing a path with no start.

The params text, docs/mcp.md and the progress line describe the style
rules.
2026-12-01 12:13:48 -08:00
.CooCoo eb8e3b41bd Merge pull request #10452 from dotCooCoo/fix/halftone-merged-dot-edges
Vector Halftone: round and diamond dots stay in their cell, so dark tones join cleanly
2026-12-01 10:49:12 -08:00
dotCooCoo 5c907ae60f Vector Halftone: Grid Dots styles use the cell-clipped Circle dot
The Circle dot now stays in its cell and fills it at 100%, which is the
look the Grid Dots styles need, so gridDots and gridDotsAngle use circle
at 0 and 45 degrees and the separate Cell Dot shape is removed. The
dialog's OK and preview leave out the hidden Shape and Angle while a
named style is picked, so the style's own shape and angle apply.
2026-12-01 06:54:15 -08:00
.CooCoo 32dca73ec1 Merge pull request #10432 from dotCooCoo/fix/test-tolerances-render-effects-brush
Tests: exact expectations for gradients, brush pressure, Smart Blur and effects
2026-12-01 06:39:09 -08:00
dotCooCoo 4f44d6469e Merge fix/halftone-merged-dot-edges into fix/halftone-grid-styles 2026-12-01 06:02:50 -08:00
dotCooCoo 926959780c Merge main into fix/halftone-grid-styles 2026-12-01 06:02:50 -08:00
dotCooCoo a6a0f3361f Vector Halftone: add Grid, Grid Angle, Grid Dots and Grid Dots Angle styles
A new `style` parameter on object.vectorHalftone and the live effect sets
the dot shape and screen angle: grid is Euclidean at 0 degrees, gridAngle
Euclidean at 45, gridDots and gridDotsAngle a new Cell Dot shape at 0 and
45. A shape or angle given with a style wins in the command, and an
unknown style is refused. The dialog adds a Style choice and hides Shape
and Angle while a named style is picked.

The Cell Dot shape is round until it touches its cell's sides, then is cut
flat by them, so the cell is solid at 100%. The Circle shape is unchanged.
2026-12-01 06:02:49 -08:00
e28faa0a94 Color Halftone: draw dark dots on light tones (#10316)
* fix(effects): draw dark dots in RGB Color Halftone

(cherry picked from commit 2dbe91af9f)

* Cover dark-on-light RGB halftone polarity

Updated halftone tests to clarify behavior regarding pixel brightness and dot sizes.

(cherry picked from commit babd60e332)

* effects: bound Color Halftone dots at full coverage

(cherry picked from commit 8fb0bf55607762df6e3acc2ed7ed37a643fea022)

* effects: describe Color Halftone ink coverage

(cherry picked from commit 0dbf12514095b6e12cb4414055d8ac47ee1fbcdc)

* Document the change to saved RGB halftones

* Test the bounded edge overlap of full halftone dots

---------

Co-authored-by: Mex <[email protected]>
Co-authored-by: dotCooCoo <[email protected]>
2026-12-01 14:17:04 +01:00
dotCooCoo b26f833acf Vector Halftone: round and diamond dots stay in their cell
Circle, Ellipse and Diamond dots were sized by their own area and drew
past their cell once they reached its sides. In dark tones neighbors of
different sizes overlapped into notches and slivers where the dots
joined, and even full black left white specks at the cell corners.

These dots are now clipped to their cell and sized so the clipped dot
covers the tone. Neighbors meet along the shared side, and full tone
fills the whole cell. Light tones, where the dot stays inside its cell,
draw as before.
2026-12-01 04:37:05 -08:00
dotCooCoo 73d0b15605 3D: highlight curved faces' seams; Render Settings for any selected render
- A material's highlight over a curved face now covers the face's seam,
  as the face's clip does, so curved faces no longer show a dark fringe.
  The outline is validated flattened, split at its extrema, with a
  clearance for the flattening error; a face that folds over itself
  keeps its outline alone.
- Render Settings shows while any selected object's 3D effect takes it,
  whatever the selection order and whether the first object has an
  effect.
- Raster Settings OK leaves out values equal to what every object
  already holds (the document's resolution, a shared custom resolution,
  a shared background), so an unchanged OK records no undo step.
- meshes_carry_the_material requires the default-material meshes to
  build and be non-empty.
- docs/mcp.md and the progress-doc line list every case that draws the
  shaded faces instead of the rendered image.
2026-12-01 04:05:26 -08:00
dotCooCoo 72b0bdad60 Tests: Smart Blur checks hand-calculated pixels at radius 2 and 12
The Normal-mode test compares the default output with blurMode=normal,
so a fault both share passes it. Three checks now stand on their own:

- A 6-pixel row at radius 2 checks exact averages that a radius-1
  search gives differently (105 and 115 at the ends instead of 110).
- A step from gray 100 to 200 at radius 12 checks that the pixels next
  to the step read the box-blurred copy at threshold 50 and keep their
  gray at threshold 30, that pixels far from the step keep theirs, and
  that medium quality takes in less of the other gray than low.
- A one-column gray-200 stripe at radius 12 checks that a neighbour
  whose own value is past the threshold stays out even when its
  blurred value is within it.
- A 5 x 5 image at radius 2 checks that a pixel two columns away counts
  and one two columns and two rows away (outside the disc) does not.
- A 7 x 7 image with default settings checks that the default radius
  of 3 reaches a pixel three columns away.
- The radius-1 threshold test gives its last two pixels the same color
  with alpha 255 and 128, so it fails if alpha is left out.
2026-12-01 03:17:36 -08:00
dotCooCoo e14ee70326 Tests: exact expectations for gradients, brush pressure, Smart Blur and effects
Seven render, brush and effects tests accepted results well away from
the value the code is meant to give:

- The two linear gradient tests now expect the value at the pixel
  center (126 of 255, red 126 and blue 129) within 2 levels, instead of
  12 or 20 around 128.
- The trimmed bristle strand test bounds the width ratio on both sides.
- The calligraphic roundness test expects the 0.1 pt hairline within
  1e-6 pt.
- Pucker & Bloat expects the corner anchor at (12.5, 12.5) and
  (-12.5, -12.5), not only the sign of the move.
- Exposure's offset and gamma checks expect the sRGB value within 1e-5.
- Smart Blur's checksums of earlier output are replaced by a 4 pixel row
  whose averages are worked out by hand.

Each new assertion fails when the code it covers is changed (the
gradient stops shifted, the pressure, roundness, pucker, offset or gamma
factor changed, or the blur threshold widened).
2026-12-01 01:53:59 -08:00
dotCooCoo 25f9a53d78 3D: shadow docs and params text say which mode each rule covers
The shaded faces show the first light's shadow, and Render Settings ›
Rendered draws the shadows of every light with an Intensity above 0.
The Shadows table, its notes, the differences list, the effects summary,
docs/mcp.md and the shadow params text of Extrude & Bevel, Revolve,
Inflate and Rotate now say which mode they describe.

A new test checks that PNG export gives the pixels the canvas draws at
export quality, and that the rendered image has as many pixels as the
shaded faces' bounds times the resolution over 72, rounded up as a
raster effect's image is.
2026-11-30 23:00:30 -08:00
dotCooCoo 85ad10feb5 Vector Halftone: Euclidean quadrant uses the shared arc and segment helpers
quadrant() had local closures that repeated ellipse_arc() and segment().
It now calls those helpers, as elliptical_quadrant() does. The geometry
is unchanged.
2026-11-30 22:32:07 -08:00
dotCooCoo 1dbbf87436 Tests: guards check the environment, not the output under test
Several tests returned early when the code under test gave back nothing,
so the regression they guard against passed. Each of those guards now
checks only what the host provides (an installed face, the bundled
fonts), and the output itself is asserted:

- PDF live text: the lam-alef face is no longer picked by whether its
  type imports (#6072); Insert Kashidas asserts the kashida and the
  imported type.
- Effects and Expand Appearance on type assert the outlines and the
  drawn type when the default face is installed.
- The OpenType panel's Stylistic Sets test asserts sets with the
  bundled fonts.
- Thumbnail worker tests assert that the worker starts; the memory
  peak test asserts a reading.
- The json2 test checks the interpreter's Date, replace and RegExp on
  every run, before looking for json2.js.
- Devanagari arrow keys and the Arabic narrow-area wrap assert the
  layout they set up.
2026-11-30 21:56:24 -08:00
dotCooCoo 0a4fcb67ae Vector Halftone: Elliptical dots bridge along their length from 40%
Below 50% the Elliptical dot was an ellipse clipped to the cell's
diamond, so from 40% horizontal neighbors met at a single point and at
50% the dot reached the vertical neighbors too. The dot is now an
ellipse as wide as its cell at 40%; past that it is clipped to the
cell's side, which makes a bridge to the next dot, and to a middle-tone
cut line through the quadrant's center, which keeps the short side
apart until 60%. Areas still match the tone.
2026-11-30 21:27:14 -08:00
dotCooCoo b143f92f3f Vector Halftone: Euclidean and Elliptical dot shapes
Object > Vector Halftone and the live Vector Halftone effect get two
dot shapes that follow the classic spot functions. Euclidean dots are
round in the highlights, meet corner to corner at 50% as a checkerboard
and turn into round holes in the shadows. Elliptical dots are long,
join into chains along their length at 40% and on every side at 60%,
then turn into long holes. Each dot is a vector path whose area is the
cell's tone. The existing Ellipse shape is unchanged.
2026-11-30 20:49:40 -08:00
dotCooCoo 93e67218ba Merge feat/vector-3d-materials into feat/3d-rendered-tier 2026-11-30 20:43:17 -08:00
dotCooCoo 45050b07d9 3D: a later effect that reshapes paths keeps the shaded faces
A rendered Extrude & Bevel, Rotate or Revolve followed by a visible
geometry effect that reshapes paths but not images, such as Pucker &
Bloat or Roughen, now draws and measures the shaded faces so the later
effect still applies, and the status bar reports why. Transform, Warp
and raster effects keep the rendered image.
2026-11-30 20:30:56 -08:00
dotCooCoo 86a036f724 Merge main into feat/vector-3d-materials 2026-11-30 15:37:03 -08:00
dotCooCoo 034c6fbd8d 3D: rendered images take every light's shadows and a Raster Settings dialog
- With Shadows on, every light with an intensity above 0 casts shadows on
  the solid and on the shadow plane in the image, black at 50%, with each
  light's Softness widening its edge; with Shadows off none does.
- Selection, Use Preview Bounds, Align, hit testing and snapping measure
  the shaded faces without rasterizing. Painted bounds hold the whole
  image, measured without rasterizing. Images are cached by their inputs.
- Expand Appearance and baking keep the rendered image; PDF export in a
  CMYK document writes it as raster effects are written.
- Render Settings gains Raster Settings... (resolution and background),
  built on the framework's parameter dialog; settings the selection holds
  differently open blank and are kept. The menu checks a choice only when
  every selected object has it.
- Tests for the clip matrix, coverage, depth order, the shading formula,
  limits, work bounds, edge values, masks and Revolve's objects-only rule.

Docs: docs/three-d.md, docs/mcp.md, effect params text.
2026-11-30 09:40:13 -08:00
dotCooCoo 7aee17deaa Tests: the 3D face-limit and gray-level smoothing tests check the same cases with small inputs
The two Extrude & Bevel tests of the faces an object's solids keep together built members
and strokes from 16,384-corner polygons until they passed MAX_OBJECT_FACES. They took
230 s and 23.5 s on CI. The solids code now reads the limit through object_face_limit(),
which tests can lower on their own thread (OBJECT_FACE_LIMIT), and both tests build
64-corner polygons against a limit of exactly three members' or three strokes' faces. The
limit is now met exactly, so the tests also check that a solid at the limit still draws.
Outside the crate's own tests, object_face_limit() is MAX_OBJECT_FACES.

The smoothing test of every pair of gray levels ran the filter on 262,144 one-pixel-pair
images, and each pass along a column started two threads. It now puts every pair in one
2-pixel-wide image and one 2-pixel-high image, so it checks the same 65,536 pairs in four
passes.
2026-11-30 05:25:15 -08:00