{"id":27442916,"url":"https://github.com/glooring/shaperounder","last_synced_at":"2026-04-25T21:34:03.290Z","repository":{"id":287766003,"uuid":"965612589","full_name":"Glooring/ShapeRounder","owner":"Glooring","description":"About Advanced corner rounding for vector paths in Adobe Photoshop – free \u0026 open-source ExtendScript tool.","archived":false,"fork":false,"pushed_at":"2025-04-13T19:51:19.000Z","size":110,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-15T01:17:03.325Z","etag":null,"topics":["adobe","bezier","extendscript","jsx","open-source","path-rounding","photoshop","photoshop-script","scriptui","ui-extension","vector-tools"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Glooring.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-13T14:48:12.000Z","updated_at":"2025-04-14T16:43:42.000Z","dependencies_parsed_at":"2025-04-13T20:37:47.739Z","dependency_job_id":null,"html_url":"https://github.com/Glooring/ShapeRounder","commit_stats":null,"previous_names":["glooring/shaperounder"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glooring%2FShapeRounder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glooring%2FShapeRounder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glooring%2FShapeRounder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glooring%2FShapeRounder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Glooring","download_url":"https://codeload.github.com/Glooring/ShapeRounder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248986314,"owners_count":21194025,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adobe","bezier","extendscript","jsx","open-source","path-rounding","photoshop","photoshop-script","scriptui","ui-extension","vector-tools"],"created_at":"2025-04-15T01:17:20.561Z","updated_at":"2026-04-25T21:34:03.271Z","avatar_url":"https://github.com/Glooring.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ShapeRounder ✨ (v1.5)\r\n\r\n**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.\r\n\r\nUnlike 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.\r\n\r\n\u003e **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.\r\n\r\n---\r\n\r\n## 🌟 Change Log (Summary)\r\n\r\n*   **v1.0 (Initial):** Basic rounding for all points, angle filtering, custom point selection.\r\n*   **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.\r\n*   **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.\r\n*   **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.\r\n*   **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.\r\n\r\n---\r\n\r\n## 📖 Table of Contents\r\n\r\n1.  [Why ShapeRounder?](#-why-shaperounder)\r\n2.  [✨ Features at a Glance](#-features-at-a-glance)\r\n3.  [🖼️ Screenshots](#️-screenshots)\r\n4.  [📂 Installation](#-installation)\r\n    *   [Option 1: Manual Install (Recommended)](#option-1-manual-install-recommended)\r\n    *   [Option 2: Run on Demand](#option-2-run-on-demand)\r\n5.  [▶️ Usage Guide](#️-usage-guide)\r\n    *   [Step 1: Prepare Your Path](#step-1-prepare-your-path)\r\n    *   [Step 2: Launch ShapeRounder](#step-2-launch-shaperounder)\r\n    *   [Step 3: Select the Target Path](#step-3-select-the-target-path)\r\n    *   [Step 4: Choose a Rounding Mode](#step-4-choose-a-rounding-mode)\r\n    *   [Step 5: Configure Settings](#step-5-configure-settings)\r\n    *   [Step 6: Apply Rounding](#step-6-apply-rounding)\r\n6.  [⚙️ Understanding the Settings](#️-understanding-the-settings)\r\n    *   [Select Path](#select-path)\r\n    *   [Round Mode](#round-mode) **(Updated)**\r\n    *   [Global Radius](#global-radius)\r\n    *   [Flatness](#flatness)\r\n    *   [Point Type Filter](#point-type-filter) **(Enhanced)**\r\n    *   [Min/Max Angle Filter](#minmax-angle-filter)\r\n    *   [Custom List Panel](#custom-list-panel) **(Enhanced)**\r\n7.  [📐 The Rounding Algorithm Explained](#-the-rounding-algorithm-explained)\r\n    *   [Bezier Arc Approximation](#bezier-arc-approximation)\r\n    *   [Geometric Safety Limits](#geometric-safety-limits)\r\n    *   [Geometric Corner Detection](#geometric-corner-detection) **(New)**\r\n    *   [Point Type Detection (Inner/Outer)](#point-type-detection-innerouter) **(New)**\r\n8.  [🛡️ Non-Destructive Workflow \u0026 Safety](#️-non-destructive-workflow--safety)\r\n    *   [Automatic Backup](#automatic-backup)\r\n    *   [Clear Output Naming](#clear-output-naming)\r\n    *   [Handling Name Conflicts](#handling-name-conflicts)\r\n    *   [Error Recovery (Undo Fallback)](#error-recovery-undo-fallback)\r\n9.  [⚠️ Known Limitations \u0026 Considerations](#️-known-limitations--considerations)\r\n10. [🚀 Future Plans](#-future-plans)\r\n11. [🤝 Contributing](#-contributing)\r\n12. [✍️ License](#️-license)\r\n13. [💡 Development Insights](#-development-insights)\r\n14. [💬 Credits \u0026 Acknowledgements](#-credits--acknowledgements)\r\n15. [📌 Compatibility](#-compatibility)\r\n\r\n---\r\n\r\n## 🤔 Why ShapeRounder?\r\n\r\nVector 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:\r\n\r\n*   **Universal Path Support:** Works on *any* path type selectable in the Paths panel.\r\n*   **Granular Control:** Choose between global rounding, angle-based filtering for true corners, precise per-point radius adjustments, or per-corner radius adjustments.\r\n*   **Intelligent Filtering:** Selectively target points based on angle, geometric type (true corners vs. any point), and concavity (Inner/Outer). **(Enhanced)**\r\n*   **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.\r\n*   **Non-Destructive Process:** Your original path is always preserved via duplication.\r\n*   **Free and Open Source:** An accessible tool for everyone.\r\n\r\nIt's built for designers, illustrators, and UI artists who need Illustrator-level corner rounding control without leaving Photoshop.\r\n\r\n---\r\n\r\n## ✨ Features at a Glance\r\n\r\n*   **Universal Path Selection:** Select any vector path from your document (Work Path, Shape Layer path, Vector Mask path) via the Paths panel.\r\n*   **Flexible Rounding Modes (v1.5):**\r\n    *   `Edit All Points`: Applies rounding to every eligible point, respecting the Point Type Filter.\r\n    *   `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)**\r\n    *   `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)**\r\n    *   `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)**\r\n*   **Point Type Filtering:**\r\n    *   Filter points/corners processed in `Edit All Points`/`Only Corners` modes based on whether they are `All`, `Inner` (concave), or `Outer` (convex).\r\n    *   Dynamically filters the list of points/corners shown in `Custom Points`/`Custom Corners` modes. **(Enhanced)**\r\n*   **Precise Bezier Math:** Implements accurate Bezier arc approximation using the user-provided core formula for smooth results.\r\n*   **Intelligent Geometry Limits:** Automatically calculates the maximum possible rounding based on adjacent segment lengths to prevent overlaps and glitches.\r\n*   **Customizable Parameters:**\r\n    *   Define a `Global Radius` for consistent rounding (used in `Edit All Points` \u0026 `Only Corners` modes).\r\n    *   Adjust `Flatness` to control the circularity of the curve (0% = circular arc, applies to all modes).\r\n    *   Set `Min Angle` / `Max Angle` thresholds for the `Only Corners` mode.\r\n    *   Specify individual radii per point/corner in `Custom Points`/`Custom Corners` modes.\r\n*   **User-Friendly Interface (ScriptUI):**\r\n    *   Clear dropdowns for path and mode selection.\r\n    *   Sliders and text fields for easy parameter input.\r\n    *   **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)**\r\n    *   Interactive checkboxes and radius inputs for per-item customization.\r\n*   **Non-Destructive Workflow:**\r\n    *   Automatically duplicates and renames the original path (e.g., `MyPath` becomes `MyPath (Original)`).\r\n    *   Saves the modified path with a clear name (e.g., `MyPath (Rounded)`).\r\n    *   Handles existing names by appending counters (e.g., `MyPath (Original) (1)`).\r\n*   **Robust Error Handling:** Includes an undo fallback mechanism that attempts to restore the original path if an error occurs during processing.\r\n*   **Subpath Compatibility:** Correctly processes both open and closed subpaths within a single path item.\r\n\r\n---\r\n\r\n## 🖼️ Screenshots\r\n\r\n*(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+.)*\r\n\r\n### 🔁 Before \u0026 After Example\r\n\r\n\u003cp align=\"center\"\u003e\r\n  \u003cimg src=\"screenshots/before.png\" alt=\"Before Rounding\" width=\"220\"/\u003e\r\n  \u0026nbsp;\u0026nbsp;\r\n  \u003cimg src=\"screenshots/after.png\" alt=\"After Rounding\" width=\"220\"/\u003e\r\n\u003c/p\u003e\r\n\u003cp align=\"center\"\u003e\u003cem\u003eBefore and after rounding the corners of a star shape using ShapeRounder.\u003c/em\u003e\u003c/p\u003e\r\n\r\n---\r\n\r\n### 🪟 Window Menu (Example)\r\n\u003c!--\u003cp align=\"center\"\u003e\r\n  \u003cimg src=\"screenshots/window-edit-all.png\" alt=\"Edit All Points UI\" width=\"220\"/\u003e\r\n  \u003cimg src=\"screenshots/window-custom-points.png\" alt=\"Custom Points UI\" width=\"220\"/\u003e\r\n  \u003cimg src=\"screenshots/window-only-corners.png\" alt=\"Only Corners UI\" width=\"220\"/\u003e\r\n\u003c/p\u003e\r\n\u003cp align=\"center\"\u003e\u003cem\u003eShapeRounder UI (Examples from earlier versions)\u003c/em\u003e\u003c/p\u003e--\u003e\r\n\r\n\u003cp align=\"center\"\u003e\r\n  \u003cimg src=\"screenshots/window-custom-corners.png\" alt=\"Custom Corners UI\" width=\"300\"/\u003e\r\n\u003c/p\u003e\r\n\u003cp align=\"center\"\u003e\u003cem\u003eShapeRounder UI\u003c/em\u003e\u003c/p\u003e\r\n\r\n---\r\n\r\n## 📂 Installation\r\n\r\nYou have two ways to use ShapeRounder:\r\n\r\n### Option 1: Manual Install (Recommended)\r\n\r\nThis makes the script readily available in Photoshop's Scripts menu.\r\n\r\n1.  **Locate your Photoshop Scripts folder:**\r\n    *   **Windows:** `C:\\Program Files\\Adobe\\Adobe Photoshop [Version]\\Presets\\Scripts\\`\r\n    *   **macOS:** `/Applications/Adobe Photoshop [Version]/Presets/Scripts/`\r\n    *(Replace `[Version]` with your specific Photoshop version, e.g., `Adobe Photoshop 2024`)*\r\n    *(Note: You might need administrator privileges)*\r\n2.  **Copy `ShapeRounder.jsx`** (v1.5 or later) into this `Scripts` folder.\r\n3.  **Restart Adobe Photoshop.**\r\n4.  **Access the script** via `File \u003e Scripts \u003e ShapeRounder`.\r\n\r\n### Option 2: Run on Demand\r\n\r\nUse this method if you prefer not to install the script permanently.\r\n\r\n1.  Save `ShapeRounder.jsx` to a convenient location.\r\n2.  In Photoshop, go to `File \u003e Scripts \u003e Browse...`.\r\n3.  Navigate to where you saved `ShapeRounder.jsx` and select it. Click **Open**.\r\n\r\n---\r\n\r\n## ▶️ Usage Guide\r\n\r\nFollow these steps to round corners on your paths:\r\n\r\n### Step 1: Prepare Your Path\r\n\r\nEnsure your Photoshop document is open and contains at least one vector path selectable in the Paths panel.\r\n\r\n*(Tip: For best results, ensure your path doesn't have overlapping points or zero-length segments at the corners you intend to round.)*\r\n\r\n### Step 2: Launch ShapeRounder\r\n\r\nGo to `File \u003e Scripts \u003e ShapeRounder` (if installed) or `File \u003e Scripts \u003e Browse...` and select the `.jsx` file.\r\n\r\n### Step 3: Select the Target Path\r\n\r\nUse the **Select Path** dropdown menu at the top to choose the path you want to modify.\r\n\r\n### Step 4: Choose a Rounding Mode\r\n\r\nSelect how you want to apply rounding using the **Round Mode** dropdown:\r\n\r\n1.  **`Edit All Points`**: Attempts to round *every* eligible point on the path using the `Global Radius`, `Flatness`, and respecting the `Point Type Filter` setting. Open path endpoints are ignored.\r\n2.  **`Only Corners`**: Rounds only points that are **geometric corners** (where two straight segments meet) *and* whose angle falls within the specified `Min Angle`/`Max Angle` range. Uses `Global Radius`, `Flatness`, and respects the `Point Type Filter`. **(Refined)**\r\n3.  **`Custom Points`**: Provides a paginated list of points. The points shown in this list are filtered based on the **`Point Type Filter`** (`All`, `Inner`, or `Outer`). You can:\r\n    *   Check the box next to a listed point (`P0`, `P1`, etc.) to enable rounding for that specific point.\r\n    *   Enter a unique radius value in the text field next to the checked point.\r\n    *   Use the **Previous** / **Next** buttons to navigate pages.\r\n    *   `Global Radius` and `Angle Filter` settings are ignored. `Flatness` still applies. **(Enhanced List Filtering)**\r\n4.  **`Custom Corners`**: Provides a paginated list containing *only* points identified as **geometric corners**. This list is *also* filtered based on the **`Point Type Filter`** (`All`, `Inner`, or `Outer`). You can:\r\n    *   Check the box next to a listed corner (`P0`, `P1`, etc.) to enable rounding.\r\n    *   Enter a unique radius value for the checked corner.\r\n    *   Use the **Previous** / **Next** buttons to navigate pages.\r\n    *   `Global Radius` and `Angle Filter` settings are ignored. `Flatness` still applies. **(New Mode)**\r\n\r\n### Step 5: Configure Settings\r\n\r\nAdjust the parameters based on your chosen mode:\r\n\r\n*   **`Global Radius (px)`**: (Used in `Edit All Points` \u0026 `Only Corners` modes) Sets the desired radius for the rounded corners in pixels.\r\n*   **`Flatness (%)`**: (Used in *all* modes) Controls the shape of the curve (0% = circular arc).\r\n*   **`Point Type Filter`**: (Used in *all* modes)\r\n    *   For `Edit All Points` / `Only Corners`: Filters which points/corners are *processed* based on type (`All`, `Inner`, `Outer`).\r\n    *   For `Custom Points` / `Custom Corners`: Filters which points/corners are *displayed* in the list for selection.\r\n*   **`Min Angle (°)` / `Max Angle (°)`**: (Used *only* in `Only Corners` mode) Define the angle range for geometric corners to be rounded.\r\n*   **Custom List Inputs**: (Used in `Custom Points` / `Custom Corners` modes) Checkboxes and radius fields next to each listed item.\r\n\r\n### Step 6: Apply Rounding\r\n\r\n*   Click the **Apply** button.\r\n*   The script duplicates the original path (`... (Original)`), creates the new rounded path (`... (Rounded)`), and selects it.\r\n*   **Reset UI**: Reverts all dialog settings to defaults.\r\n*   **Cancel**: Exits without changes.\r\n\r\n---\r\n\r\n## ⚙️ Understanding the Settings\r\n\r\n*   **Select Path:** Dropdown listing detected vector paths from the Paths panel.\r\n*   **Round Mode:** **(Updated for v1.5)**\r\n    *   `Edit All Points`: Round all points that can form a corner (have neighbors), respecting the Point Type Filter.\r\n    *   `Only Corners`: Round only points identified as **geometric corners** (straight segments meeting, handles at anchor) that fall within the Min/Max Angle range, respecting the Point Type Filter.\r\n    *   `Custom Points`: Manually select points from a list. The list is filtered by the Point Type Filter (All/Inner/Outer). Assign individual radii.\r\n    *   `Custom Corners`: Manually select *only* geometric corners from a list. This list is also filtered by the Point Type Filter (All/Inner/Outer). Assign individual radii.\r\n*   **Global Radius:** Target radius (pixels) for `Edit All Points` \u0026 `Only Corners` modes.\r\n*   **Flatness:** Percentage (0-100%) modifying curve control points (0% = circular). Applies to all modes.\r\n*   **Point Type Filter:** **(Enhanced)** Dropdown (`All`, `Inner`, `Outer`).\r\n    *   Filters points processed by `Edit All Points` / `Only Corners`.\r\n    *   Filters points/corners *displayed* in the list for `Custom Points` / `Custom Corners`.\r\n*   **Min/Max Angle Filter:** Sliders (0°–180°) defining the angle range *only* for the `Only Corners` mode.\r\n*   **Custom List Panel:** **(Enhanced)** (Visible only in `Custom Points` / `Custom Corners` modes)\r\n    *   **Title:** Dynamically changes to \"Custom Points\" or \"Custom Corners\".\r\n    *   **Content:** List displays points or geometric corners, filtered by the `Point Type Filter`.\r\n    *   **Checkbox:** Enables/disables rounding for the corresponding item.\r\n    *   **Point Label:** `P\u003cindex\u003e` identifies the point globally (using its original index on the full path). Coordinates shown for reference.\r\n    *   **Radius Input:** Text field for specific radius when checkbox is ticked.\r\n    *   **Pagination:** `Previous`/`Next` buttons for navigating long lists.\r\n\r\n---\r\n\r\n## 📐 The Rounding Algorithm Explained\r\n\r\nShapeRounder employs precise calculations using the user-provided core formula.\r\n\r\n### Bezier Arc Approximation\r\n\r\nThe core rounding uses the following steps for a candidate corner point `P` with adjacent points `P_prev` and `P_next`, and a target `radiusToUse`:\r\n\r\n1.  **Calculate Interior Angle (θ):** Angle between segments `P_prev - P` and `P_next - P`.\r\n2.  **Determine Offset Distance:** Points `A` and `B` are placed along the segments away from `P`. The distance (`offset`) is calculated based on `radiusToUse`, `θ`, and limited by half the segment lengths (`l1/2`, `l2/2`) to prevent overlaps:\r\n    ```javascript\r\n    offset = Math.min(Math.abs(radiusToUse / Math.tan(thetaRad / 2.0)), l1 / 2.0, l2 / 2.0);\r\n    ```\r\n    *(Note: Absolute value used for robustness with tan)*\r\n3.  **Calculate Bezier Handle Length (h):** Based on the arc angle (`PI - θ_rad`), the target radius (`radiusToUse`), and `flatness`:\r\n    ```javascript\r\n    h = (4 / 3) * Math.tan((Math.PI - thetaRad) / 4) * radiusToUse * (1 - params.flatness);\r\n    ```\r\n4.  **Position New Control Points:**\r\n    *   Original corner `P` is replaced by new points `A` and `B`.\r\n    *   Handles for `A` and `B` are calculated using `h` and positioned relative to the original corner `P` to create the curve. The other handles point directly at their anchors (`A.rightDirection = A.anchor`, `B.leftDirection = B.anchor`).\r\n\r\n### Geometric Safety Limits\r\n\r\nThe `offset` calculation inherently limits the rounding radius based on the lengths of the incoming and outgoing path segments, preventing the curve from extending beyond the midpoint of either segment. This ensures path integrity.\r\n\r\n### Geometric Corner Detection **(New)**\r\n\r\nFor the **`Only Corners`** and **`Custom Corners`** modes, the script identifies \"geometric corners\" by checking if a `PathPointInfo` object (`curr`):\r\n*   Has `curr.kind === PointKind.CORNERPOINT`.\r\n*   Has its `curr.leftDirection` handle coincident with its `curr.anchor` point (within tolerance).\r\n*   Has its `curr.rightDirection` handle coincident with its `curr.anchor` point (within tolerance).\r\nThis distinguishes sharp corners formed by straight lines from smooth points or points on curves.\r\n\r\n### Point Type Detection (Inner/Outer) **(New)**\r\n\r\nThe **`Point Type Filter`** uses the 2D cross-product of the vectors forming the corner (`P_prev - P` and `P_next - P`) to determine if a corner is `Inner` (concave, cross product \u003e 0 in Y-down coordinates) or `Outer` (convex, cross product \u003c 0). This filter applies to `Edit All Points`, `Only Corners`, and dynamically filters the lists in `Custom Points` and `Custom Corners` modes.\r\n\r\n---\r\n\r\n## 🛡️ Non-Destructive Workflow \u0026 Safety\r\n\r\n\r\nShapeRounder is designed to modify paths safely:\r\n\r\n*   **Automatic Backup:** Duplicates the selected path and renames the original by appending `(Original)`.\r\n*   **Clear Output Naming:** Creates the new path appending `(Rounded)`.\r\n*   **Handling Name Conflicts:** Appends counters (`(1)`, `(2)`, etc.) if names already exist.\r\n*   **Error Recovery (Undo Fallback):** Attempts to restore the original path data if an unexpected error occurs during processing.\r\n\r\n---\r\n\r\n## ⚠️ Known Limitations \u0026 Considerations\r\n\r\n*   **No Live Preview:** Requires clicking `Apply` to see results.\r\n*   **No Visual Point Markers:** Cannot visually mark points on canvas corresponding to the list items.\r\n*   **Single Path Processing:** Processes one selected path at a time.\r\n*   **ExtendScript Based:** Not compatible with UXP directly (runs via ExtendScript engine/Rosetta).\r\n*   **Vector Paths Only:** Cannot round raster shapes, pixels, smart objects, text layers.\r\n*   **Performance:** May lag on paths with thousands of points, especially populating custom lists.\r\n*   **Clipping Paths:** Intentionally ignored.\r\n*   **Complex Curves:** The definition of \"geometric corner\" is specific. Points on curves or points connecting a curve and a line will not be identified as geometric corners by the `Only Corners` or `Custom Corners` modes. Use `Edit All Points` or `Custom Points` for these.\r\n\r\n---\r\n\r\n## 🚀 Future Plans\r\n\r\nPotential areas for future development include:\r\n\r\n*   **UXP Plugin Rewrite:** Modern UXP version for better performance and UI (live preview).\r\n*   **On-Canvas Point Identification:** Visual cues for selected points/corners.\r\n*   **Radius Preset System:** Save/load common configurations.\r\n*   **Batch Processing:** Support multiple selected paths.\r\n*   **More Sophisticated Point Classification:** Option to identify points connecting curves and lines.\r\n\r\n---\r\n\r\n## 🤝 Contributing\r\n\r\nContributions, bug reports, and feature suggestions are welcome!\r\n\r\n---\r\n\r\n## ✍️ License\r\n\r\nThis project is licensed under the **MIT License**.\r\n\r\n---\r\n\r\n## 💡 Development Insights\r\n\r\n\r\nShapeRounder was born from a desire to bring more robust vector tools into Photoshop's environment. The development involved a deep dive into vector geometry, Bezier mathematics, the Adobe Photoshop ExtendScript API, and ScriptUI development. Ensuring the rounding logic was robust and handled various path configurations gracefully (open/closed paths, short segments, sharp angles, different point types) was a key focus. **Iterative refinement based on user feedback led to enhanced filtering options (Point Type, Geometric Corner), dynamic UI lists, and more precise mode definitions.**\r\n\r\nDuring development, AI assistants (ChatGPT, Grok, Gemini) were utilized as collaborative tools for exploring mathematical concepts, generating code snippets for specific algorithms, debugging complex logic, and refining UI layouts. Every AI-generated suggestion was critically reviewed, tested, adapted, and integrated manually to ensure correctness and alignment with the project goals. The final script represents a custom-built solution tailored specifically for this rounding task, refined through multiple iterations.\r\n\r\n---\r\n\r\n## 💬 Credits \u0026 Acknowledgements\r\n\r\n*   **Developed by:** Glooring - An indie developer passionate about enhancing creative workflows through scripting and automation.\r\n*   **Inspiration:** Acknowledges the existence of commercial plugins with similar goals, which highlighted the need for a free, open-source alternative with detailed control.\r\n\r\n---\r\n\r\n## 📌 Compatibility\r\n\r\nThis script is designed for Adobe Photoshop versions that support **ExtendScript**.\r\n\r\n| Feature / Environment      | Supported            | Notes                                      |\r\n| :------------------------- | :------------------- | :----------------------------------------- |\r\n| **Photoshop Versions**     | CC 2018 – CC 2024+   | ✅ (Tested primarily on newer CC versions) |\r\n| **Operating System**       | Windows, macOS       | ✅                                         |\r\n| **Apple Silicon (M1/M2+)** | ✅                   | Requires Photoshop to run under Rosetta 2  |\r\n| **UXP Environment**        | ❌                   | This is an ExtendScript (.jsx) file         |\r\n| **Path Types**             | Work Path, Shape Layer Path, Vector Mask Path | ✅ |\r\n| **Path Types (Ignored)**   | Clipping Path        | ❌ (By design)                            |\r\n\r\n*Note: Future major versions of Photoshop may phase out ExtendScript support...*\r\n\r\n---\r\n\r\n**Enjoy clean, perfect curves — on your terms — with ShapeRounder!**","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglooring%2Fshaperounder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglooring%2Fshaperounder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglooring%2Fshaperounder/lists"}