Commit Graph
138 Commits
Author SHA1 Message Date
dotCooCoo 8920f81410 Merge main into feat/3d-graphics-extrude-side 2026-11-17 12:41:57 -08:00
BFlat aab753f4f2 Merge pull request #7819 from dotCooCoo/feat/textures-map-art-and-shading
Export 3D Object: mapped graphics export as textures of their faces
2026-11-18 03:23:34 +07:00
Don Omondi 4881a46f34 Merge remote-tracking branch 'upstream/main' into fix/twist-smooth-7069
# Conflicts:
#	docs/effects-parity.md
#	docs/target-app-parity.md
2026-11-17 08:33:56 -05:00
dotCooCoo 1d082e161e Merge main into feat/3d-graphics-extrude-side 2026-11-15 22:10:50 -08:00
dotCooCoo ea42075eb8 Merge main into feat/3d-soft-shadows 2026-11-15 20:12:19 -08:00
dotCooCoo 5a230be1bc Merge main into feat/3d-graphics-extrude-side 2026-11-15 20:02:35 -08:00
dotCooCoo 7c09d22c97 Merge main into feat/revolve-cut-caps 2026-11-15 17:49:31 -08:00
dotCooCoo 68243f6720 Merge main into feat/3d-graphics-extrude-side 2026-11-15 17:43:44 -08:00
dotCooCoo 0813f69d0d Merge main into feat/3d-soft-shadows 2026-11-15 17:24:39 -08:00
dotCooCoo da21d68d4a Merge main into feat/3d-graphics-extrude-side 2026-11-15 13:43:19 -08:00
dotCooCoo 946dcb5910 Merge main into feat/3d-classic-black-overprint 2026-11-15 13:43:05 -08:00
dotCooCoo e33551614c Merge main into feat/3d-soft-shadows 2026-11-15 13:41:56 -08:00
dotCooCoo 1caffdf463 Merge main into feat/revolve-cut-caps 2026-11-15 11:13:27 -08:00
dotCooCoo 30c83c684f Merge main into feat/textures-map-art-and-shading 2026-11-15 11:05:49 -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
BFlat a505c34ceb Merge pull request #7853 from dotCooCoo/fix/svg-blur-by-direction
SVG import: a blur that differs by direction is kept as its SVG filter
2026-11-16 01:31:37 +07: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 56625d5eab Merge main into feat/3d-graphics-extrude-side 2026-11-15 09:12:02 -08:00
dotCooCoo 79c696d879 Merge main into feat/3d-soft-shadows 2026-11-15 09:08:53 -08:00
dotCooCoo d1613c6f55 Merge main into feat/3d-graphics-extrude-side 2026-11-15 07:59:16 -08:00
dotCooCoo 7d6d9314d0 Merge main into feat/textures-map-art-and-shading 2026-11-15 07:54:36 -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 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 9afdbe2b03 SVG import: a blur that differs by direction is kept as its SVG filter
A feGaussianBlur or feDropShadow whose blur is not the same in every
direction in the document came in as an even Gaussian Blur or Drop
Shadow of the mean standard deviation. That covers two different
standard deviations (stdDeviation="4 1") and an even one in a skewed or
unevenly scaled user space. An SVG Filters effect in such a user space
is exported live under that transform, so on reopening its blur lost
the difference between directions.

