<?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 Find all the points inside a polyline in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/find-all-the-points-inside-a-polyline/m-p/7129287#M31147</link>
    <description>&lt;P&gt;Hi, I am looking for a way to find all the points inside a polyline, enclosed and not enclosed. Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 05 Jun 2017 14:40:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-06-05T14:40:04Z</dc:date>
    <item>
      <title>Find all the points inside a polyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/find-all-the-points-inside-a-polyline/m-p/7129287#M31147</link>
      <description>&lt;P&gt;Hi, I am looking for a way to find all the points inside a polyline, enclosed and not enclosed. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 14:40:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/find-all-the-points-inside-a-polyline/m-p/7129287#M31147</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-05T14:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Find all the points inside a polyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/find-all-the-points-inside-a-polyline/m-p/7129428#M31148</link>
      <description>&lt;P&gt;Search this discussion group for the keyword "PointContainment"&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 15:24:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/find-all-the-points-inside-a-polyline/m-p/7129428#M31148</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2017-06-05T15:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: Find all the points inside a polyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/find-all-the-points-inside-a-polyline/m-p/7129462#M31149</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4476837"&gt;@ActivistInvestor&lt;/a&gt; (i&lt;SPAN class="short_text"&gt;&lt;SPAN class=""&gt;s it you Tony?&lt;/SPAN&gt;&lt;/SPAN&gt;) said, you'll find some ways to evaluate if a point is inside a polyline from &lt;A href="https://forums.autodesk.com/t5/net/spatial-query-in-autocad-2010/m-p/5304221/highlight/true#M42039" target="_blank"&gt;this thread&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway, if the polyline does not have bulges (i.e., a polygon) you can also try a more trivial way using a polygonal selection.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;        [CommandMethod("TEST")]
        public void Test()
        {
            var doc = Application.DocumentManager.MdiActiveDocument;
            var db = doc.Database;
            var ed = doc.Editor;

            var options = new PromptEntityOptions("\nSelect a polyline: ");
            options.SetRejectMessage("\nSelected object is not a polyline.");
            options.AddAllowedClass(typeof(Polyline), true);
            var result = ed.GetEntity(options);
            if (result.Status != PromptStatus.OK)
                return;

            var polygon = new Point3dCollection();
            var ucs = ed.CurrentUserCoordinateSystem;
            Extents3d extents;
            using (var tr = db.TransactionManager.StartOpenCloseTransaction())
            {
                var pline = (Polyline)tr.GetObject(result.ObjectId, OpenMode.ForRead);
                extents = pline.GeometricExtents;
                for (int i = 0; i &amp;lt; pline.NumberOfVertices; i++)
                {
                    polygon.Add(pline.GetPoint3dAt(i).TransformBy(ucs));
                }
                tr.Commit();
            }

            var filter = new SelectionFilter(new[] { new TypedValue(0, "POINT") });
            dynamic acadApp = Application.AcadApplication;
            acadApp.ZoomWindow(extents.MinPoint.ToArray(), extents.MaxPoint.ToArray());
            var selection = ed.SelectCrossingPolygon(polygon, filter);
            acadApp.ZoomPrevious();
            if (selection.Status == PromptStatus.OK)
                ed.SetImpliedSelection(selection.Value);
        }&lt;/PRE&gt;</description>
      <pubDate>Mon, 05 Jun 2017 15:35:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/find-all-the-points-inside-a-polyline/m-p/7129462#M31149</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2017-06-05T15:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: Find all the points inside a polyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/find-all-the-points-inside-a-polyline/m-p/7130208#M31150</link>
      <description>&lt;P&gt;Thanks _gile!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The link you directed me to worked really well. Code worked very well if I am picking the point manually but in our case we have to find enclosed or intersecting entity inside a enclosed polyline.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Suppose EntA is enclosed structure, EntB is inside or on the border. EntB can be closed or not closed object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead of me selecting a point manually if I can know all the points on EntB I can really use this code. Or if there is any other suggestion you have it is greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 20:45:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/find-all-the-points-inside-a-polyline/m-p/7130208#M31150</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-05T20:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: Find all the points inside a polyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/find-all-the-points-inside-a-polyline/m-p/7130247#M31151</link>
      <description>&lt;P&gt;Did you read / try the code I provided upper?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 20:58:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/find-all-the-points-inside-a-polyline/m-p/7130247#M31151</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2017-06-05T20:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: Find all the points inside a polyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/find-all-the-points-inside-a-polyline/m-p/7130506#M31152</link>
      <description>&lt;P&gt;why not calculate the intersection points of the two entities and then incorporate that into Gilles' code?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 00:13:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/find-all-the-points-inside-a-polyline/m-p/7130506#M31152</guid>
      <dc:creator>BKSpurgeon</dc:creator>
      <dc:date>2017-06-06T00:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Find all the points inside a polyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/find-all-the-points-inside-a-polyline/m-p/7131872#M31153</link>
      <description>&lt;P&gt;Yes I did. My selection is empty. Here's the screen shot.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Selection.PNG" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/364005i35581053C4FD6235/image-size/large?v=v2&amp;amp;px=999" role="button" title="Selection.PNG" alt="Selection.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 13:39:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/find-all-the-points-inside-a-polyline/m-p/7131872#M31153</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-06T13:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: Find all the points inside a polyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/find-all-the-points-inside-a-polyline/m-p/7132111#M31154</link>
      <description>&lt;P&gt;The code I puposed make a filtered selection of the points (DBPoint entities) inside the polyline becaus it was my understanding of your first message.&lt;/P&gt;
&lt;P&gt;If you want to select anothe type of entities, modify the selection filter to suit your needs.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 14:53:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/find-all-the-points-inside-a-polyline/m-p/7132111#M31154</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2017-06-06T14:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: Find all the points inside a polyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/find-all-the-points-inside-a-polyline/m-p/7138263#M31155</link>
      <description>&lt;P&gt;Thank you _gile this discussion was very helpful!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2017 15:24:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/find-all-the-points-inside-a-polyline/m-p/7138263#M31155</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-08T15:24:37Z</dc:date>
    </item>
  </channel>
</rss>

