ShapeRounder
Advanced corner rounding for vector paths in Adobe Photoshop – free & open-source ExtendScript tool.
Install / Use
/learn @Glooring/ShapeRounderREADME
ShapeRounder ✨ (v1.5)
ShapeRounder is a powerful and precise Adobe Photoshop script designed to bring advanced vector path corner rounding capabilities directly into your workflow. Offering sophisticated filtering, per-point/per-corner control, smart Bezier math, and a non-destructive editing process, it empowers you to refine any path with exceptional accuracy.
Unlike Photoshop’s native shape rounding—which is limited to specific live shapes like rectangles or rounded rectangles—ShapeRounder works universally on any vector path. This includes Work Paths, Vector Masks on layers, paths defining Shape Layers, and complex shapes drawn manually with the Pen Tool.
Note: The name ShapeRounder was inspired by a similarly named commercial plugin. However, this script is an independent project, built entirely from scratch as a free and open-source alternative. It focuses on enhanced precision, customizable options, and aims to replicate Adobe’s native curvature formula as closely as possible within the ExtendScript environment.
🌟 Change Log (Summary)
- v1.0 (Initial): Basic rounding for all points, angle filtering, custom point selection.
- v1.1/v1.2: Introduced Point Type Filter ("All", "Inner", "Outer") to selectively round corners based on convexity/concavity in "Edit All Points" and "Only Corners" modes. Corrected initial logic for Inner/Outer detection.
- v1.3: Enhanced Custom Points mode: The Point Type Filter now dynamically filters the list of points displayed, allowing users to focus on specific point types (All, Inner, Outer) for manual selection.
- v1.4: Refined "Only Corners" mode: This mode now strictly targets only geometric corners (points where two straight line segments meet, with handles coincident with the anchor) that also satisfy the angle filter criteria.
- v1.5: Added "Custom Corners" mode: A new mode that presents a list containing only the geometric corners of the path (further filtered by the Point Type Filter), allowing precise selection and radius assignment for true corners. The Point Type Filter is now always active and filters the list in both "Custom Points" and "Custom Corners" modes.
📖 Table of Contents
- Why ShapeRounder?
- ✨ Features at a Glance
- 🖼️ Screenshots
- 📂 Installation
- ▶️ Usage Guide
- ⚙️ Understanding the Settings
- Select Path
- Round Mode (Updated)
- Global Radius
- Flatness
- Point Type Filter (Enhanced)
- Min/Max Angle Filter
- Custom List Panel (Enhanced)
- 📐 The Rounding Algorithm Explained
- 🛡️ Non-Destructive Workflow & Safety
- ⚠️ Known Limitations & Considerations
- 🚀 Future Plans
- 🤝 Contributing
- ✍️ License
- 💡 Development Insights
- 💬 Credits & Acknowledgements
- 📌 Compatibility
🤔 Why ShapeRounder?
Vector path refinement is crucial for clean and professional designs. While Adobe Illustrator excels at this, Photoshop's native tools are often insufficient for complex paths or precise control. ShapeRounder bridges this gap by providing:
- Universal Path Support: Works on any path type selectable in the Paths panel.
- Granular Control: Choose between global rounding, angle-based filtering for true corners, precise per-point radius adjustments, or per-corner radius adjustments.
- Intelligent Filtering: Selectively target points based on angle, geometric type (true corners vs. any point), and concavity (Inner/Outer). (Enhanced)
- Mathematical Precision: Uses a Bezier arc approximation formula (based on user-provided logic) reverse-engineered from Adobe Photoshop’s native shape rounding behavior for smooth, predictable results.
- Non-Destructive Process: Your original path is always preserved via duplication.
- Free and Open Source: An accessible tool for everyone.
It's built for designers, illustrators, and UI artists who need Illustrator-level corner rounding control without leaving Photoshop.
✨ Features at a Glance
- Universal Path Selection: Select any vector path from your document (Work Path, Shape Layer path, Vector Mask path) via the Paths panel.
- Flexible Rounding Modes (v1.5):
Edit All Points: Applies rounding to every eligible point, respecting the Point Type Filter.Only Corners: Rounds only points that are geometric corners (straight segments meeting at a point with coincident handles) and fall within the specified angle range (Min/Max Angle), respecting the Point Type Filter. (Refined)Custom Points: Presents a paginated list of points (filtered by the Point Type Filter) allowing selection of specific points to round, each with its own custom radius value. (Enhanced List Filtering)Custom Corners: Presents a paginated list containing only geometric corner points (further filtered by the Point Type Filter), allowing selection of specific corners to round, each with its own custom radius value. (New Mode)
- Point Type Filtering:
- Filter points/corners processed in
Edit All Points/Only Cornersmodes based on whether they areAll,Inner(concave), orOuter(convex). - Dynamically filters the list of points/corners shown in
Custom Points/Custom Cornersmodes. (Enhanced)
- Filter points/corners processed in
- Precise Bezier Math: Implements accurate Bezier arc approximation using the user-provided core formula for smooth results.
- Intelligent Geometry Limits: Automatically calculates the maximum possible rounding based on adjacent segment lengths to prevent overlaps and glitches.
- Customizable Parameters:
- Define a
Global Radiusfor consistent rounding (used inEdit All Points&Only Cornersmodes). - Adjust
Flatnessto control the circularity of the curve (0% = circular arc, applies to all modes). - Set
Min Angle/Max Anglethresholds for theOnly Cornersmode. - Specify individual radii per point/corner in
Custom Points/Custom Cornersmodes.
- Define a
- User-Friendly Interface (ScriptUI):
- Clear dropdowns for path and mode selection.
- Sliders and text fields for easy parameter input.
- Dynamic Paginated List: Efficiently handles paths with many points in
Custom Points/Custom Cornersmodes, displaying filtered points/corners in manageable pages (approx. 5 per page). The list content and panel title update based on the selected mode and Point Type Filter. (Enhanced) - Interactive checkboxes and radius inputs for per-item customization.
- Non-Destructive Workflow:
- Automatically duplicates and renames the original path (e.g.,
MyPathbecomesMyPath (Original)). - Saves the modified path with a clear name (e.g.,
MyPath (Rounded)). - Handles existing names by appending counters (e.g.,
MyPath (Original) (1)).
- Automatically duplicates and renames the original path (e.g.,
- Robust Error Handling: Includes an undo fallback mechanism that attempts to restore the original path if an error occurs during processing.
- Subpath Compatibility: Correctly processes both open and closed subpaths within a single path item.
🖼️ Screenshots
(Note: Screenshots below may reflect earlier versions and might not show the "Custom Corners" mode or the dynamic list filtering. Updated screenshots are recommended for v1.5+.)