Such a filter is now kept as an SVG Filters effect, which draws it as
it is. A blur in a turned, flipped or evenly scaled user space still
becomes the live effect, and a filter that no SVG Filters effect can
keep still comes in as the nearest even effect, as before.
2026-11-15 06:41:20 -08:00
dotCooCoo 4cbd326445 Merge main into feat/3d-classic-track-cube 2026-11-15 06:18:12 -08:00
dotCooCoo 8cc99b9294 Merge main into feat/3d-soft-shadows 2026-11-15 06:17:35 -08:00
BFlat 1387328255 Merge pull request #7731 from dotCooCoo/feat/svg-filter-user-space-matrix
SVG Filters: a filter on a turned or skewed object is kept on import and drawn
2026-11-15 17:30:29 +07:00
dotCooCoo 6a09c034bc Merge main into feat/textures-map-art-and-shading 2026-11-15 01:12:45 -08:00
dotCooCoo c1de98b4fc Merge main into feat/textures-map-art-and-shading 2026-11-15 00:08:17 -08:00
dotCooCoo c17e5395e0 Merge main into feat/3d-graphics-extrude-side 2026-11-14 22:57:20 -08:00
dotCooCoo 0f67bbbddf Merge main into feat/3d-classic-preserve-spot 2026-11-14 22:56:34 -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 de0dc9e3b0 3D and Materials: the shadow is blurred by the first light's Softness
The first light's Softness now softens the shadow of Revolve, Extrude &
Bevel, Inflate and Rotate. At 0% the shadow stays the hard-edged path.
Above it the path carries a Gaussian Blur of radius Softness x the
object's largest size x (5% + 20% x Distance from Object), at most
1,000 pt, VectorCraft's own mapping. The blur draws, counts in the
bounds and exports as a Gaussian Blur effect does, a fill's or stroke's
own 3D effect keeps it below its later effects, and Expand Appearance
turns a blurred shadow into an image.
2026-11-14 22:03:37 -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 74961dd25e Export 3D Object: mapped graphics export as textures of their faces
Graphics mapped onto a plane or onto Extrude & Bevel's front or back cap
now export as a PNG texture of that face: the face's color with its
graphics drawn over it, flat and unlit, on a mesh of the face's own
triangles with texture coordinates.

- glTF embeds the PNG (TEXCOORD_0, baseColorTexture, clamp sampler).
- USDA reads it through primvars:st, UsdPrimvarReader_float2 and a
  UsdUVTexture connected to diffuseColor; USDZ stores the PNG after the
  layer on a 64-byte boundary.
- OBJ writes vt coordinates and an MTL map_Kd.
- OBJ and USDA write <name>-texture-1.png and so on beside them.
- assets.export3D takes textureSize (128 to 4096, default 1024); one
  export draws at most 67,108,864 texture pixels.
- Faces with the same color, graphics and bounds share one texture, and
  output without graphics is unchanged. Graphics on Revolve's side are
  not exported yet.
2026-11-14 20:15:09 -08:00
dotCooCoo b981c987c1 SVG Filters: a filter on a turned or skewed object is kept on import and drawn
An SVG whose filtered element sits under a rotate, skew, uneven scale or
matrix transform now opens with the filter as a live Effect > SVG Filters
effect instead of losing it with a warning.

- The svg.filter effect takes an optional axes [a, b, c, d]: the document
  directions of one unit along the filter's x and y axes, before scale.
  effect.apply and effect.setParams refuse axes with an entry outside
  -1000..1000 or a determinant within 0.001 of 0.
- With axes, the filter runs on a canvas lined up with its user space, so
  offsets, blurs and the region run along the element's axes, and the
  result is drawn back through axes. The canvas holds at most 4 times the
  object's raster pixels. A region measured against the object's box uses
  the object's box in that user space.
- SVG import stores the element's user space as scale, origin and axes.
- SVG export writes such a filter live: a group's transform holds the
  user space, and the art is written in document coordinates in a group
  with the inverse transform, so strokes keep their widths.
2026-11-14 18:09:00 -08:00
dotCooCoo e7dfd70367 3D: graphics map onto Extrude & Bevel's walls and bevels
A graphic's face can be `side` on Extrude & Bevel. The side is unrolled
flat: x runs along the art's own outline, through corners and curves,
clockwise from the top of the outline's middle line, and y runs from
the front edge toward the back, across the bevel steps and the walls.
Twist and taper carry the graphic with the side. Each piece of the side
that faces the viewer draws the part of the graphic that falls on it,
shaded as the piece is, as on Revolve's side.

The graphics go once, on the solid with the longest outline. A hollow
object takes side graphics. The Materials tab offers Side beside Front
and Back, and the blue handle moves a side graphic over the visible
part of the side. Plane and Revolve drop side graphics on a type
change. threeD.mapGraphic fits a new side graphic inside the side
unrolled.
2026-11-14 14:58:58 -08:00
dotCooCoo 0b1e1e99a1 Effects: Effect › SVG Filters lists default filters
Effect › SVG Filters and Apply SVG Filter list 14 default filters in
every document, before the document's own. The set, the names and the
values are VectorCraft's own, written with SVG 1.1 filter primitives
(crates/effects/src/svg_filter/defaults.rs).

