• Global community
• Language:
• Deutsch
• English
• Español
• Français
• Português
• 日本語コミュニティ
Dedicated community for Japanese speakers
• 한국 커뮤니티
Dedicated community for Korean speakers
Exit
• Re: Rotação com medida de forma automática?

# Rotação com medida de forma automática?

Community Beginner ,
Jun 24, 2023 Jun 24, 2023

Copied

Olá gente, gostaria de pedir uma ajuda, não sei se existe esse recurso no Ai, estou tentando encontrar algo, porém, até agora, sem sucesso!

Tenho um objeto (linha reta) de 29,995 mm, preciso que de forma automática ou de forma simplificada, essa linha faça angulação até atingir a medida de 27mm. Eu não quero que a linha diminua, eu quero que ela faça o ângulo necessário para ficar nessa largura. Alguém sabe se existe algum recurso dentro do programa que faça isso automaticamente? Sem precisar rotacionar manual?

TOPICS
How-to , Scripting

Views

276

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 , Jun 26, 2023 Jun 26, 2023

Priscila,

I had hoped for an (early) answer from one of our scripting friends (it may still come).

For now, I believe the easiest way for you is to use something like this free online calculator, or its equivalent on your computer, at least for repeated/edited rotations,

https://www.calculator.net/scientific-calculator.html

Using that, you can get the exact angle quite easily and create the line at that angle with the Line Segment Tool in one go:

...

16 Replies 16
Community Expert ,
Jun 25, 2023 Jun 25, 2023

Copied

Priscila,

You can (Smart Guides being your friends sying when you are withoin snapping distance):

1) Starting at the starting point of the original line (Smart Guides say anchor when you are there) create a vertical line of sufficient height (you can use ShiftClickDrag with the Line Segment Tool, or Click twice with the Pen Tool (Smart Guides showing vertical when you are close enough));

2) Move the vertical line by 27 mm towards the end of the original line (you can just add 27mm to the X value or use Transform>Move);

3) Select (a copy of) the original line, then switch to the Rotate Tool, then Click the starting point to set it as rotation centre, then ClickDrag the other end point ((Smart Guides say anchor) up to snap to the vertical line (Smart Guides say path).

This will rotate you (copy) line to extend 27 mm horizontally, as you can see in the Transform panel (W box) where you can also see the height (H box).

You can check the full length of the rotated line in the Document Info panel (click the three dots and choose selected as well as Objects, I always have it showing this).

Edit: Before that, I believe it is worth setting the original line length to 30 mm, unless you specifically wish it to be just that wee bit short of this round number.

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 ,
Jun 25, 2023 Jun 25, 2023

Copied

Hi Jacob, that's what I was trying, but it won't snap to the vertical path (or guide), smart guides say Path, but the result is slightly more or less than 27 mm.

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 ,
Jun 25, 2023 Jun 25, 2023

Copied

Right you are, Ton.

I am about to post another approach, and a quite different option.

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 ,
Jun 25, 2023 Jun 25, 2023

Copied

I tried eyeballing rotating a very thin 30mm line with the Transform effect, zoomed in to 64000% and ended up with 25,84 degrees to get a 27mm width.

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 ,
Jun 25, 2023 Jun 25, 2023

Copied

That is very close, Ton. arc cos (27/30) ~ 25,8419, so a difference of only 0.000075.

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 ,
Jun 25, 2023 Jun 25, 2023

Copied

It is close, the effect rounds it to 2 decimals and you need to turn off GPU Preview to get a more precise preview.

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 ,
Jun 25, 2023 Jun 25, 2023

Copied

Priscila,

As Ton pointed out, the actual rotation way is impossible to get accurate.

Instead (Smart Guides still being your friends saying when you are within snapping distance) you can, within the accuracy of Bezier circles:

1) Starting at the starting point of the original line (Smart Guides say anchor when you are there) create a vertical line of sufficient height (you can use ShiftClickDrag with the Line Segment Tool, or Click twice with the Pen Tool (Smart Guides showing vertical when you are close enough));

2) Move the vertical line by 27 mm towards the end of the original line (you can just add 27mm to the X value or use Transform>Move);

3)Create a circle with W = H = 60 mm/twice the length of the original line and move its centre to the starting point of the original line;

4) With the Line Segment Tool ClickDrag from the starting point to the original line to the intersection of the circle and the vertical line (Smart Guides say center and intersect).

This will create a new line to extend 27 mm horizontally, as you can see in the Transform panel (W box) where you can also see the height (H box).

You can check the full length of the rotated line in the Document Info panel (click the three dots and choose selected as well as Objects, I always have it showing this).

A quite different and undoubtedly the most accurate approach would be a script that rotates (a copy of) the line by the angle (+/-) defined as arc cos of the quotient, in this case 27/30, round the starting point, the +/- depending on which end the starting point is. So in this case +/- arc cos(27/30).

Any scripters?

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 Beginner ,
Jun 25, 2023 Jun 25, 2023

Copied

Você me ajudou muito! Confesso para você que não consegui fazer de uma maneira exata, sem precisar ajustar milímetros manualmente. Mas com certeza já ajudou demais, pois consegui fazer de uma forma mais simplificada.

Você conhece algum script que faz isso de maneira automática?

Sinceramente, estou querendo testar isso no Blender, mas não gostaria de levar meu trabalho do Ai para o outro programa, por isso gostaria muito de uma forma mais exata (recurso do programa) para fazer isso! Tenho a impressão de que existe alguma forma muito fácil de resolver isso e eu não estou sabendo chegar nela.

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 ,
Jun 26, 2023 Jun 26, 2023

Copied

Priscila,

I had hoped for an (early) answer from one of our scripting friends (it may still come).

For now, I believe the easiest way for you is to use something like this free online calculator, or its equivalent on your computer, at least for repeated/edited rotations,

https://www.calculator.net/scientific-calculator.html

Using that, you can get the exact angle quite easily and create the line at that angle with the Line Segment Tool in one go:

1) In the calculator linked to, simply 1a) - 1d) press the keys shown in the image below, then 1e) select the angle by ClickDragging over it (or including at least the first 4 decimals);

2) Select the Line Segment Tool, then insert the length (30 mm), then insert the angle from 1), then press OK.

This way will give you the 30 mm line at the angle that makes the W value 27 mm; you can check it directly in the Document Info panel (click the three dots and choose Selected as well as Objects, I always have it showing this) and in the Transform panel.

And this way will correspond exactly to the script I had in mind; the web page even says: "This is an online javascript scientific calculator."

Click/RightClick to get closer

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 ,
Jun 26, 2023 Jun 26, 2023

Copied

Added a scripting tag to wake up the scripting gods.

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 ,
Jun 26, 2023 Jun 26, 2023

Copied

A good plan, Ton. Until now, I thought they saw all and knew all.

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 ,
Jun 26, 2023 Jun 26, 2023

Copied

That's what I was told about gods, but the scripting kind may be more human.

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 ,
Jun 25, 2023 Jun 25, 2023

Copied

That works, but as you said within the accuracy of Bezier circles. I first rotated the circle 25 degrees to make the line snap to the 30 mm edge.

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 Beginner ,
Jun 25, 2023 Jun 25, 2023

Copied

Vou fazer dessa forma mesmo. Já testei na prática em produto físico e de fato, funcionou muito bem.

Agradeço muito pela ajuda de todos!

Já estou por aqui aplicando no meu trabalho 🙂

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 ,
Jun 25, 2023 Jun 25, 2023

Copied

Good to hear we could help, Priscila.

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 ,
Jun 27, 2023 Jun 27, 2023

Copied

LATEST

Here is a script I wrote. Is this what you want to do?

https://gist.github.com/sttk3/fea99f9ba399e2f25dcf92f91a5264b0