SkillAgentSearch skills...

ShapeRounder

Advanced corner rounding for vector paths in Adobe Photoshop – free & open-source ExtendScript tool.

Install / Use

/learn @Glooring/ShapeRounder

README

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

  1. Why ShapeRounder?
  2. ✨ Features at a Glance
  3. 🖼️ Screenshots
  4. 📂 Installation
  5. ▶️ Usage Guide
  6. ⚙️ Understanding the Settings
  7. 📐 The Rounding Algorithm Explained
  8. 🛡️ Non-Destructive Workflow & Safety
  9. ⚠️ Known Limitations & Considerations
  10. 🚀 Future Plans
  11. 🤝 Contributing
  12. ✍️ License
  13. 💡 Development Insights
  14. 💬 Credits & Acknowledgements
  15. 📌 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 Corners modes based on whether they are All, Inner (concave), or Outer (convex).
    • Dynamically filters the list of points/corners shown in Custom Points/Custom Corners modes. (Enhanced)
  • 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 Radius for consistent rounding (used in Edit All Points & Only Corners modes).
    • Adjust Flatness to control the circularity of the curve (0% = circular arc, applies to all modes).
    • Set Min Angle / Max Angle thresholds for the Only Corners mode.
    • Specify individual radii per point/corner in Custom Points/Custom Corners modes.
  • 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 Corners modes, 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., MyPath becomes MyPath (Original)).
    • Saves the modified path with a clear name (e.g., MyPath (Rounded)).
    • Handles existing names by appending counters (e.g., MyPath (Original) (1)).
  • 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+.)

🔁 Before & After Example

<p align="center"> <img src="screenshots/before.png" alt="Before Rounding" width="220"/> &nbsp;&nbsp; <img src="screenshots/after.png" alt="After Rounding" width="220"/> </p> <p align="center"><em>Before and after rounding the corners of a star shape using ShapeRounder.</em></p>

🪟 Window Menu (Example)

<!--<p align="center"> <img src="screenshots/window-edit-all.png" alt="Edit All Points UI" width="220"/> <img src="screenshots/window-custom-points.png" alt="Custom Points UI" width="220"/> <img src="screenshots/window-only-corners.png" alt="Only Corners UI" width="220"/> </p> <p align="center"><em>ShapeRounder UI (Examples from earlier versions)</em></p>--> <p align="center"> <img src="screenshots/window-custom-corners.png" alt="Custom Corners UI" width="300"/> </p> <p align="center"><em>ShapeRounder UI</em></p>
View on GitHub
GitHub Stars4
CategoryDevelopment
Updated2mo ago
Forks0

Languages

JavaScript

Security Score

75/100

Audited on Jan 13, 2026

No findings