<?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 [SOLVED] Rotate placement in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Rotate-placement/m-p/254179#M5490</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;This will be hard to explain, hope it makes sense. &lt;BR /&gt;&lt;BR /&gt;When i place object it has defined x, y, z position. So when i need to place in different angle. For example if i rotate 90° i need y= to be x and x= to be y. It get's even more complicated when i need to rotate 45°. &lt;BR /&gt;So object get's placed in right position when placed in different angle. &lt;BR /&gt;Is there any useful functions to assist this?&lt;/DIV&gt;</description>
    <pubDate>Tue, 01 Aug 2023 11:33:46 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-08-01T11:33:46Z</dc:date>
    <item>
      <title>[SOLVED] Rotate placement</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Rotate-placement/m-p/254179#M5490</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;This will be hard to explain, hope it makes sense. &lt;BR /&gt;&lt;BR /&gt;When i place object it has defined x, y, z position. So when i need to place in different angle. For example if i rotate 90° i need y= to be x and x= to be y. It get's even more complicated when i need to rotate 45°. &lt;BR /&gt;So object get's placed in right position when placed in different angle. &lt;BR /&gt;Is there any useful functions to assist this?&lt;/DIV&gt;</description>
      <pubDate>Tue, 01 Aug 2023 11:33:46 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Rotate-placement/m-p/254179#M5490</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-01T11:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: Rotate placement</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Rotate-placement/m-p/254180#M5491</link>
      <description>Hi, &lt;BR /&gt;
 &lt;BR /&gt;
yes, Geometry module helps with this kind of calculations. &lt;BR /&gt;
You can use TMRotatePoint for example to rotate a point with an angle: 
 &lt;PRE&gt;#include "Point3DData.h" // you need Geometry modul 
 
void RotatePoint (const Vector3D&amp;amp; origo, const Vector3D&amp;amp; axis, double angleDEG, double* x, double* y, double* z) 
{ 
	Geometry::TMRotatePoint (origo.x, origo.y, origo.z, 
								axis.x, axis.y, axis.z, 
								angleDEG * DEGRAD, 
								x, y, z); 
} 
 
// Usage: 
RotatePoint (Vector3D (0.0, 0.0, 0.0), Vector3D (0.0, 0.0, 1.0), 45.0, &amp;amp;x, &amp;amp;y, &amp;amp;z);&lt;/PRE&gt; &lt;BR /&gt;
 &lt;BR /&gt;
This example rotates the coordinates around the Z axis with 45 degrees. &lt;BR /&gt;
 &lt;BR /&gt;
Regards, &lt;BR /&gt;
Tibor</description>
      <pubDate>Wed, 18 Mar 2015 09:30:35 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Rotate-placement/m-p/254180#M5491</guid>
      <dc:creator>Tibor Lorantfy</dc:creator>
      <dc:date>2015-03-18T09:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: Rotate placement</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Rotate-placement/m-p/254181#M5492</link>
      <description>Thanks Tibor. &lt;BR /&gt;
 &lt;BR /&gt;
Couldn't find solution calculated each &amp;gt;0&amp;gt;90&amp;gt;180&amp;gt;360 section coordinates, &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt;, long code... &lt;BR /&gt;
 &lt;BR /&gt;
And this takes just few rows &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt; Thanks. &lt;BR /&gt;
 &lt;BR /&gt;
Will change to this now.</description>
      <pubDate>Wed, 18 Mar 2015 13:31:19 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Rotate-placement/m-p/254181#M5492</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-18T13:31:19Z</dc:date>
    </item>
  </channel>
</rss>

