<?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 CheckInterference - running time too long in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/checkinterference-running-time-too-long/m-p/9031957#M21246</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a function for checking overlapping Solid3D entities. This function works well and it is very accuracy.&lt;/P&gt;&lt;P&gt;But in cases where you need check really lots of entities is there problem with CheckInterference function.&lt;/P&gt;&lt;P&gt;This command takes almost 99 % elapsed time this function and this is problem for me.&lt;/P&gt;&lt;P&gt;Does anybody have experiences with this?... or any advices?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;  public static bool CheckConnectorsOverlap(List connWrap, CoreDatabase data, List currentList)
        {
            try
            {
                List overlapChecker = new List();
                List listOfTransformedEntity = new List();

                var groupResult = connWrap.GroupBy(x =&amp;gt; x.ParentID).Select(y =&amp;gt; y.ToList()).ToList();
                foreach (List entitiesList in groupResult)
                {
                    foreach (EntityWrapper entityWraper in entitiesList)
                    {
                        Solid3d solid3DEntity = (Solid3d)entityWraper.Entity.Clone();
                        for (int i = entityWraper.PartenList.Count - 1; i &amp;gt;= 0; i--)
                        {
                        solid3DEntity.TransformBy(entityWraper.PartenList[i].BlockTransform);
                        }
                        var filterResult = groupResult.Where(x =&amp;gt; x.First().ParentID != entitiesList.First().ParentID);
                        foreach (List subEntitiesList in filterResult)
                        {
                            foreach (EntityWrapper subEntityWraper in subEntitiesList)
                            {
                                Solid3d subSolid3DEntity = (Solid3d)subEntityWraper.Entity.Clone();
                                for (int i = subEntityWraper.PartenList.Count - 1; i &amp;gt;= 0; i--)
                                {
                                    subSolid3DEntity.TransformBy(subEntityWraper.PartenList[i].BlockTransform);
                                }                        
                                try
                                {
                                    if (solid3DEntity.CheckInterference(subSolid3DEntity) == true)
                                    {
                                        if (overlapChecker.Contains($"{entityWraper.ParentID};{subEntityWraper.ParentID}") == false)
                                        {
                                            data.ErrorList.Add($"WARNING:  Connector| { entityWraper.ParentName} X: { Math.Round(solid3DEntity.MassProperties.Centroid.X, 2)} Y: { Math.Round(solid3DEntity.MassProperties.Centroid.Y, 2)} Z:  { Math.Round(solid3DEntity.MassProperties.Centroid.Z, 2)} overlaps Connector: { subEntityWraper.ParentName} X: { Math.Round(subSolid3DEntity.MassProperties.Centroid.X, 2)} Y: {Math.Round(subSolid3DEntity.MassProperties.Centroid.Y, 2)} Z:  { Math.Round(subSolid3DEntity.MassProperties.Centroid.Z, 2)}");
                                            overlapChecker.Add($"{entityWraper.ParentID};{subEntityWraper.ParentID}");
                                            overlapChecker.Add($"{subEntityWraper.ParentID};{entityWraper.ParentID}");
                                        }
                                    }
                                }
                                catch { }                 
                            }
                        }
                    }
                }
                return true;
            }
            catch { return false; }
        }&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="info.png" style="width: 523px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/678455iB44E2BA43D4A0018/image-size/large?v=v2&amp;amp;px=999" role="button" title="info.png" alt="info.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="info2.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/678470iA5AE31E93A6DD115/image-size/large?v=v2&amp;amp;px=999" role="button" title="info2.png" alt="info2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Sep 2019 09:54:14 GMT</pubDate>
    <dc:creator>BestFriendCZ</dc:creator>
    <dc:date>2019-09-18T09:54:14Z</dc:date>
    <item>
      <title>CheckInterference - running time too long</title>
      <link>https://forums.autodesk.com/t5/net-forum/checkinterference-running-time-too-long/m-p/9031957#M21246</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a function for checking overlapping Solid3D entities. This function works well and it is very accuracy.&lt;/P&gt;&lt;P&gt;But in cases where you need check really lots of entities is there problem with CheckInterference function.&lt;/P&gt;&lt;P&gt;This command takes almost 99 % elapsed time this function and this is problem for me.&lt;/P&gt;&lt;P&gt;Does anybody have experiences with this?... or any advices?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;  public static bool CheckConnectorsOverlap(List connWrap, CoreDatabase data, List currentList)
        {
            try
            {
                List overlapChecker = new List();
                List listOfTransformedEntity = new List();

                var groupResult = connWrap.GroupBy(x =&amp;gt; x.ParentID).Select(y =&amp;gt; y.ToList()).ToList();
                foreach (List entitiesList in groupResult)
                {
                    foreach (EntityWrapper entityWraper in entitiesList)
                    {
                        Solid3d solid3DEntity = (Solid3d)entityWraper.Entity.Clone();
                        for (int i = entityWraper.PartenList.Count - 1; i &amp;gt;= 0; i--)
                        {
                        solid3DEntity.TransformBy(entityWraper.PartenList[i].BlockTransform);
                        }
                        var filterResult = groupResult.Where(x =&amp;gt; x.First().ParentID != entitiesList.First().ParentID);
                        foreach (List subEntitiesList in filterResult)
                        {
                            foreach (EntityWrapper subEntityWraper in subEntitiesList)
                            {
                                Solid3d subSolid3DEntity = (Solid3d)subEntityWraper.Entity.Clone();
                                for (int i = subEntityWraper.PartenList.Count - 1; i &amp;gt;= 0; i--)
                                {
                                    subSolid3DEntity.TransformBy(subEntityWraper.PartenList[i].BlockTransform);
                                }                        
                                try
                                {
                                    if (solid3DEntity.CheckInterference(subSolid3DEntity) == true)
                                    {
                                        if (overlapChecker.Contains($"{entityWraper.ParentID};{subEntityWraper.ParentID}") == false)
                                        {
                                            data.ErrorList.Add($"WARNING:  Connector| { entityWraper.ParentName} X: { Math.Round(solid3DEntity.MassProperties.Centroid.X, 2)} Y: { Math.Round(solid3DEntity.MassProperties.Centroid.Y, 2)} Z:  { Math.Round(solid3DEntity.MassProperties.Centroid.Z, 2)} overlaps Connector: { subEntityWraper.ParentName} X: { Math.Round(subSolid3DEntity.MassProperties.Centroid.X, 2)} Y: {Math.Round(subSolid3DEntity.MassProperties.Centroid.Y, 2)} Z:  { Math.Round(subSolid3DEntity.MassProperties.Centroid.Z, 2)}");
                                            overlapChecker.Add($"{entityWraper.ParentID};{subEntityWraper.ParentID}");
                                            overlapChecker.Add($"{subEntityWraper.ParentID};{entityWraper.ParentID}");
                                        }
                                    }
                                }
                                catch { }                 
                            }
                        }
                    }
                }
                return true;
            }
            catch { return false; }
        }&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="info.png" style="width: 523px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/678455iB44E2BA43D4A0018/image-size/large?v=v2&amp;amp;px=999" role="button" title="info.png" alt="info.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="info2.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/678470iA5AE31E93A6DD115/image-size/large?v=v2&amp;amp;px=999" role="button" title="info2.png" alt="info2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2019 09:54:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/checkinterference-running-time-too-long/m-p/9031957#M21246</guid>
      <dc:creator>BestFriendCZ</dc:creator>
      <dc:date>2019-09-18T09:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: CheckInterference - running time too long</title>
      <link>https://forums.autodesk.com/t5/net-forum/checkinterference-running-time-too-long/m-p/9046372#M21247</link>
      <description>&lt;P&gt;Hi&amp;nbsp; BestFriendCZ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is hard to reproduce and judge what the problem is without the context of your application.&lt;/P&gt;
&lt;P&gt;What is in the connWrap?&lt;/P&gt;
&lt;P&gt;Do you check the interference in a drawing?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Nigma&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2019 07:32:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/checkinterference-running-time-too-long/m-p/9046372#M21247</guid>
      <dc:creator>Nigma</dc:creator>
      <dc:date>2019-09-25T07:32:00Z</dc:date>
    </item>
  </channel>
</rss>

