• Global community
• Language:
• Deutsch
• English
• Español
• Français
• Português
• 日本語コミュニティ
Dedicated community for Japanese speakers
• 한국 커뮤니티
Dedicated community for Korean speakers
Exit
• stroke width - scaling

# stroke width - scaling

New Here ,
Mar 28, 2023 Mar 28, 2023

Copied

Hi!

I am trying to scale a rectangle asymettrically and trying to keep the same stroke.

I am using this expression to keep it so, but if I disalble the proportion chain and keep y 100% this happens.

Any idea why?

TOPICS
Error or problem , Expressions , How to

Views

375

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
5 Replies 5
New Here ,
Mar 28, 2023 Mar 28, 2023

Copied

`expression ---> value / length(toComp([0,0]), toComp([0.7071,0.7071])) || 0.001;`

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Mar 28, 2023 Mar 28, 2023

Copied

it looks like the expression is forcin the stroke somehow

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Explorer ,
May 23, 2024 May 23, 2024

Copied

LATEST

I use this expression many times but recently, I noticed in After effects 2024, it reports "Error: Couldn't turn result into numeric value". Does anyone know how to perfect it?

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Community Expert ,
Mar 28, 2023 Mar 28, 2023

Copied

If you use Scale to change the shape of a rectangle, then the stroke proportions will change. If the Rectangle is a Parametric shape with a size value, you just change the size, and the stroke will stay constant.

If the Rectangle is a vector path, you have to use a complex expression to change the size of the path based on a slider or point controls, or you have to select the vector path and use the Transform tool to change the size manually.

Attached files are a pain to look at. Please embed them by dragging them to the reply field or using the toolbar. Cropped screenshots that don't show us the modified properties of the problem layers are pretty useless for diagnosing problems. I am only guessing that the rectangle you are showing is a Parametric shape created with the Rectangle tool.

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
LEGEND ,
Mar 28, 2023 Mar 28, 2023

Copied

Move the stroke outside the path group so it is applied after the transform.

Mylenium