Commit Graph
112 Commits
Author SHA1 Message Date
BFlat 89c3a9c4ec Merge pull request #7946 from dotCooCoo/feat/revolve-cut-caps
Revolve: a partial sweep with Cap closes its cut sides
2026-11-16 10:35:40 +07:00
BFlat 3c9249279d Merge pull request #8003 from dotCooCoo/fix/inflate-colored-light-seam-fill
3D: colored Inflate fills each facet and its seam as one path, covering each edge pixel once
2026-11-16 09:31:14 +07:00
dotCooCoo 7c09d22c97 Merge main into feat/revolve-cut-caps 2026-11-15 17:49:31 -08:00
BFlat abb4af9b87 Merge pull request #7965 from dotCooCoo/fix/export-3d-object-skips-flat-art
3D and Materials: Export 3D Object leaves objects without a 3D effect out in the command
2026-11-16 08:13:27 +07:00
BFlat 2f255f5f99 Merge pull request #7871 from dotCooCoo/feat/3d-classic-black-overprint
3D (Classic): the Black Overprint shading color shades with overprinting black over the fill
2026-11-16 08:13:18 +07:00
BFlat 98a1d0839d Merge pull request #7997 from dotCooCoo/fix/revolve-colored-light-faces-sealed
3D: Revolve's colored-light faces lie over an underlay, so no alpha holes show at 1:1
2026-11-16 08:13:02 +07:00
BFlat 385ad36761 Merge pull request #7883 from dotCooCoo/feat/3d-bevel-reset
3D and Materials: the Bevel section's Reset restores only the bevel settings
2026-11-16 06:55:08 +07:00
dotCooCoo d22668e094 3D: colored Inflate fills each facet and its seam as one path, so face edges match supersampling
Under colored lights, a solid-color Inflate surface drew each facet over
its underlay as a fill and then a same-color round seam stroke. At a
partly covered edge pixel the two coverages add up past the facet's real
coverage, so a turned Inflate's near facets bled into the facets behind
them by up to 5 levels against the same art drawn at 3x and averaged down.

- lighting::seamed_fill turns a facet that is one closed polygon with an
  area and no crossing edges into one path: the facet and the outer
  outline of its round seam (lighting::footprint). solid_surface fills
  that path once per channel. Other facets keep a fill and a seam stroke.
  The 2 pt underlay, the surface clip and the channel groups are as
  before.
- three_d_light_color::turned_colored_inflate_facets_and_seams_cover_their_edges_once
  checks Inflate at X 50, Y 35 in an opaque fill: at most one channel
  sample more than 3 levels off, by at most 4, and no alpha off.
- docs/three-d.md (Seams) and docs/target-app-parity.md describe it.
2026-11-15 15:47:13 -08:00
dotCooCoo b5c7b60cb8 3D: Revolve's colored-light faces lie over an underlay, so no alpha holes show at 1:1
Under a colored lightColor or a lights list, Revolve drew each face of a
solid-color or gradient surface on its own, so where two faces'
antialiased edges met, pixels inside the surface let the background
through at 1:1.

- The faces now lie over an underlay of themselves under one clip to
  their outline, as colored Inflate's facets do (lighting::sealed, split
  into lighting::underlay and sealed). The surface's opacity and blending
  mode apply once, to the sealed surface.
- In a group, each run of one member's faces in the shared depth order
  takes its own underlay; a translucent member's run keeps its opacity,
  blending mode and mask on the sealed run.
- A face with a part of a mapped graphic gives its face to the underlay
  and keeps the part right after it.
- Faces in a gradient with transparent stops carry its opacity mask and
  are drawn as before. Revolve (Classic) is unchanged.
- The paint-copy budget counts the underlay in validation and drawing.

Docs: docs/three-d.md (Seams), docs/target-app-parity.md.
2026-11-15 15:13:03 -08:00
dotCooCoo 946dcb5910 Merge main into feat/3d-classic-black-overprint 2026-11-15 13:43:05 -08:00
BFlat 6b2e71f999 Merge pull request #7912 from dotCooCoo/fix/3d-transparent-gradient-one-placement
3D: a transparent gradient lines up its colors and transparency across the faces
2026-11-16 04:31:27 +07:00
dotCooCoo f3c297ddea 3D and Materials: Export 3D Object leaves objects without a 3D effect out in the command
The panel's Export 3D Object button chose the objects to export in panel
code and passed their ids to assets.add3D, which on the same selection
refused every object when one had no 3D effect. Passing ids also skipped
the refusal while a part of a dynamic symbol instance's art is selected,
and a group whose 3D effect is on its fill or stroke enabled the button
and then failed.

