I would like to convert an arc into a line or polyline with the same length. How can I do it, please?
Hi @Anonymous,
Welcome to the Autodesk Community, and thank you for posting your question here in the AutoCAD forum! Try selecting the arc, right click and there should be an option to select "Convert to Polyline". As a warning, I believe this will explode the arc and I am not certain it will be the same length.
If one or more of these posts helped answer your question, please click Accept as Solution on the posts that helped you so others in the community can find them easily.
Hi,
you have first to change your arc to a polyline by PEDIT command then from grip notification convert it to a polyline . also by PEDIT ( Decurve ) option you can get that . click on below image
BTW .. you can convert it to polyline as you can see BUT not with same length !!
Imad Habash
If I understand the question correctly, answer is: without using either lisp or VBA you can't convert an arc directly into a "straight" line or polyline.
By using command "pedit" and selecting the arc, you will have a polyline-arc that will have the exact (to whatever you have your precision set to) same length. If you use the grip-edit option on the polyline arc and select "convert to line" you will get a "straight" polyline equal to the "straight-line" distance between the end-points of the arc.
The total length of arc and polyline-arc will both display in properties window or quick properties (or by using "list" command) if you just need that number to work with.
Does this help? If not, what exactly are you trying to do?
It's not quite clear what you want to do but if you want to:
1. Create a single straight line that has the same length as the arc length of the arc then use the following formula:
L = R * theta
where R is the radius of the arc and theta is the angle, in radians, subtended by the arc. Draw a line of length L and you are all set.
2. If you want to represent an arc by a series of straight line segments where the sum of the lengths of the segments equals the arc length then you may need to do a little math. For example, let's say you wanted to represent a circle with a polyline of 8 segments such that the length of the polyline is the same as the circle. Let's assume that the diameter of the circle is 1.0. Therefore its circumference is pi, 3.14159265...
If we draw a circle (red below) of diameter 1.0 ( r = 0.5) and the use the polygon command to create an 8 sided polygon inscribed in the circle we would get a polyline (cyan) with a length less than the circumference of the circle and the circumscribed circle (yellow) would be too long. To find the radius of a circle where we could construct an 8 sided polygon of length pi we can determine the length of each side of the octagon
S = pi/8 = 0.392699
we can write that
sin(360/16) = S/2 / r
or r = 0.392699/2/sin(22.5°)
r = 0.51208597
The green circle below is this circle and the white line the 8 sided polyline of length 3.14159265.
A similar approach could be taken with an arc although if the number of segments required for the polyline may not enable an exact solution.
;;you could match length instead, good good in 2006, hangs up in 2018???
;by: Paul Turvill (nospam@turvill.com) 2002-05-28
;change object length to match length of any line, arc, polyline or circle
;No error checking, but it works as you describe on most objects. Feel free
;to modify & refine as you see fit.
(defun C:MOL (/ cmde obj len)
(setq cmde (getvar "cmdecho"))
(setvar "cmdecho" 0)
(setq obj (car (entsel "\nSelect object to measure: ")))
(command "_.lengthen" obj "")
(setq len (getvar "perimeter"))
(prompt "\nPick end of line to change: ")
(command "_.lengthen" "_t" len pause "")
(setvar "cmdecho" cmde)
(princ)
)
@Anonymous wrote:
;;you could match length instead, good good in 2006, hangs up in 2018???
....
(command "_.lengthen" obj "")
....
It seems the prompts have changed. Try changing that line to:
(command "_.lengthen" obj nil)
But it didn't seem to me that the OP was looking to match the length of an already-drawn Line/Polyline to that of the Arc, but rather to make a new one matching the Arc's length, whether in addition to or replacing the Arc. I wonder where the Line should be in relation to the Arc, whether it's a new and separate Line or a replacement. @Anonymous , what exactly do you want to do, in greater detail?
Thanks Kent,
That fixed it for 2018!
you made my day.
you are correct, was giving a work around, match arc length to line.
Steve
Can't find what you're looking for? Ask the community or share your knowledge.