Commit Graph
111 Commits
Author SHA1 Message Date
dotCooCoo 52e959d4be 3D (Classic): Map Art keeps to the limits the art draws within
- When any solid's mapped art passes the shared limits, every solid in
  the effect draws without its mapped art, so Invisible Geometry hides
  all of them or none.
- A revolved group lists its surfaces with the members' shared curve
  sampling, and an extruded group lists none past the faces of one
  object.
- Commands refuse art on walls, bevels and Revolve's side whose curves,
  cut into straight pieces at the map's scale and placed about the
  surface's center, pass 400,000 points. Caps are not counted.
- Each contour's bounds test counts as a cut, in Map Art and in the side
  graphics.
- On a facet whose curved edge bows out of its cell, the art reaches the
  whole facet.
- A bevel as deep as the solid leaves no walls, and its bevels take the
  numbers after the caps.
- Surfaces past the face limit are refused as the side is.
- threeD.mapArt keeps a deleted symbol only while the request leaves
  `symbol` out.
2026-11-18 16:25:43 -08:00
dotCooCoo 19b5ca1869 Merge main into feat/3d-classic-map-art 2026-11-18 01:15:52 -08:00
BFlat 1350204bfd Merge pull request #7706 from dotCooCoo/feat/3d-graphics-extrude-side
3D: graphics map onto Extrude & Bevel's walls and bevels
2026-11-18 13:13:27 +07:00
dotCooCoo ac6a625d52 Merge main into feat/3d-classic-map-art 2026-11-17 22:03:18 -08:00
dotCooCoo 6016f40cf6 Map Art: a wall set out by a bevel is laid out at its own length
The side surfaces were measured along the traced outline, so with a bevel
added around the shape each wall's art was stretched by the bevel's width
at both ends. Walls are now measured on the ring at the walls' inset, and
a bevel band takes the length of the wall below it. Docs: docs/three-d.md,
docs/mcp.md.
2026-11-17 22:03:06 -08:00
BFlat bbf6165fc8 Merge pull request #8206 from dotCooCoo/feat/packaging-fold-preview
Packaging Tools: Fold Preview folds the blank in 3D with the printed art on its panels
2026-11-18 10:30:50 +07:00
dotCooCoo 8920f81410 Merge main into feat/3d-graphics-extrude-side 2026-11-17 12:41:57 -08:00
dotCooCoo 848633a629 Merge main into feat/3d-classic-map-art 2026-11-17 12:37:23 -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
dotCooCoo 0b87940421 Packaging Tools: Fold Preview halves the print down to one pixel and reads #-named swatches
The print raster stopped after two halvings, so a 2,048-pixel print seen
far out sampled a 512-pixel level and fine art aliased. It is now halved
down to one pixel, and each halving weighs an odd last row or column by
the part of the print it covers, so an edge color does not spread across
a small level.

A swatch whose name starts with # could not be the inside color, and one
named like a hex color drew that hex color. The inside is now looked up
as a swatch first and read as #rrggbb only when no swatch with a plain
color has that name.
2026-11-16 12:26:28 -08:00
dotCooCoo d00e3b6ecd Packaging Tools: Fold Preview picks the print level by a pixel's longer side and draws the board opaque
A print tipped away from the view shrinks up and down but not across, so
the level of the print raster is now chosen by the longer of a pixel's
two sides in flat terms, not its width alone, and fine print lines no
longer alias when the view is tipped.

The board's inside and outside colors were premultiplied by their alpha
and then drawn with full alpha, so a see-through color drew darker
instead. The depth buffer treats every panel as opaque, so the board is
now drawn opaque in its colors' RGB and their alpha is not used.