assets.add3D without ids now leaves out the selected objects without a
3D effect it exports, a group or layer whose 3D effect is on a fill or
stroke, and an object inside another selected 3D object; a path of a
compound path counts as the compound path. Objects given in ids are
still refused. exports_three_d in vectorcraft-effects tells whether an
object has such an effect without building its meshes. The button runs
the command on the selection and is available only while a selected
object passes that check.
2026-11-15 12:38:13 -08:00
dotCooCoo 1caffdf463 Merge main into feat/revolve-cut-caps 2026-11-15 11:13:27 -08:00
dotCooCoo 8c54726fd4 Merge main into feat/3d-classic-light-sphere 2026-11-15 11:01:12 -08:00
BFlat a1ec9d7e84 Merge pull request #7852 from dotCooCoo/feat/3d-panel-export-3d-object
3D and Materials: Export 3D Object adds the selection to Asset Export
2026-11-16 01:33:09 +07:00
dotCooCoo 402b62b20d 3D: a transparent gradient lines up its colors and transparency across the faces
Follows #7338. Under colored lights, and under the classic effects'
shading, a gradient with transparent stops is drawn opaque on each face
under one opacity mask of its transparency. A gradient without a
placement of its own fitted its colors to each face's bounds, while the
mask fitted the whole solid, so the color and transparency ramps did not
line up and the colors started over on each face. Such a gradient is now
placed once on all of the solid's faces, grown by 1 pt, before it is
split into colors and mask. Opaque gradients and placed gradients are
drawn as before.
2026-11-15 10:18:36 -08:00
dotCooCoo 71a474450d Merge main into feat/3d-classic-black-overprint 2026-11-15 09:34:04 -08:00
dotCooCoo 9255edc3d8 Merge main into feat/3d-classic-light-sphere 2026-11-15 09:29:07 -08:00
dotCooCoo bf2a90ed90 Merge main into feat/3d-bevel-reset 2026-11-15 09:28:38 -08:00
BFlat 5bd8acfce9 Merge pull request #7762 from dotCooCoo/feat/3d-classic-track-cube
3D (Classic): the track cube turns the object on the Rotation tab
2026-11-16 00:04:07 +07:00
dotCooCoo 4f09041edc 3D and Materials: the Bevel section's Reset restores only the bevel settings
A Reset button next to Extrude & Bevel's Bevel heading, on the Object
tab of the options dialog and of the 3D and Materials panel, sets Bevel
Shape, Width, Height, Repeat, Space, Bevel Inside and Bevel both sides
back to their defaults. Depth, Twist, Taper, Cap, the rotation, the
lights and the graphics keep their values. In the panel the reset goes
to each selected Extrude & Bevel as one undo step. The button is
unavailable while every bevel setting is at its default, and a setting
the selected effects hold with different values counts as changed.
2026-11-15 08:31:47 -08:00
dotCooCoo a230ea470d 3D (Classic): the Black Overprint shading color shades with overprinting black over the fill
Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic) take
shadingColor blackOverprint. Each face keeps its paint unchanged, and a
face that darkens gets black over it, as strong as the darkening of the
shading color Black: a fill multiplied and overprinting, and a seam
stroke overprinting with Darken. The black is on the black plate in
Separations Preview and is written to PDF as overprinting fills. The
Plastic highlight is not drawn with it.

Preserve Spot Colors draws its black with the same helper, so its seam
stroke no longer multiplies the black a second time along face edges.

The dialogs list the choice, with catalog rows next to Shading Color.
Params text, docs/mcp.md, docs/three-d.md and docs/effects-parity.md
describe it.
2026-11-15 07:31:15 -08:00
dotCooCoo 817f258d9d Merge main into feat/revolve-cut-caps 2026-11-15 07:29:26 -08:00
dotCooCoo 9e88bfe698 Revolve: a partial sweep with Cap closes its cut sides
With an Angle below 360 and Cap on, Revolve and Revolve (Classic) now
close the two angular cut sides instead of leaving them open. Each side
is flat and evenly shaded and is drawn in depth order with the rest of
the surface: the region between each open subpath and the axis, and the
area of each closed subpath, one face per region. A subpath that walls
a hole under the object's fill rule leaves the hole open, and a
self-intersecting subpath fills what the nonzero rule fills. The cut
sides appear in preview, SVG/PDF export, Expand Appearance, Expand as
Wireframes, shadows and exported 3D meshes. Cap off keeps the surface
hollow.

