Copy link to clipboard
Copied
Hello Friends,
I have java script code for reducing the points of DXF or AI in illustrator.
After applying once this script it's removing the points from the artworks.
But when I am using repeatedly this script on artwork then it ruin the shapes of artwork.
Is there any way to stop reducing points after minimum possible points.
I have an artwork's shape like this
after repeatedly applying script , it ruins
Is there any way to stop this ruins.
Please assist me.
Regards
Kundan
Copy link to clipboard
Copied
I don't know why you need to run the script repeatedly but not once?
One possible way is to log the pathItem's length, compare it at the end of the code, if the length changed(bigger than tolerance value), it means you should stop reducing points.
Copy link to clipboard
Copied
Your number of points doesn't seem crazy neither.
Copy link to clipboard
Copied
Thanks for reply moluapple,
Yes , you are correct I should not apply script repeatedly , but it's it's clients requirement.
Regards
Kundan