<?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: Intersection in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/intersection/m-p/5688761#M71856</link>
    <description>&lt;P&gt;Dear JL_Menegotto01,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your query.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do not see any obvious problem with your code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without any additional information or possibility to reproduce the problem, there is not really anything else I can say directly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If all you are after are the intersection points, you might consider using a more light-weight implementation than the Intersect method provided by the Revit API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After all, if your grid lines are just straight lines, and if they are horizontal, this is just a calculation of bounded line segment intersections in the XY plane.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We looked at the topic of unbounded line intersection in the XY plane only recently on The Building Coder, for the exact same use case:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2015/05/connecting-desktop-cloud-lines-and-grid-segments.html#3" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2015/05/connecting-desktop-cloud-lines-and-grid-segments.html#3&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2015/05/geometry-creation-and-line-intersection-exceptions.html#4" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2015/05/geometry-creation-and-line-intersection-exceptions.html#4&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe that will be useful for you as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you wish to resolve your original issue using the Revit API Intersect method, I would suggest submitting a reproducible case for testing:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/about-the-author.html#1b" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/about-the-author.html#1b&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jun 2015 07:07:05 GMT</pubDate>
    <dc:creator>jeremytammik</dc:creator>
    <dc:date>2015-06-23T07:07:05Z</dc:date>
    <item>
      <title>Intersection</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/intersection/m-p/5686772#M71855</link>
      <description>&lt;P&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;I´m using the method below in order to calculate the intersections points in a&amp;nbsp;set of structural grids. &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;The&amp;nbsp;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;grids are divided in a list of horizontal grids (&lt;FONT size="2" face="Consolas"&gt;Eixos[0]) &lt;/FONT&gt;and a list of vertical grids (Eixos[1]), separatly)&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;I put all the intersections in a Lpti.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;It´s working OK with a set of ortogonal grid lines, but when one of the grid lines&amp;nbsp;&lt;SPAN&gt;is not orthogonal&amp;nbsp;the &lt;FONT size="2"&gt;&lt;FONT face="Consolas"&gt;&lt;FONT color="#2b91af"&gt;IntersectionResult&lt;/FONT&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;fails. &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;Thank You &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;public&lt;/FONT&gt; &lt;FONT size="2" face="Consolas" color="#2b91af"&gt;List&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;XYZ&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&amp;gt; Interseccion_Ejes(&lt;/FONT&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;List&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;List&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;Grid&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&amp;gt;&amp;gt; Eixos)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;List&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;XYZ&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&amp;gt; Lpti = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT size="2" face="Consolas" color="#2b91af"&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;List&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;XYZ&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&amp;gt; { };&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;for&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; (&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;int&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; i = 0; i &amp;lt; Eixos[0].Count; i++)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;Curve&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; c1 = Eixos[0].ElementAt(i).Curve;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;for&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; (&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;int&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; j = 0; j &amp;lt; Eixos[1].Count; j++)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;Curve&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; c2 = Eixos[1].ElementAt(j).Curve;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;IntersectionResultArray&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; results;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;SetComparisonResult&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; result = c1.Intersect(c2, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;out&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; results);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;&lt;FONT size="2" face="Consolas" color="#2b91af"&gt;IntersectionResult&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; iResult = results.get_Item(0);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Lpti.Add(iResult.XYZPoint);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;&lt;FONT size="2" face="Consolas" color="#0000ff"&gt;return&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; Lpti;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Jun 2015 18:17:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/intersection/m-p/5686772#M71855</guid>
      <dc:creator>JL_Menegotto01</dc:creator>
      <dc:date>2015-06-21T18:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: Intersection</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/intersection/m-p/5688761#M71856</link>
      <description>&lt;P&gt;Dear JL_Menegotto01,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your query.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do not see any obvious problem with your code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without any additional information or possibility to reproduce the problem, there is not really anything else I can say directly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If all you are after are the intersection points, you might consider using a more light-weight implementation than the Intersect method provided by the Revit API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After all, if your grid lines are just straight lines, and if they are horizontal, this is just a calculation of bounded line segment intersections in the XY plane.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We looked at the topic of unbounded line intersection in the XY plane only recently on The Building Coder, for the exact same use case:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2015/05/connecting-desktop-cloud-lines-and-grid-segments.html#3" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2015/05/connecting-desktop-cloud-lines-and-grid-segments.html#3&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2015/05/geometry-creation-and-line-intersection-exceptions.html#4" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2015/05/geometry-creation-and-line-intersection-exceptions.html#4&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe that will be useful for you as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you wish to resolve your original issue using the Revit API Intersect method, I would suggest submitting a reproducible case for testing:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/about-the-author.html#1b" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/about-the-author.html#1b&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2015 07:07:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/intersection/m-p/5688761#M71856</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2015-06-23T07:07:05Z</dc:date>
    </item>
  </channel>
</rss>