Painter visibility now looks for covers over every piece of a face, so
a face drawn as several contours is trimmed where any of them is
covered.

Docs: docs/revolve.md, docs/three-d.md, docs/mcp.md, the
effects-parity row, the Cap tooltip and its catalog rows.
2026-11-15 07:09:57 -08:00
dotCooCoo d1213a923e Merge branch 'feat/3d-classic-track-cube' into feat/3d-classic-track-cube 2026-11-15 06:56:42 -08:00
dotCooCoo 6d87660fd0 3D (Classic): the lighting sphere moves, adds and deletes lights on the Lighting tab
The Lighting tab of Extrude & Bevel (Classic), Revolve (Classic) and
Rotate (Classic) now shows the lighting sphere, in the 3D and Materials
panel and in the options dialog, while the surface is Diffuse or
Plastic. A light drags to a new Rotation and Height, a press selects
it, and the button below the sphere moves it behind or in front of the
object. Add Light places a new light at the front center and Delete
Light keeps at least one light. The classic effects shade without light
color, so their suns are drawn white.
2026-11-15 06:55:20 -08:00
dotCooCoo 6523a33224 3D and Materials: Export 3D Object adds the selection to Asset Export
The 3D and Materials panel gets an Export 3D Object button. It adds the
selected objects that have a visible 3D effect to Asset Export as 3D
assets through assets.add3D, the command behind Asset Export's own
Export 3D Object, selects their assets there and shows the Asset Export
panel. Objects without a 3D effect, and a 3D object inside another
selected one, are left out. The button is unavailable while no selected
object has a visible 3D effect. Adding is one undo step, and nothing is
recorded when every object is an asset already.

Docs: docs/three-d.md, docs/mcp.md, docs/effects-parity.md,
docs/target-app-parity.md.
2026-11-15 06:41:48 -08:00
dotCooCoo 4cbd326445 Merge main into feat/3d-classic-track-cube 2026-11-15 06:18:12 -08:00
dotCooCoo 765dead1da Merge main into fix/shadow-validation-builds-its-shadow-geometry 2026-11-15 01:42:03 -08:00
dotCooCoo 0f67bbbddf Merge main into feat/3d-classic-preserve-spot 2026-11-14 22:56:34 -08:00
BFlat 941277aa38 Merge pull request #7747 from dotCooCoo/feat/3d-render-wireframe
3D and Materials: Render Settings › Wireframe draws the live 3D effect as its faces' edges
2026-11-15 13:50:13 +07:00
dotCooCoo b306b73fb6 3D (Classic): the track cube docs cite the documented face and edge colors
The face colors and the red, green and blue axis edges come from the cited
help page, so docs/three-d.md lists them there and no longer calls them
VectorCraft's own. The drag speed, Escape and the keyboard steps stay
VectorCraft's own.
2026-11-14 22:24:51 -08:00
dotCooCoo 996fd9e50e 3D (Classic): the track cube turns the object on the Rotation tab
Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic) get a
track cube below the Position presets, drawn at the current X, Y and Z
rotation inside a ring. Dragging a face turns the object freely, Shift
keeps the drag to the screen's horizontal or vertical axis, an edge turns
it about the object axis it runs along, and the ring turns it in the
screen plane. Escape during a drag puts the angles back. With the
keyboard focus, the arrow keys and Page Up/Down turn it 1° a press (15°
with Shift). The cube writes the existing rotationX, rotationY and
rotationZ, so the fields and presets follow it and OK records one undo
step. It is off while the panel's selected effects hold different
rotations.
2026-11-14 22:05:41 -08:00
dotCooCoo b8d4780611 3D (Classic): Preserve Spot Colors keeps spot inks in shaded faces
Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic) take a
preserveSpotColors param and a Preserve Spot Colors checkbox on the
Lighting tab. When it is on, a fill or stroke linked to a spot or global
swatch stays linked on every face: the highlight lowers the swatch's
tint, and a face that darkens gets black over it, multiplied and
overprinting, so a spot color keeps its own plate in separations and PDF.
The checkbox is unavailable while Shading Color is Custom, and the param
does nothing then. With the option off, the faces draw as before. A
value that is not true or false is refused.
2026-11-14 21:43:44 -08:00
dotCooCoo 27a0dc89d4 3D and Materials: Render Settings › Wireframe draws the live 3D effect as its faces' edges
The 3D and Materials panel gets a Render Settings menu with Wireframe.
Extrude & Bevel, Revolve, Inflate and Rotate take a `render` parameter,
`{mode: "shaded" | "wireframe"}`. In wireframe mode the effect stays
live and draws the edges Expand as Wireframes gives, each once, as
0.5 pt black strokes with round joins, with no shadow or graphics. The
object's own opacity, blending mode and opacity mask apply to the mesh.

