Programming Challenge 10/22

Programming Challenge 10/22

john.uhden
Mentor Mentor
590 Views
8 Replies
Message 1 of 9

Programming Challenge 10/22

john.uhden
Mentor
Mentor

A bottle of Walker Black to anyone who can programmatically convert a straight polyline segment to one having only one radius, which is less than half the chord.  No, you may not add vertices.

John F. Uhden

0 Likes
Accepted solutions (1)
591 Views
8 Replies
Replies (8)
Message 2 of 9

Sea-Haven
Mentor
Mentor

I dont think you can have less than 1/2 the length of the straight segment once you go less the arc does not go through the two segment points, could move those 2 points by like 1e-10 which would not in a sense reveal a change in the segment lengths and the radius would appear to be 1/2 segment length. Pretty easy to program.

SeaHaven_1-1671408783415.png

 

 

Happy for some one to say I am wrong

 

0 Likes
Message 3 of 9

hak_vz
Advisor
Advisor

Polyline bulges 

Miljenko Hatlak

EESignature

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
0 Likes
Message 4 of 9

Kent1Cooper
Consultant
Consultant

Yeah, and while you're at it, draw a Circle whose radius is less than half its diameter.

Kent Cooper, AIA
Message 5 of 9

ronjonp
Mentor
Mentor

@john.uhden I've always liked this code from master ElpanovEvgeniy.

 

2022-12-19_07-48-38.gif

0 Likes
Message 6 of 9

leeminardi
Mentor
Mentor
Accepted solution

@john.uhden wrote:

A bottle of Walker Black to anyone who can programmatically convert a straight polyline segment to one having only one radius, which is less than half the chord.  No, you may not add vertices.


Since a single arc cannot be created between two points with a radius less than half the distance between the two points the answer to the question must lie in a closer examination of the question wording.   It is noted that the word "arc" never appears in the question.   A look at the DXF codes for a "polyline" indicate the possibility that perhaps a solution may be possible if a spline fit was considered but what would that imply about a radius?  Still, no solution in site.  We could then turn to the bottle of Walker Black.  Ah, I think there's where the solution lies!  Consuming the bottle would make all things possible.    Happy holidays!

Lee

lee.minardi
Message 7 of 9

john.uhden
Mentor
Mentor

@Sea-Haven 

You only "don't think?"

John F. Uhden

0 Likes
Message 8 of 9

john.uhden
Mentor
Mentor

@hak_vz 

Thanks, Hak.  I had no idea!

John F. Uhden

Message 9 of 9

john.uhden
Mentor
Mentor

@ronjonp 

Ah, grread.  I've been meaning to add that for decades.

Too bad that Jason Bourne had to extirpate him.

 

John F. Uhden

0 Likes