looking for lisp to convert arc to polyline that specifies angle and length

looking for lisp to convert arc to polyline that specifies angle and length

jdunne1011
Observer Observer
631 Views
5 Replies
Message 1 of 6

looking for lisp to convert arc to polyline that specifies angle and length

jdunne1011
Observer
Observer

Hi,

I have been searching for lisp routines but i cant find one to suit. I have tried modifying a couple of lisps but i just cant get them to do what i need.

 

If i have an arc i want to be able to convert to line segments at an inputted angle and specify a max. length. if i want to detail a pipe (that is currently drawn as an arc) with joint at *11 degrees with pipe length of *6m (last segment can just join to end)

*These are the numbers I want to be able to specify.

 

I have found a couple of different lisps can either do length specified or angle specified but not both.

 

Any help would be very much appreciated.

 

James

0 Likes
632 Views
5 Replies
Replies (5)
Message 2 of 6

john.uhden
Mentor
Mentor

@jdunne1011 ,

Do you mean you want to replace an arc with a polyline of straight chords?

Perhaps because that way you can control its width?  Or maybe because a wipeout, and an image frame cannot have arced segments?

By length do you mean arc length or chord length?

What do you want to happen if the arc length doesn't provide for even multiples of the individual lengths?

I would probably divide the arc's length by the desired individual lengths and round the number of segments to the nearest integer, then determine the individual lengths by dividing the arc's length by the integer.  Or the same approach can be adapted for using deflection angles.

I have the code for dividing up an arc and replacing it with the polyline I think you are describing.  Mine currently is designed to create chord segments with a maximum mid-ordinate value, but it's adaptable.

It's always nice to know the purpose.  Please explain.

John F. Uhden

0 Likes
Message 3 of 6

Kent1Cooper
Consultant
Consultant

Illustrate, please, before and after.  It sounds like you may have some inherently contradictory requirements, or unachievable ones in some situations.  For example, at some Arc radii a given angle of bend would need a pipe [Polyline segment] length longer than your maximum length, to reach the curve of the Arc again.  Or is the bend angle also only a maximum?  Or do I misunderstand what you mean [hence the request to illustrate]?

Kent Cooper, AIA
0 Likes
Message 4 of 6

jdunne1011
Observer
Observer

basically, i want to convert an arc to a length of pipe and specific angle joint. I am not sure if its possible because there could be contradictory requirements but if the angles can be kept constant and the last segment can be shortened to suit or just joined to end. arcs will not always be 90 degrees. Want to convert blue arc to magenta segments. Thanks

0 Likes
Message 5 of 6

jdunne1011
Observer
Observer

Thanks for the reply. it has do with some standard pipe lengths and elbow joints by manufacturer. Generally angles can be 11.25 degrees or 22.5 degrees (im sure there are other angles available too). but if i can modify lengths to achieve a smoother curve that could help.  I have added a quick drawing in the thread for reference.

 

0 Likes
Message 6 of 6

Sea-Haven
Mentor
Mentor

He refers to a pipe, so if we look at a Concrete pipe 8' or 2.4m is actually a little shorter like 2350mm as it fits inside the next section. You can for a curve using straight pipes displace them by a maximum angle or min radius. Its the same for water pipes etc that have a rubber ring joint that allows this deflection. 

SeaHaven_0-1715132431854.png

 

You can use a method of drawing a forward arc along a pline getting its intersection point, this is end point of a pipe segment. So end result is like this dummy image.

 

SeaHaven_1-1715132723125.png

 

So *11 degrees Maximum with pipe length of *6m it will be a few mm shorter, will have a think about it.

 

A few questions creep in going along a straight the first and last pipe may cut across the true tangent arc point, as a contractor would have to join 2 pipes with a coupler otherwise.

 

A sample dwg would help, with multiple true full length plines straights and arcs, yes have supervised installing curved pipes in road works. Need to confirm 11 degrees. That would match about a 50mm PVC pipe.

SeaHaven_2-1715133414693.png

 

 

0 Likes