3D: twisted bevel pieces meet the inset cap at sharp joins

A twist cut a beveled edge at points of the art's curve itself, while the
inset cap's edge eases its corners' miter offsets across the whole edge.
Where the art meets another edge at a sharp angle, the pieces next to the
cap drew a different curve from the cap's, leaving a gap of up to about
1.5 pt between them.

Each cut corner now takes the edge's corner offsets, eased across the
edge as the cap's edge eases them, and each piece follows the whole
edge's curve, so the pieces draw the cap's edge within the cap's
sampling tolerance, with and without perspective.

The tiny-circle test now also requires the solids to keep at least one
curve before it checks their control points.
This commit is contained in:
dotCooCoo
2026-11-21 01:38:37 -08:00
parent 1bff8f1071
commit 0aafbdeb6d
4 changed files with 135 additions and 22 deletions
+1 -1
View File
@@ -1688,7 +1688,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
- The solids of one Extrude & Bevel (both kinds) or Inflate effect on one object, its fill's, its strokes' and a group's members' together, keep up to 163,840 faces (VectorCraft's own limit). Each solid is built in turn; once their faces pass the limit, no later solid is built, the object draws its source art, and applying or editing the effect, Export 3D Object and Expand as Wireframes report that the 3D surface is too complex. Tests `solids::tests::an_objects_solids_count_their_faces_together`, `a_groups_solids_together_past_the_limit_draw_the_source`, `a_fill_and_strokes_together_past_the_limit_draw_the_source`.
- Inflate at a Volume of 0 % works out each shape's puff only when its solid is built, so no puff is worked out for the shapes after the face limit stops, and the solids are the same bit for bit; with any volume every puff is worked out first, as the highest one places the eye. The shadow builds no solid for a fully transparent fill or stroke. Tests `solid::tests::a_flat_inflate_solves_each_puff_as_its_solid_is_taken`, `a_flat_inflate_solved_as_taken_matches_one_solved_first`, `shadow::tests::an_inflate_shape_that_casts_nothing_builds_no_solid`.
- Extrude & Bevel (both kinds) and Rotate keep the art's curves in the faces they draw, export and expand: caps and the edges of walls and bevels where they meet a cap are cubics with smooth anchors where the art's are, fitted within 0.001 pt in perspective and within the sampling tolerance on a bevel's inset. A piece of curve that does not fit after 8 halvings, and the curves past 1,048,576 for one solid stay straight (VectorCraft's own values; [three-d.md](three-d.md#what-differs-from-the-public-documentation)). Tests `solid::tests::a_cap_keeps_the_curves_of_the_art`, `a_cap_in_perspective_fits_the_projected_curves`, `a_beveled_cap_and_its_walls_share_their_curves`, `twisted_beveled_tiny_and_degenerate_caps_keep_their_curves`.
- The edges of Extrude & Bevel's walls and bevels between two bevel steps or two wall slices follow the art's curves too, the same curves on both faces that meet there; a twist cuts a wall's edge at points of the curve, so each piece meets the cap along its curve; and Inflate keeps the curves of its flat back, its side walls, and its front and puffed back along the outline (within the sampling tolerance there). Tests `solid::tests_curves::interior_bevel_edges_keep_the_curves_of_the_art`, `a_twisted_wall_keeps_curves_where_a_twist_cuts_it`, `inflate_keeps_the_curves_of_its_outline`, `straight_tiny_and_twisted_solids_keep_their_curves_bounded`.
- The edges of Extrude & Bevel's walls and bevels between two bevel steps or two wall slices follow the art's curves too, the same curves on both faces that meet there; a twist cuts a wall's edge at points of the curve, so each piece meets the cap along its curve, a bevel's inset cap included; and Inflate keeps the curves of its flat back, its side walls, and its front and puffed back along the outline (within the sampling tolerance there). Tests `solid::tests_curves::interior_bevel_edges_keep_the_curves_of_the_art`, `a_twisted_wall_keeps_curves_where_a_twist_cuts_it`, `twisted_bevel_pieces_meet_the_cap_at_sharp_joins`, `inflate_keeps_the_curves_of_its_outline`, `straight_tiny_and_twisted_solids_keep_their_curves_bounded`.
- Export 3D Object (Asset Export's menu): an object with Extrude & Bevel, Revolve, Inflate or Rotate becomes a 3D asset whose Format is USDA (the default), USDZ, glTF or OBJ, and Export writes each of its solids as a mesh with a material in its paint's color (`assets.add3D`, `assets.set3DFormat`, `assets.export3D`; [export 3D vector artwork](https://helpx.adobe.com/illustrator/desktop/special-effects-styles/create-3d-graphics/export-3d-vector-artwork.html)).
- Export 3D Object builds each Extrude & Bevel (both kinds) and Inflate solid once: the same build gives the faces that count toward the object's limit and the faces of its mesh, and the meshes match those of a separate build bit for bit. Tests `mesh::tests::a_meshed_solid_is_built_once`, `an_extruded_solid_and_its_mesh_match_the_two_built_apart`, `inflated_solids_and_their_meshes_match_the_two_built_apart`, `solids::tests_mesh::one_build_exports_the_meshes_built_apart`, `a_stroke_past_the_limits_is_left_out_of_the_export`.
- Export 3D Object writes the graphics mapped onto a plane or onto Extrude & Bevel's front and back caps as a PNG texture of each face, the face's color with its graphics drawn flat and unlit over it, on a mesh of that face with texture coordinates, in all four formats (glTF embeds it, USDZ packs it after the layer, OBJ and USDA write `<name>-texture-1.png` beside them; `assets.export3D` `textureSize`, 128 to 4096 pixels, default 1024, VectorCraft's own values; [the help page](https://helpx.adobe.com/illustrator/desktop/special-effects-styles/create-3d-graphics/map-artwork-on-3d-objects.html)). The graphics wrapped around Revolve's side export the same way, as a texture of the side unrolled as the canvas lays it out, on a mesh of the side's triangles, with its end caps and cut sides plain. Materials and lighting are not exported. Tests `a_caps_mesh_corners_go_back_to_the_art_they_were_made_from`, `a_mesh_carries_its_caps_graphics_flat_in_the_arts_plane`, `each_format_carries_a_textured_part_with_its_coordinates_and_picture`, `export_3d_paints_mapped_graphics_on_their_caps_in_every_format`, `a_revolved_sides_corners_lie_where_the_canvas_places_the_unrolled_side`, `a_revolved_sides_layout_matches_its_drawn_faces_at_every_turn`, `export_3d_paints_graphics_mapped_onto_a_revolves_side_in_every_format`, `a_partial_revolve_keeps_its_cut_sides_plain_beside_its_textured_side`.