Feature/ feat( text emboss): 3-axis text bend & arc deformation with interactive viewport gizmo controls - #15770
Open
DDS-Solutions wants to merge 13 commits into
Open
Conversation
…izmo for Emboss Text
…sets.json for MSVC
…IDs during live bend
- Recover original baseline dimensions upon unbending via analytical arc ratio - Protect in-flight drag angles from being overwritten during selection updates - Automatically reapply bend deformation upon text/font regeneration in EmbossJob - Implement adaptive edge subdivision in TextBender for smooth glyph curvature - Prevent duplicate bend slider cubes on temporary highlight/dragging nodes - Add dragging_bend_slider guard to transient mouse handler to prevent axis drops - Clamp numeric inputs to [-180 deg, 180 deg] and [-pi, pi] - Refresh slider positions on bounding box updates for standalone text - Conform BendedProjection project() and unproject() to IProjection contract - Integrate and pass all review regression tests (24/24 assertions passing)
…tions - Keep text extrusion normal to face across horizontal bend, curl, and arc - Update subdivision chord error bounds and unbend fixed-point mesh bounds estimation - Add unit tests for depth and normal preservation in EmbossBendTests and TextBenderTests - Update .gitignore for compile_commands.json, .clangd, and Run_PrusaSlicer.bat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some background here : #10169
This PR introduces 3-axis text deformation capabilities to the Emboss Text tool, allowing text to bend horizontally, curl vertically, and curve along an in-plane arc. It also adds interactive gizmo handles in the 3D plater viewport for real-time manipulation alongside dialog slider controls, complete with full persistence in 3MF project files, presets, and undo/redo history.
Key Features
3-Axis Text Deformation:
Horizontal Bend: Bends text around the vertical axis (conforming around cylinders/columns).
Vertical Curl: Curls text around the horizontal axis (conforming along arches or curved profiles).
In-Plane Arc: Curves text along the surface plane (circular text layout).
Interactive Viewport Gizmo:
Adds interactive sliding cube handles directly to the
RotationGizmowhen an embossed text volume is selected.Supports live real-time mesh deformation feedback during dragging while maintaining correct volume selection IDs.
Plater Dialog & Slider Controls:
Integrated with
RotationDialogandSliderWithInputwidgets for fine-tuned numerical input and slider adjustments. Persistence & Serialization:ModelSerialize) and text preset management (TextPresetManager).Technical Highlights
Face-Normal Extrusion Thickness:
Deforms text by arcing along the plane and rotating the cross-section through depth bends, ensuring the text retains its exact intended extrusion thickness normal to the curved surface rather than losing thickness or shearing.
Adaptive Subdivision & Chord Error Control:
Edge subdivision (
subdivide_edges) bounds chord error across composed deformations to produce smooth curved geometrywithout facet artifacts.
Fixed-Point Mesh Recovery (
unbend_mesh):Recovers original undeformed mesh bounds through iterative fixed-point estimation, accounting for bounding box growth when curved surfaces rotate in 3D.
Clean Architecture & Separation:
Geometry and deformation logic encapsulated in
TextBenderandBendedProjection.Presentation and interaction cleanly bound in
RotationGizmoandRotationDialog.Test Coverage
TextBenderTests: Tests deformation mathematics, roundtrip bend/unbend coordinate invariance, and face-normal extrusion thickness preservation.EmbossBendTests: End-to-end integration tests verifying mesh generation, surface distance preservation across multi-axis combinations, and undo serialization.SliderWithInputTests: Unit tests covering UI input validation, slider bounds, and event callbacks.3MFTests: Unit tests verifying 3MF export/import roundtripping of bend parameters.