Commands that set wireframe mode are checked against the edges it
draws: the shaded surface's paint copies, graphics and shadow limits do
not refuse them. A `render` value that is not an object holding only a
valid `mode`, and `render` on the 3D (Classic) effects, are refused.

Docs: docs/three-d.md, docs/mcp.md, docs/effects-parity.md,
docs/target-app-parity.md.
2026-11-14 21:04:33 -08:00
dotCooCoo 0939157d12 3D and Materials: the Lighting tab's widget moves lights around the object
The panel's Lighting tab shows a sphere above the list of lights with
every light of the selected 3D effect at its Rotation and Height, filled
in front of the object and hollow behind it. Dragging a light moves it
on its side of the object, previewed while the pointer is down and one
undo step on release; a press selects it in the list. Move Light to Back
and Move Light to Front change the selected light's side. Each light
takes the keyboard focus, where the arrow keys move it (Shift steps
15 degrees), and screen readers name it with its settings. The widget
sends effect.setParams like the light settings below it.
2026-11-14 17:37:56 -08:00
dotCooCoo dcdd871a4d 3D: shadow validation casts from the solids it checks
With Shadows on, the check a command runs for Extrude & Bevel, Inflate
and Rotate built every solid a second time to check its shadow. It now
casts the shadow from the faces kept by the builds that check the solids,
as drawing does, so each solid is built once.

A stroke whose solid is left out of the art past its own limits no
longer gets a solid built for the shadow alone: it casts nothing, as it
draws nothing.
2026-11-14 16:42:47 -08:00
dotCooCoo 7e390fe079 Merge main into fix/3d-masked-cap-graphic-once 2026-11-14 09:55:12 -08:00
BFlat d0b37826c0 Merge pull request #7338 from dotCooCoo/fix/colored-light-seams
3D: colored-light facets close their shared edges over an underlay
2026-11-15 00:40:19 +07:00
BFlat 23accce757 Merge pull request #7467 from dotCooCoo/fix/inflate-lazy-puffs
3D: Inflate with no volume solves each puff only when its solid is taken
2026-11-15 00:39:20 +07:00
dotCooCoo cdbd079ee9 Fix #7525: Extrude & Bevel cuts sharp corners square instead of spiking
An inset ring limited a corner's miter by moving the corner four times
the bevel width along its bisector. At a corner sharper than about 29°
that the bevel opens (a convex corner with the bevel outside, a notch
with it inside), the bevel still ran out to a spike up to four times
the width and no longer lined up with the art. With the bevel outside,
the wall behind it spiked the same way.

Such a corner is now given twice in the outline before the solid is
built, and each copy moves along its own edge's normal, so the bevel
(and, with the bevel outside, the wall) cuts the corner square, as a
bevel join cuts a stroke. Corners within the limit keep their miters,
and corners where the inset edges meet keep the four-times limit.

A cap's outline skips the straight segment of no length between the
two copies where they do not move apart.

Docs: docs/three-d.md, docs/target-app-parity.md.
2026-11-14 03:10:33 -08:00
dotCooCoo b46a1ebe5b 3D: a gradient fill with transparent stops and its stroke draw their graphic once
Under a colored light, a fill in a gradient with transparent stops carries
an opacity mask, and a graphic mapped onto Extrude & Bevel's cap or onto a
Plane was placed twice: once on the fill's cap with the mask and again on
the stroke's cap. The fill and stroke now share one graphic when they have
the same opacity and blending mode, as they do without the mask. It is
drawn after the last of their faces on that cap and takes the mask of the
surface it is drawn after, so an opaque stroke leaves it unmasked. A
masked fill without a stroke keeps its masked graphic, and members of a
3D group drawn with a mask keep graphics of their own. Unmasked fills and
strokes alone draw as before.
2026-11-14 02:10:11 -08:00
dotCooCoo d64ba43e50 3D: Inflate with no volume solves each puff only when its solid is taken
At a Volume of 0 % no shape puffs, so the eye does not depend on the
other shapes. Each shape's membrane is now solved as its solid is taken,
and a caller that stops at the object's face limit solves none of the
shapes after it. With any volume every puff is still solved first, since
the highest one places the eye, and the solids are unchanged bit for bit.

