Skip to main content
qrl54114901
Participant
May 15, 2023
Answered

Script to convert shape rounded rectangle to rectangle

  • May 15, 2023
  • 2 replies
  • 1008 views

I hope the JavaScript implementation

thank!

This topic has been closed for replies.
Correct answer hhas01

If you wish to create or modify a rectangle with rounded corners, you will have to add/remove the extra path points and set their Bezier handles yourself.

 

https://ai-scripting.docsforadobe.dev/jsobjref/PathPoints.html

 

That is how the corner rounding options in Properties panel really does it, which you can check:

 

alert(app.activeDocument.pathItems[0].pathPoints.length)

 

2 replies

qrl54114901
Participant
May 17, 2023

Help Me please

qrl54114901
Participant
May 15, 2023

I hope the JavaScript implementation

thank!

hhas01Correct answer
Inspiring
May 15, 2023

If you wish to create or modify a rectangle with rounded corners, you will have to add/remove the extra path points and set their Bezier handles yourself.

 

https://ai-scripting.docsforadobe.dev/jsobjref/PathPoints.html

 

That is how the corner rounding options in Properties panel really does it, which you can check:

 

alert(app.activeDocument.pathItems[0].pathPoints.length)