<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Small Segmented Polyline to One Arc in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/small-segmented-polyline-to-one-arc/m-p/12296063#M82466</link>
    <description>&lt;P&gt;Your Lisp solved many big problems that I had.&lt;BR /&gt;Thank you very much.&lt;BR /&gt;I hope you the best.&lt;/P&gt;</description>
    <pubDate>Tue, 10 Oct 2023 11:52:19 GMT</pubDate>
    <dc:creator>Mahdigoli2021</dc:creator>
    <dc:date>2023-10-10T11:52:19Z</dc:date>
    <item>
      <title>Small Segmented Polyline to One Arc</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/small-segmented-polyline-to-one-arc/m-p/10160064#M82461</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;How can convert segmented polyline to polyline Arc..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please check below image&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.png" style="width: 733px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/893795i7CA03BC56A6E6DFC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 09:04:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/small-segmented-polyline-to-one-arc/m-p/10160064#M82461</guid>
      <dc:creator>shil143</dc:creator>
      <dc:date>2021-03-16T09:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: Small Segmented Polyline to One Arc</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/small-segmented-polyline-to-one-arc/m-p/10160103#M82462</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Usually&amp;nbsp;&lt;SPAN&gt;you can just select the given polyline (to show grips) and in the given segment hover over its middle grip. After a while&amp;nbsp;&lt;/SPAN&gt;&lt;ACRONYM class="term" title="Glossary:
AutoCAD - a general 2D/3D CAD application by Autodesk; world's most used CAD program; platform for add-on applications (see www.autodesk.com/autocad)"&gt;AutoCAD&lt;/ACRONYM&gt;&lt;SPAN&gt;&amp;nbsp;displays a context menu with the command "Convert to arc" (or vice-versa "Convert to line") . But for your case we need to see ( CAD dwg file ) your segmented polyline for testing ?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 09:32:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/small-segmented-polyline-to-one-arc/m-p/10160103#M82462</guid>
      <dc:creator>imadHabash</dc:creator>
      <dc:date>2021-03-16T09:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: Small Segmented Polyline to One Arc</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/small-segmented-polyline-to-one-arc/m-p/10160131#M82463</link>
      <description>&lt;P&gt;Sample Drawing&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 09:42:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/small-segmented-polyline-to-one-arc/m-p/10160131#M82463</guid>
      <dc:creator>shil143</dc:creator>
      <dc:date>2021-03-16T09:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Small Segmented Polyline to One Arc</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/small-segmented-polyline-to-one-arc/m-p/10160173#M82464</link>
      <description>&lt;P&gt;This LISP will convert segmented ARCs or CIRCLEs to their respective original.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;BUT NOT&lt;/STRONG&gt;&lt;/FONT&gt; polylines that are a combination of arcs and straight lines. You'll need to explode them and rejoin just arc portions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(vl-load-com)

(defun c:PLS2Arc ( / s i e d) ; Polyline Segmented To Arc or Circle

  (if (setq s (ssget "_:L" '((0 . "LWPOLYLINE") (-4 . "&amp;gt;") (90 . 2))))
    (repeat (setq i (sslength s))
      (setq e (ssname s (setq i (1- i)))
	    d (entget e))
      (if (or (= 1 (logand (cdr (assoc 70 d)) 1))
	      (equal (vlax-curve-getstartpoint e) (vlax-curve-getendpoint e) 1e-14))
	(command "_.circle" "_3p"
		 "_none" (vlax-curve-getstartpoint e)
		 "_none" (vlax-curve-getpointatparam e 1)
		 "_none" (vlax-curve-getpointatparam e 2))
	(command "_.arc"
		 "_non" (trans (vlax-curve-getstartpoint e) 0 1)
		 "_non" (trans (vlax-curve-getpointatparam e 1) 0 1)
		 "_non" (trans (vlax-curve-getendpoint e) 0 1)))
      (entmod (append (entget (entlast)) (list (assoc 8 d))))
      (entdel e)))
  (princ)
  )
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 10:02:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/small-segmented-polyline-to-one-arc/m-p/10160173#M82464</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2021-03-16T10:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: Small Segmented Polyline to One Arc</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/small-segmented-polyline-to-one-arc/m-p/10160428#M82465</link>
      <description>&lt;P&gt;If there might be small inaccuracies in the original Polyline, I would suggest an adjustment.&amp;nbsp; Here, the white is a regular 36-gon, &lt;EM&gt;except&lt;/EM&gt; that I moved the start/end point [where the red dot is] only &lt;STRONG&gt;&lt;EM&gt;1/2 of 1%&lt;/EM&gt;&lt;/STRONG&gt; of the diameter inboard:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kent1Cooper_0-1615893827521.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/893849i03C2F8DB1CAB1C3B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kent1Cooper_0-1615893827521.png" alt="Kent1Cooper_0-1615893827521.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;On the left, the yellow Circle is the result of using the &lt;EM&gt;first three vertices&lt;/EM&gt; for a 3-point Circle.&amp;nbsp; My suggestion is to instead use the starting vertex, &lt;EM&gt;one about 1/3 of the way around, and one about 2/3 of the way around&lt;/EM&gt;.&amp;nbsp; That gives the blue Circle on the right, which is much closer to the polygon original that you can sort of see under it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For a &lt;EM&gt;closed&lt;/EM&gt; polygon that you want to change to a Circle, that approach is used in the &lt;FONT color="#000000"&gt;&lt;STRONG&gt;Pg2C&lt;/STRONG&gt;&lt;/FONT&gt; command, &lt;A href="https://forums.autodesk.com/t5/autocad-forum/convert-polyline-circle-made-of-many-short-line-segments-to/m-p/9789009/highlight/true#M1032652" target="_blank" rel="noopener"&gt;&amp;gt;here&amp;lt;&lt;/A&gt;.&amp;nbsp; [That allows multiple-polygon selection; see Message 3 there for a &lt;EM&gt;single&lt;/EM&gt;-polygon-selection version.]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Similarly, for the &lt;EM&gt;Arc&lt;/EM&gt; conversion I would recommend, for the &lt;EM&gt;second&lt;/EM&gt; point, a vertex that is &lt;EM&gt;not&lt;/EM&gt; the second one, but one about &lt;FONT color="#0000FF"&gt;halfway along&lt;/FONT&gt;:&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;&amp;nbsp; "_non" (trans (vlax-curve-getpointatparam e &lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;(/ (cdr (assoc 90 d)) 2)&lt;/FONT&gt;&lt;/STRONG&gt;) 0 1)&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 11:44:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/small-segmented-polyline-to-one-arc/m-p/10160428#M82465</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2021-03-16T11:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Small Segmented Polyline to One Arc</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/small-segmented-polyline-to-one-arc/m-p/12296063#M82466</link>
      <description>&lt;P&gt;Your Lisp solved many big problems that I had.&lt;BR /&gt;Thank you very much.&lt;BR /&gt;I hope you the best.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 11:52:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/small-segmented-polyline-to-one-arc/m-p/12296063#M82466</guid>
      <dc:creator>Mahdigoli2021</dc:creator>
      <dc:date>2023-10-10T11:52:19Z</dc:date>
    </item>
  </channel>
</rss>