The shadow no longer builds the solid of a fully transparent fill or
stroke: its puff still places the eye, and at 0 % volume it is not
solved either.
2026-11-13 21:17:21 -08:00
dotCooCoo d47cbe5f77 3D: colored-light faces keep unplaced gradients fitted to the face
The color cover of a composed face grew past the underlay's seam, and a
source gradient without a placement fitted itself to that larger
rectangle. The face now pins such a gradient to its bounds grown by
1 pt, as before the cover grew. docs/three-d.md states the measured
limits of the 1:1 comparison.
2026-11-13 20:06:12 -08:00
dotCooCoo 269ca40954 Merge main into fix/colored-light-seams 2026-11-13 17:00:43 -08:00
dotCooCoo 5b4e613d0b 3D: colored-light facets close their shared edges over an underlay
Under a colored light, Inflate's facets were antialiased one by one.
Where two facets met, their edge pixels added up to less than full
coverage. The solid-color composite then showed its black channel
backdrop there, so internal edges drew darker at 1:1, and the per-facet
gradient art let the background through.

- The solid-color composite draws, in each channel, an underlay of the
  facets with 2 pt round seams between the black backdrop and the
  facets themselves.
- The per-facet routes put each run of consecutive faces of one surface
  over an underlay of its own faces, clipped to the union of the faces
  and their seams. Runs that carry a gradient's opacity mask are sealed
  with that mask. A face clip's footprint keeps only the outer contours
  of its seam stroke.
- The paint-copy allowance for cut faces counts 12 copies per facet.

At 1:1, inside the surface each color channel of an opaque fill is
within 3 levels of the same art drawn at 3x and averaged down, and
every pixel is opaque. Before, 2,267 channels differed by up to 10
levels on the solid Inflate, and 1,088 pixels of the gradient Inflate
were below full alpha. Under white light, the rendered pixels, the SVG
text, the PDF read back and the expanded art of Inflate, Extrude,
Rotate and Revolve are the same as before.

Docs: docs/three-d.md (Seams), docs/target-app-parity.md.
2026-11-13 16:03:37 -08:00
dotCooCoo 9d3717b0c0 Merge main into fix/colored-solid-faces-one-order-limit 2026-11-13 15:16:25 -08:00
Drew Dibble abb1e0d820 Merge remote-tracking branch 'upstream/main' into taper-one-face
# Conflicts:
#	crates/three-d/src/solid/tests.rs
#	docs/target-app-parity.md
#	docs/three-d.md
2026-11-13 13:38:40 -07:00
dotCooCoo 1fa71e2ab1 3D: solid-color fills and strokes under colored lights draw their faces in one depth order
Under a light that is not white, an opaque Inflate fill or stroke in a
solid color was drawn as one composite of all its facets, so the
object's solids were drawn whole, one after another: the stroke's faces
covered every face of the fill, nearer or not.

When an object's solids share one order (all opaque with Normal
blending, or one member's under its opacity mask), each facet of such a
solid is now drawn on its own, with the composite's paint, channel
light ramps and seam width, and takes its place in that order as the
faces of a gradient already do. A lone solid, and the solids of an
object with a translucent or blended fill or stroke, keep the one
composite.

A face drawn on its own is about 16 nodes, against about 6 per facet
in the composite of a whole surface. These faces go in one order while
they number at most 30,720 together, counted again after the cuts.
Past that, each such solid is drawn as one composite.

Docs: docs/three-d.md, docs/target-app-parity.md.
2026-11-13 12:34:42 -08:00
Drew Dibble 09d5522785 Merge remote-tracking branch 'upstream/main' into seam-round-joins
# Conflicts:
#	docs/effects-parity.md
#	docs/gaps.md
#	docs/target-app-parity.md
2026-11-13 12:29:58 -07:00