Skip to content

3D: Expand as Wireframes measures later effects with the cast shadow - #7432

Merged
bflatastic merged 6 commits into
storytold:mainfrom
dotCooCoo:fix/wireframe-transform-measures-shadow
Nov 14, 2026
Merged

bflatastic merged 6 commits into
storytold:mainfrom
dotCooCoo:fix/wireframe-transform-measures-shadow

Conversation

@dotCooCoo

@dotCooCoo dotCooCoo commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

What and why

A geometry effect after an object's 3D effect, such as a Transform that scales or rotates about the center, measures the drawn art, and that art includes the cast shadow. Expand as Wireframes measured the faces alone, so with the shadow on, the expanded edges landed away from the surfaces drawn on the canvas.

The wireframe now reshapes the faces together with the shadow the canvas draws behind them, then keeps only the faces. This covers Extrude & Bevel, Inflate, Rotate and Revolve on an object, group or layer. A 3D effect on a fill or stroke is unchanged, since its later effects apply to its surfaces on their own on the canvas too.

How it was tested

  • New test solids::wireframe::tests::a_later_transform_measures_the_faces_with_their_shadow: Extrude & Bevel and Revolve with the shadow on and a 50% Transform after them. The wireframe's bounds match the canvas surfaces after the same Transform. It fails without the fix for both effects (the edges are off by about 48 pt and 75 pt).
  • cargo test -p vectorcraft-effects on 62604c38bd: 761 passed, 2 ignored; envelope_ink 1 passed.
  • cargo clippy -p vectorcraft-effects --all-targets -- -D warnings on 62604c38bd: clean.
  • cargo fmt --all -- --check on 62604c38bd: no diff.

Checklist

  • cargo xtask ci passes (fmt, clippy, tests, assets, brands, layers, wasm).
  • No panics in shipped code: no unwrap(), expect(), panic!, unreachable!, todo! or
    unimplemented! outside tests, and no unchecked indexing on data from files, parameters or
    messages. Errors are returned as Result and shown to the user
    (why and how).
  • Clean-room: nothing copied from Adobe products or GPL/AGPL code (AGENTS.md).
  • Every new asset has a row in ASSETS.md.

A geometry effect after an object's 3D effect, such as a Transform that
scales or rotates about the center, measures the drawn art, cast shadow
included. Expand as Wireframes measured the faces alone, so with a
shadow on, the expanded edges landed away from the surfaces on the
canvas. The faces are now reshaped together with the shadow the canvas
draws behind them (Extrude & Bevel, Inflate, Rotate and Revolve, on an
object, group or layer), and only the faces are kept.
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 26 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 460d211 and 1418c5a.

Files selected for processing: 4

  • crates/effects/src/revolve.rs
  • crates/effects/src/solids.rs
  • crates/effects/src/solids/wireframe.rs
  • crates/effects/src/solids/wireframe/tests.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@bflatastic
bflatastic merged commit 2986979 into storytold:main Nov 14, 2026
7 checks passed
@bflatastic

Copy link
Copy Markdown
Member

Merged, thanks @dotCooCoo! It passed its CI checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants