create clockwise arc

create clockwise arc

jwe03
Advocate Advocate
1,266 Views
4 Replies
Message 1 of 5

create clockwise arc

jwe03
Advocate
Advocate

Hi

 

How can I create a clockwise arc using .NET.

By default all arcs are drawn counter-clockwise. I need to draw them clockwise as well.

0 Likes
Accepted solutions (1)
1,267 Views
4 Replies
Replies (4)
Message 2 of 5

_gile
Consultant
Consultant

Hi,

 

If you do not provide more details about the the input data uses to create the arc 'clockwise', I'm afraid nobody can really help you (from my part I can't).



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes
Message 3 of 5

jwe03
Advocate
Advocate

HI @_gile,

 

Basically what I'm trying to do is to convert all arcs in a polyline into segments which can have a maximum length (input by the user). The less this maximum length, the finer are the arcs cut (the more segments generated and the more vertices are added to the polyline).

 

So while trying the algorithm, i had a problem with arcs in the polyline which go clockwise.  I got their start point, endpoint, radius and center (deriving them from the bulge) and then when i  created the arc it was always created in the counter clockwise direction.

 

This is why i'm asking if this can be done and if yes, how?

0 Likes
Message 4 of 5

Alexander.Rivilis
Mentor
Mentor
Accepted solution

@jwe03  написал (-а):

Hi

 

How can I create a clockwise arc using .NET.

By default all arcs are drawn counter-clockwise. I need to draw them clockwise as well.


You can not create clockwise arc, but you can change it normal (for example, from (0 0 1) to (0 0 -1)) and arc will be look as counter-clockwise if view direction is (0 0 1).  This result can be achieved by mirroring the arc relative to the bisector of its central angle.

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 5 of 5

fieldguy
Advisor
Advisor

assuming you have a CircularArc2d (ca), you can use the ca.GetLength method.  When you create the arc, check that arc length is the same as the ca.getlength result.  If it's not, you have to swap arc parameters (start pt, end pt, startangle, and endangle). 

0 Likes