<?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: Problem find all intersection of Lines! in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/problem-find-all-intersection-of-lines/m-p/9260165#M4859</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/718590i00FE8FE9C1AF00E8/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I 'm using boths vsto 2017 and 2019 versions, I have used many ways but still can not prevent scalar deleting destructor&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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="image.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/718591i5B52CF8B369F28E6/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.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>Sun, 19 Jan 2020 16:39:19 GMT</pubDate>
    <dc:creator>D_D_K</dc:creator>
    <dc:date>2020-01-19T16:39:19Z</dc:date>
    <item>
      <title>Problem find all intersection of Lines!</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/problem-find-all-intersection-of-lines/m-p/9259882#M4856</link>
      <description>&lt;P&gt;Hi, I am trying to create a simple code to find all the intersection points of the lines, but the code was unable to loop next second time, where did I go wrong:&lt;/P&gt;&lt;P&gt;I use 2 arrays: arrPts to hold intersections and arrPts0 to hold all intersections,&amp;nbsp;no duplicate checks&lt;/P&gt;&lt;P&gt;This is my code:&lt;/P&gt;&lt;PRE&gt;ads_name sname;
int&amp;nbsp;isok=acedSSGet(NULL,&amp;nbsp;NULL,&amp;nbsp;NULL,&amp;nbsp;NULL,&amp;nbsp;sname);
if&amp;nbsp;(isok!=&amp;nbsp;RNORM)
        return;
