<?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 Cannot figure out how the Transform.CreateRotationAtPoint() works! Help in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/cannot-figure-out-how-the-transform-createrotationatpoint-works/m-p/5663052#M72093</link>
    <description>&lt;P&gt;I am trying to take an XYZ point and rotate it 1Pi (180 degrees) around another base point. I think I got the correct method but I cannot figure out how to use it. See image attached&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Base point = XYZ Origin? Is the base point considered the origin? I think so...&lt;/P&gt;
&lt;P&gt;How do I define the AXIS using an XYZ? Does anyone have an image to explain this? I couldn't find any documentation. I want to rotate the point along the XY plane (in plan orientation).&lt;/P&gt;
&lt;P&gt;The angle is in Radians, I got that one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN&gt;Transform&lt;/SPAN&gt; transf &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;Transform&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;CreateRotationAtPoint(new XYZ(Origin.X,Origin.Y,Origin.Z +1), Math.Pi, Origin);&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;transf.whatMethodHereToGetNewXYZLocationOfPoint?&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;Once I get the transform, how do I get the new XYZ location of my rotated point?&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;thanks.&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jun 2015 16:47:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-06-03T16:47:24Z</dc:date>
    <item>
      <title>Cannot figure out how the Transform.CreateRotationAtPoint() works! Help</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/cannot-figure-out-how-the-transform-createrotationatpoint-works/m-p/5663052#M72093</link>
      <description>&lt;P&gt;I am trying to take an XYZ point and rotate it 1Pi (180 degrees) around another base point. I think I got the correct method but I cannot figure out how to use it. See image attached&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Base point = XYZ Origin? Is the base point considered the origin? I think so...&lt;/P&gt;
&lt;P&gt;How do I define the AXIS using an XYZ? Does anyone have an image to explain this? I couldn't find any documentation. I want to rotate the point along the XY plane (in plan orientation).&lt;/P&gt;
&lt;P&gt;The angle is in Radians, I got that one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN&gt;Transform&lt;/SPAN&gt; transf &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;Transform&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;CreateRotationAtPoint(new XYZ(Origin.X,Origin.Y,Origin.Z +1), Math.Pi, Origin);&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;transf.whatMethodHereToGetNewXYZLocationOfPoint?&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;Once I get the transform, how do I get the new XYZ location of my rotated point?&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2015 16:47:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/cannot-figure-out-how-the-transform-createrotationatpoint-works/m-p/5663052#M72093</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-03T16:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot figure out how the Transform.CreateRotationAtPoint() works! Help</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/cannot-figure-out-how-the-transform-createrotationatpoint-works/m-p/5663929#M72094</link>
      <description>&lt;P&gt;Dear Redsky,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="code"&gt;&lt;SPAN class="teal"&gt;Transform&lt;/SPAN&gt;.CreateRotation&lt;/PRE&gt;
&lt;P&gt;creates a rotation transformation given just&amp;nbsp;&lt;SPAN style="line-height: 15px;"&gt;two arguments, the rotation axis and angle.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;CreateRotationAtPoint takes&amp;nbsp;&lt;SPAN style="line-height: 15px;"&gt;three arguments:&amp;nbsp;the axis, rotation angle and base point.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is one short description of how &lt;U&gt;not&lt;/U&gt; to use&amp;nbsp;&lt;SPAN class="s1"&gt;CreateRotationAtPoint &amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2014/02/different-revit-api-aspects-and-features.html#5.2" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2014/02/different-revit-api-aspects-and-features.html#5.2&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To define an axis by an XYZ, simply cnsider the XYZ a vector instead of a point.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your case, to determine the rotation of the point pOld to the result pNew by 180 degrees around the base point base_point in the XY plane, i.e., around the Z axis, you can&amp;nbsp;do this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;  XYZ axis = XYZ.BasisZ;
  double angle = Math.PI;
  Transform t = Transform.CreateRotationAtPoint(
    axis, angle, base_point );
  XYZ pNew = t.OfPoint( pOld );&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2015 07:47:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/cannot-figure-out-how-the-transform-createrotationatpoint-works/m-p/5663929#M72094</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2015-06-04T07:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot figure out how the Transform.CreateRotationAtPoint() works! Help</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/cannot-figure-out-how-the-transform-createrotationatpoint-works/m-p/5664007#M72095</link>
      <description>&lt;P&gt;Added it to The Building Coder:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2015/06/create-duct-pipe-and-point-transform.html#3" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2015/06/create-duct-pipe-and-point-transform.html#3&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2015 09:13:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/cannot-figure-out-how-the-transform-createrotationatpoint-works/m-p/5664007#M72095</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2015-06-04T09:13:27Z</dc:date>
    </item>
  </channel>
</rss>

