<?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: c++ I want to get the intersection of intersecting walls. Is there a sample file? in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/c-I-want-to-get-the-intersection-of-intersecting-walls-Is-there/m-p/386213#M927</link>
    <description>&lt;P&gt;I changed this code to place windows at intersections. So you don't have to answer this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to have permission to delete unanswered questions. ^^&lt;/P&gt;</description>
    <pubDate>Tue, 04 Jul 2023 11:25:31 GMT</pubDate>
    <dc:creator>LeeJaeYoung</dc:creator>
    <dc:date>2023-07-04T11:25:31Z</dc:date>
    <item>
      <title>c++ I want to get the intersection of intersecting walls. Is there a sample file?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/c-I-want-to-get-the-intersection-of-intersecting-walls-Is-there/m-p/386182#M926</link>
      <description>&lt;P&gt;I want to get the intersection of intersecting walls.&lt;BR /&gt;Is there a sample file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Should I solve it with a code I can find on Google?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ex)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="autosourcing-stub-extra"&gt;&lt;LI-CODE lang="markup"&gt;bool IntersectionLine(Vector2 A1, Vector2 A2, Vector2 B1, Vector2 B2, Vector2 &amp;amp; result)  {

    double t;

    double s;

    double under = (B2.y - B1.y)*(A2.x - A1.x) - (B2.x - B1.x)*(A2.y - A1.y);



    if (under == 0) return false;

    double _t = (B2.x - B1.x)*(A1.y - B1.y) - (B2.y - B1.y)*(A1.x - B1.x);

    double _s = (A2.x - A1.x)*(A1.y - B1.y) - (A2.y - A1.y)*(A1.x - B1.x);



    t = _t / under;

    s = _s / under;

    if (t&amp;lt;0.0 || t&amp;gt;1.0 || s&amp;lt;0.0 || s&amp;gt;1.0) return false;

    if (_t == 0 &amp;amp;&amp;amp; _s == 0) return false;

    result.x = (int)(A1.x + t * (double)(A2.x - A1.x));

    result.y = (int)(A1.y + t * (double)(A2.y - A1.y));

    return true;

}

&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 19:33:33 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/c-I-want-to-get-the-intersection-of-intersecting-walls-Is-there/m-p/386182#M926</guid>
      <dc:creator>LeeJaeYoung</dc:creator>
      <dc:date>2023-07-10T19:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: c++ I want to get the intersection of intersecting walls. Is there a sample file?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/c-I-want-to-get-the-intersection-of-intersecting-walls-Is-there/m-p/386213#M927</link>
      <description>&lt;P&gt;I changed this code to place windows at intersections. So you don't have to answer this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to have permission to delete unanswered questions. ^^&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 11:25:31 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/c-I-want-to-get-the-intersection-of-intersecting-walls-Is-there/m-p/386213#M927</guid>
      <dc:creator>LeeJaeYoung</dc:creator>
      <dc:date>2023-07-04T11:25:31Z</dc:date>
    </item>
  </channel>
</rss>