Adesk::Int32&amp;nbsp;length=0;&amp;nbsp;acedSSLength(sname,&amp;nbsp;&amp;amp;length);
AcGePoint3dArray arrPts0;
for&amp;nbsp;(int&amp;nbsp;i&amp;nbsp;=&amp;nbsp;0;&amp;nbsp;i&amp;nbsp;&amp;lt;&amp;nbsp;length-1;&amp;nbsp;i++)&amp;nbsp;{
        //get&amp;nbsp;first&amp;nbsp;entity&amp;nbsp;from&amp;nbsp;ssname -&amp;gt;&amp;nbsp;adsname
        AcDbObjectId&amp;nbsp;id&amp;nbsp;=&amp;nbsp;AcDbObjectId::kNull;&amp;nbsp;ads_name adse;
        acedSSName(sname,&amp;nbsp;i,&amp;nbsp;adse);&lt;BR /&gt;
        //get&amp;nbsp;entity&amp;nbsp;from&amp;nbsp;adsname&amp;nbsp;-&amp;gt;&amp;nbsp;AcDbObjectId&amp;nbsp;-&amp;gt;&amp;nbsp;ent
        AcDbEntity*&amp;nbsp;pEnt;&amp;nbsp;openEntity(adse,&amp;nbsp;id,&amp;nbsp;pEnt,&amp;nbsp;fR); // combine getobjectID+getentity
        
        //loop extant selectionset&amp;nbsp;-&amp;gt;&amp;nbsp;get&amp;nbsp;intersect&amp;nbsp;-&amp;gt;&amp;nbsp;add&amp;nbsp;to&amp;nbsp;array 
        for&amp;nbsp;(int&amp;nbsp;j=++i;j&amp;lt;length;j++)
        {
                AcDbObjectId&amp;nbsp;id1&amp;nbsp;=&amp;nbsp;AcDbObjectId::kNull;&amp;nbsp;ads_name adse1;
                acedSSName(sname,&amp;nbsp;j,&amp;nbsp;adse1);
                AcDbEntity*&amp;nbsp;pEnt1;&amp;nbsp;openEntity(adse1,&amp;nbsp;id1,&amp;nbsp;pEnt1,&amp;nbsp;fR);&lt;BR /&gt;
                //get&amp;nbsp;intersect&amp;nbsp;point 
                AcGePoint3dArray arrPts;
                if&amp;nbsp;(pEnt-&amp;gt;intersectWith(pEnt1,&amp;nbsp;AcDb::kOnBothOperands,&amp;nbsp;arrPts)&amp;nbsp;==&amp;nbsp;Acad::eOk)
                {
                        if&amp;nbsp;(arrPts.length()&amp;nbsp;!=&amp;nbsp;0)
                                {
                                        for&amp;nbsp;(AcGePoint3d&amp;nbsp;pt&amp;nbsp;:&amp;nbsp;arrPts)
                                                arrPts0.append(pt);  ///put all point to this array
                                }
                        pEnt1-&amp;gt;close();
                }
        }
        pEnt-&amp;gt;close();
} //can't loop continue&lt;/PRE&gt;&lt;P&gt;please help me.&lt;/P&gt;&lt;P&gt;Thanks a lot!&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jan 2020 10:20:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/problem-find-all-intersection-of-lines/m-p/9259882#M4856</guid>
      <dc:creator>D_D_K</dc:creator>
      <dc:date>2020-01-19T10:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem find all intersection of Lines!</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/problem-find-all-intersection-of-lines/m-p/9260088#M4857</link>
      <description>&lt;P&gt;I have read this article &lt;A href="https://forums.autodesk.com/t5/objectarx/orms-of-intersectwith/td-p/6975878" target="_blank"&gt;https://forums.autodesk.com/t5/objectarx/orms-of-intersectwith/td-p/6975878&lt;/A&gt; and use &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/481027"&gt;@Alexander.Rivilis&lt;/a&gt; 's code but still get the same error, I am build Vsto2019, Arx2020, Cad2020 and C ++ 1&lt;/P&gt;&lt;P&gt;This is the error I get, it seems to be related to closing point3darray ..., maybe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 724px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/718572i43C18FEBBA3E2162/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jan 2020 14:59:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/problem-find-all-intersection-of-lines/m-p/9260088#M4857</guid>
      <dc:creator>D_D_K</dc:creator>
      <dc:date>2020-01-19T14:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem find all intersection of Lines!</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/problem-find-all-intersection-of-lines/m-p/9260143#M4858</link>
      <description>&lt;P&gt;It is look like you using VS 2019 instead of VS 2017. You can use VS 2019 only if set &lt;STRONG&gt;Platform Toolset&lt;/STRONG&gt; to &lt;STRONG&gt;Visual Studio 2017 (v141):&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2020-01-19_18-14-14.png" style="width: 800px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/718585i21DC49DDF710336F/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020-01-19_18-14-14.png" alt="2020-01-19_18-14-14.png" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jan 2020 16:15:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/problem-find-all-intersection-of-lines/m-p/9260143#M4858</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2020-01-19T16:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problem find all intersection of Lines!</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/problem-find-all-intersection-of-lines/m-p/9260165#M4859</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/718590i00FE8FE9C1AF00E8/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I 'm using boths vsto 2017 and 2019 versions, I have used many ways but still can not prevent scalar deleting destructor&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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="image.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/718591i5B52CF8B369F28E6/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.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>Sun, 19 Jan 2020 16:39:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/problem-find-all-intersection-of-lines/m-p/9260165#M4859</guid>
      <dc:creator>D_D_K</dc:creator>
      <dc:date>2020-01-19T16:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: Problem find all intersection of Lines!</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/problem-find-all-intersection-of-lines/m-p/9260178#M4860</link>
      <description>&lt;P&gt;In your's code pEnt1-&amp;gt;close() called only if pEnt and pEnt1 has intersection, but you have to close in both cases.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jan 2020 16:49:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/problem-find-all-intersection-of-lines/m-p/9260178#M4860</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2020-01-19T16:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problem find all intersection of Lines!</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/problem-find-all-intersection-of-lines/m-p/9260198#M4861</link>
      <description>&lt;P&gt;yes, but i'm speculating that point3darray when breaking out of block {} will free itself memory or something makes ~array&amp;nbsp; function automatically called and break code!&amp;nbsp;&lt;BR /&gt;I tried changing pent.close and pent1.close but the result is constant. But it was just my guess&amp;nbsp;&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="image.png" style="width: 820px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/718594i7F6E6F247B7A32F9/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&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="image.png" style="width: 938px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/718593i1F63BD17920B9A79/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jan 2020 17:08:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/problem-find-all-intersection-of-lines/m-p/9260198#M4861</guid>
      <dc:creator>D_D_K</dc:creator>
      <dc:date>2020-01-19T17:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem find all intersection of Lines!</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/problem-find-all-intersection-of-lines/m-p/9260206#M4862</link>
      <description>&lt;P&gt;Try to build in Release configuration.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jan 2020 17:13:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/problem-find-all-intersection-of-lines/m-p/9260206#M4862</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2020-01-19T17:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem find all intersection of Lines!</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/problem-find-all-intersection-of-lines/m-p/9260388#M4863</link>
      <description>&lt;P&gt;Hi, it sounds a bit strange, I tried changing the variable declaration to&lt;/P&gt;&lt;PRE&gt;AcGePoint3dArray *&lt;SPAN&gt;arrPts0&lt;/SPAN&gt;&amp;nbsp;=&lt;SPAN&gt;new&lt;/SPAN&gt; AcGePoint3dArray; AcGePoint3dArray&amp;nbsp;*&lt;SPAN&gt;arrPts&lt;/SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;SPAN&gt;new&lt;/SPAN&gt; AcGePoint3dArray;&lt;/PRE&gt;&lt;P&gt;then use this for the rest of the code and it worked both on vsto2019 v142.&amp;nbsp;Perhaps this is a temporary solution for me.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&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>Sun, 19 Jan 2020 20:06:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/problem-find-all-intersection-of-lines/m-p/9260388#M4863</guid>
      <dc:creator>D_D_K</dc:creator>
      <dc:date>2020-01-19T20:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem find all intersection of Lines!</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/problem-find-all-intersection-of-lines/m-p/9260400#M4864</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4231883"&gt;@D_D_K&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should not use Platform Toolset v142 with ObjectARX 2020. All problems with memory management is due to using incorrect Platform Toolset.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jan 2020 20:18:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/problem-find-all-intersection-of-lines/m-p/9260400#M4864</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2020-01-19T20:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problem find all intersection of Lines!</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/problem-find-all-intersection-of-lines/m-p/9260865#M4865</link>
      <description>&lt;P&gt;thanks for your suggestion, so I will keep 2017 .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2020 06:26:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/problem-find-all-intersection-of-lines/m-p/9260865#M4865</guid>
      <dc:creator>D_D_K</dc:creator>
      <dc:date>2020-01-20T06:26:32Z</dc:date>
    </item>
  </channel>
</rss>