A document holds none of the defaults until one is applied or edited
there. svgFilter.apply with a default's name copies it into the document
in the same undo step, and svgFilter.define with replace naming a default
adds the edited copy under that name. The copy is listed in the default's
place. svgFilter.delete refuses a default the document holds no copy of,
and deleting the copy lists the default again.

svgFilter.list also returns the defaults. svgFilter.apply takes index and
item to put the filter in the place of an applied SVG filter, which the
dialog's OK uses when it is opened for an applied effect; an index that
is not an applied SVG filter, null included, is an error.
2026-11-14 11:19:22 -08:00
dotCooCoo 96d5cd78a9 Revolve: overlapping faces draw in the order of their depths where they overlap
Revolve sorted its faces by the depth of each face's middle only, so a
tilted profile with long edges, or a profile of several contours, could
draw a nearer face under a farther one where the two overlap.

- A revolved face carries its view-space plane (none when its corners lie
  off one plane or reach the eye), and Revolve (Classic)'s facets keep it.
- Revolve and Revolve (Classic) put each surface's faces through the local
  depth order Extrude & Bevel uses for its fill and strokes: when two
  overlapping faces are drawn the wrong way round, every pair of
  overlapping faces goes in the order of their depths at the middle of the
  overlap, within the same 4,000,000-comparison limit. A surface already
  in the right order keeps it.
- A group's members, sorted together by depth, go through the same order
  across members.

Docs: docs/revolve.md, docs/effects-parity.md, docs/target-app-parity.md.
2026-11-13 22:32:34 -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
dotCooCoo 1517c81262 3D and Materials: wrap graphics around the side of Revolve objects
The Materials tab and threeD.mapGraphic now map graphics onto
Revolve's swept side, unrolled flat: x runs around the axis (the
angle times the profile's distance from the axis at that point) and
y along the profile. A graphic keeps its size at every distance from
the axis, so it reaches farther around where the profile comes nearer
the axis. Each face of the side draws the part that falls on it: a
graphic narrows toward the silhouette, follows the profile along its
length, is shaded with the surface (several lights included) and is
hidden where the side faces away. A part that runs past the end of
the profile reaches the curved rim and stops there. The middle of the
side faces the viewer with the axis on either edge. On a compound
profile or a group the graphics go on the longest contour.

- three-d: with Revolve::map_surface set, side faces carry a
  SurfaceCell (corners on the page and on the unrolled side, whether
  the outside faces the viewer) and a closed profile off the axis
  takes an anchor where its side is cut; without it the faces are as
  before. revolve_surface_size gives the side's size for a new
  graphic's fit.
- effects: Revolve takes `graphics` (front only); surface_parts cuts
  and maps them per face; curves are cut into straight pieces one at
  a time, and commands refuse graphics past the point limits;
  switching between Extrude, Plane and Revolve keeps the front's
  graphics.
- The Materials tab hides Face for Revolve; params text, docs/mcp.md,
  docs/three-d.md and the progress docs describe the change.
- i18n: the complete-message catalogs translate the three new
  refusals in place of the planar-faces refusal they replace, and ja,
  es, zh-hans and zh-hant translate the Materials tab's label.
2026-11-13 05:06:03 -08:00
Don Omondi 630b36eaa7 Twist: handles follow the rotation's derivative, so its pieces join without kinks (#7069) 2026-11-13 02:19:23 -05:00
Drew Dibble d7d77dd0a5 Merge remote-tracking branch 'upstream/main' into seam-round-joins
# Conflicts:
#	docs/effects-parity.md
#	docs/target-app-parity.md
2026-11-12 17:27:14 -07:00
Drew Dibble 1032fb3979 Round seams: Classic Rotate and Revolve tests, Wireframe edge, docs
- a_faces_seam_stays_within_half_its_width_of_the_face checks Rotate
  (Classic)'s branches too: No Shading keeps its paint, a gradient keeps
  the gradient, and Diffuse shades its plane darker at some view.
- classic_revolves_seams_are_round checks each seam's reach as well as
  its join, and covers a gradient.
- The Wireframe edge takes seam_stroke (the same stroke it built by hand).
- Docs: which seams went from miter to round and which already were;
  the white-light difference from the 2026-10-17 comparison is expected,
  not measured; the 3D area rows record the change; the performance note
  says its measurement predates the Classic Rotate and Revolve paths.
2026-11-12 16:28:51 -07:00