The tray test now checks that each wall's print faces away from the base
on its own side and that the walls fold below the base.
2026-11-16 12:26:28 -08:00
dotCooCoo 6076b01b1c Merge main into feat/3d-graphics-extrude-side 2026-11-16 10:34:59 -08:00
dotCooCoo 4911e102b1 Packaging Tools: Fold Preview folds the blank in 3D with the printed art on its panels
Fold Preview (Object › Plug-ins › Packaging Tools, and the Fold Lines panel's button) shows the
document's blank folded about its largest panel, or the panel double-clicked. Creases and
perforations fold 90° away from the printed side and partial cuts 90° toward it. Each panel
samples a raster of the print, with the fold lines and non-printing layers left out, through its
projective map, with a depth buffer; the back shows the board's inside color. The window has a
Fold slider, seven view presets, orbit, zoom, pan and perspective, and its status line reports a
joint that does not close and panels that pass through each other.

- addon.packaging.fold returns each panel's frame, the hinges with their angle and gap, and the
  collisions. A closing hinge's gap is measured with every hinge folded all the way.
- ui.foldPreview sets the window and rejects values of the wrong kind or out of range; saved
  settings out of range are brought into range.
- The print renders off the UI thread where a worker exists and once per document revision. The
  fold and the view image are worked out again only when the document, the settings or the
  window's size change.
2026-11-16 10:20:36 -08:00
dotCooCoo 9e76750a96 Merge main into feat/3d-classic-map-art 2026-11-16 08:27:46 -08:00
dotCooCoo f54a3faa39 Packaging Tools: Check Fold Lines reports overshooting and stacked fold lines
- A crease that runs past the cut outline by the tolerance or more is
  reported as outside, though its hinge is still built.
- Two lines that fold, of any role, on top of each other are reported as
  duplicate; a line drawn twice is still checked for where it lies.
- Hidden lines are left out in every scope, members of a selected group
  included.
- The ids scope gets its own noCut message.
- The notStraight, ambiguous and summary texts say what the check finds:
  the summary counts hinges, not creases.
- The fold angle fields, which nothing in this change reads, are removed.
- A window drawn as open cut lines stays a hole when a cut line crosses
  it or when slits join it to an outline of open lines, so that three
  lines meet at a corner. Cut lines drawn whole that cross a cell leave
  it material.
- A slot drawn across the outline is a notch, not a hole, as when the
  notch is drawn in the outline; a crease in it lies outside the blank.
- notStraight measures each hinge piece at its farthest point from the
  hinge line instead of at five samples.
- Cut lines drawn on top of each other so many times that the gap search
  would look at more than 16,777,216 pairs are reported as tooComplex
  before the search.
2026-11-16 04:10:41 -08:00
dotCooCoo 532d2ea6d7 Packaging Tools: Check Fold Lines finds the panels and hinges of a blank and lists what is wrong
Object › Plug-ins › Packaging Tools › Check Fold Lines, and the Fold Lines
panel's Check button, check the fold lines of the selection, or of the
document while nothing is selected (`addon.packaging.check`).

- Cut lines bound the material: each connected piece that encloses an
  area is one blank, its largest closed cut line is the outline, and a
  closed cut line inside it is a hole. A slot drawn as a rectangle across
  the outline leaves the same material as a notch drawn in it, and an
  outline drawn as several open cut lines works too.
- Creases, partial cuts and perforations divide a blank into panels; the
  pieces between the same two panels form one hinge.
- 15 issue codes, errors and warnings, each naming its lines; cut line
  ends within a tolerance (0.1 pt, 0.01 to 10) are joined and reported as
  a gap. With `select`, the lines the issues name are selected.
- The panel lists the issues in the interface language, with a summary
  line; clicking an issue or its Select button selects its lines. The
  list is kept until the document changes.

`vectorcraft_pathops::adjacency` maps paths as live_paint does and keeps,
for each edge, every input it lies on and the faces on both sides; the
blank model is `vectorcraft_three_d::fold::blanks`. The engine now depends
on vectorcraft-three-d directly.

Docs: docs/mcp.md (Check Fold Lines), crates/pathops/README.md, ROADMAP.
2026-11-16 01:47:15 -08:00
dotCooCoo 1d082e161e Merge main into feat/3d-graphics-extrude-side 2026-11-15 22:10:50 -08:00
dotCooCoo 6e80aa6fc2 Merge main into feat/3d-classic-map-art 2026-11-15 22:08:30 -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 5dea503631 Merge main into feat/3d-classic-map-art 2026-11-15 19:42:25 -08:00
dotCooCoo a191b0dae5 Revolve: closed subpaths close the cut sides with what the fill rule fills
The closed subpaths of a profile now close a partial sweep's cut sides
together, with the area the object's fill rule fills, instead of one
region per subpath marked as a hole by most of its edges. Two closed
subpaths that overlap with only a corner inside each other no longer
fill their overlap under the even-odd rule, and under the nonzero rule
the overlap is filled once.

The cut-side regions are taken after the profile gets the anchor where
a mapped side is cut, so the cut sides kept for a mesh have a corner at
every corner of the edge they share with the side.
2026-11-15 12:20:09 -08:00
dotCooCoo 0633645f24 Revolve: a cut side whose holes cannot be found within the limit is refused
When the search for holes in a partial sweep's cut sides passes its work
limit, Revolve now reports the profile as too complex instead of closing
the cut sides with every hole filled.
2026-11-15 11:13:18 -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 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 a46dc5df37 3D: a cap far from the page origin takes no bevel treads for its textures
The mesh face measured mesh points from where art point (0, 0) lands, and
scaled its plane tolerance by that distance. For art about 10 million
points from the page origin the tolerance grew to tens of points, so the
cap-parallel treads of a Step bevel took the cap's mapped graphics.

The face now measures mesh points from the art's center, and the
tolerance follows the solid's size only.
2026-11-15 06:35:32 -08:00
dotCooCoo 55fd56acf4 Merge main into feat/3d-classic-map-art 2026-11-15 06:25:08 -08:00
dotCooCoo 8cc99b9294 Merge main into feat/3d-soft-shadows 2026-11-15 06:17:35 -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 a5493a1cd0 Paths: editing one anchor of a long path keeps one chunk of anchors for undo
A subpath's anchors are now an `Anchors` list held in chunks of up to
256 anchors behind `Arc`s. Copying a path copies the chunk table and
shares the chunks, and editing one anchor copies only the chunk that
holds it, so the undo step of a one-anchor edit no longer keeps a copy
of every anchor of the path. Inserting or removing an anchor copies the
chunk it is in and rebuilds the table. Reads and edits follow the Vec
and slice methods the code used; files write and read each subpath's
anchors as one list, as before, within the same anchor read budget.

The undo memory estimate counts only the chunks the other version of
the path does not hold, and the renderer's kept paths compare only the
chunks an edit copied when they look for moved anchors.

Moving one anchor of an open path of 10,000 or 200,000 anchors
(path.moveAnchor, path.setHandle, path.moveAnchors, a nudge) keeps at
most 48 KiB in its undo and redo steps, where it kept 56 bytes per
anchor.
2026-11-14 21:25:15 -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 31315c8752 Merge main into feat/3d-graphics-extrude-side 2026-11-14 15:45:44 -08:00
dotCooCoo 0a8281cfa8 Merge main into feat/3d-classic-map-art
# Conflicts:
#	crates/effects/src/revolve.rs
#	crates/effects/src/solids.rs
#	crates/three-d/src/solid/build.rs
2026-11-14 15:29:33 -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 91d424cf4d Merge main into feat/3d-classic-map-art 2026-11-14 10:35:05 -08:00
dotCooCoo b2b775b26f 3D (Classic): Map Art maps symbols onto Extrude & Bevel and Revolve surfaces
Extrude & Bevel (Classic) and Revolve (Classic) get a Map Art… button on
their Object tab. Map Art picks a numbered surface (first, previous,
next, last, a number field and the count, with a visible or hidden mark
and a red outline on the artboard while Preview is on), maps one
document symbol onto it, and moves, scales and rotates the art on the
surface laid out flat. Scale to Fit, Clear, Clear All, Shade Artwork and
Invisible Geometry work on the maps. Rotate (Classic) takes none.

The maps are the effects' mapArt, mapShade and mapInvisible parameters.
They are drawn on the canvas, in exports and by Expand Appearance, a map
past the surface count is ignored, renaming a symbol renames it in the
maps, copying an object brings their symbols, and Select All Unused
counts them as used. threeD.mapArt sets, edits or removes a surface's
map and refuses bad surfaces, unknown symbols and out-of-range values,
with no undo step when nothing changes.

Docs: docs/mcp.md, docs/three-d.md, docs/effects-parity.md.
2026-11-14 10:30:57 -08:00
dotCooCoo a3ba3eeb38 Merge main into fix/3d-shadow-builds-once 2026-11-14 09:52:39 -08: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 69ec28dc4c Merge main into fix/3d-shadow-builds-once 2026-11-14 07:28:03 -08:00
dotCooCoo 0c1858f91e Merge main into fix/inflate-lazy-puffs 2026-11-14 05:11:29 -08:00
dotCooCoo bd672151fa Merge main into fix/issue-7525 2026-11-14 05:02:54 -08:00
dotCooCoo c482037570 Merge main into fix/3d-shadow-builds-once 2026-11-14 04:57:13 -08:00
BFlat 67f432c965 Merge pull request #7502 from dotCooCoo/fix/revolve-local-depth-order
Revolve: overlapping faces draw in the order of their depths where they overlap
2026-11-14 19:37:37 +07:00
dotCooCoo 36bccf0f34 3D: Inflate with no volume copies only shapes that might fit its limits
With no volume, each shape waits to be solved until its solid is taken,
so its path is copied first. A shape with more contours or anchors than
the solid's point limit allows is now refused before it is copied, with
the error solving it would give, instead of being copied in full. The
check counts each contour's anchors without reading them.
2026-11-14 03:24:40 -08:00
dotCooCoo 6cc43c1d24 Merge main into fix/3d-shadow-builds-once 2026-11-14 03:21:37 -08:00
dotCooCoo f2ba375478 Merge main into fix/inflate-lazy-puffs
# Conflicts:
#	crates/three-d/src/shadow.rs
#	crates/three-d/src/solid/inflate.rs
2026-11-14 03:15:53 -08: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 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