<?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: How Should I Understand 'RebarHookOrientation' at rebar hook. in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/how-should-i-understand-rebarhookorientation-at-rebar-hook/m-p/13688941#M84143</link>
    <description>&lt;P&gt;Your understanding is partially correct. One rebar shape can have multiple segments, for example: an U-shape rebar has 3 segments, an L-shape rebar has 2 segments, etc.. The direction of rebar hook is determined by:&lt;BR /&gt;1. the direction of the start, or the end, segment. This segment direction conforms to the overall rebar direction&lt;BR /&gt;2. the normal vector of the rebar plane. This normal vector can be used to determine the direction to "duplicate" rebar when you switch rebar layout rule from "Single" other rule.&lt;/P&gt;&lt;P&gt;The right vector is the result of cross product of segment direction and normal vector, conforming to the right hand rule. Any hooks on the side of the right vector is considered right-sided, and vice versa.&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can see my answer &lt;A href="https://forums.autodesk.com/t5/revit-api-forum/gethookorientation-how-to-understand-left-right/m-p/13679619#M84109" target="_blank" rel="noopener"&gt;here&lt;/A&gt; for the better explanation.&lt;/P&gt;&lt;P&gt;Depending on whether the normal vector is pointing at your face or pointing away, the hook direction in your images could be right or wrong.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jun 2025 09:51:41 GMT</pubDate>
    <dc:creator>longt61</dc:creator>
    <dc:date>2025-06-19T09:51:41Z</dc:date>
    <item>
      <title>How Should I Understand 'RebarHookOrientation' at rebar hook.</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-should-i-understand-rebarhookorientation-at-rebar-hook/m-p/13678187#M84104</link>
      <description>&lt;P&gt;Hi, I have a question about&amp;nbsp;RebarHookOrientation ar rebar hook.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.revitapidocs.com/2024/e8365754-0811-8d4e-864a-55bf34af3a87.htm" target="_blank" rel="noopener"&gt;https://www.revitapidocs.com/2024/e8365754-0811-8d4e-864a-55bf34af3a87.htm&lt;/A&gt;&lt;BR /&gt;This is docs about&amp;nbsp;RebarHookOrientation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to create freeform rebar using this code;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Rebar newRebar = Rebar.CreateFreeForm(doc, rebarType, host, curveList, out var err);
newRebar.SetHookTypeId(0, startHook.Id);
newRebar.SetHookTypeId(1, endHook.Id);
newRebar.SetHookOrientation(0, RebarHookOrientation.Left);
newRebar.SetHookOrientation(1, RebarHookOrientation.Left);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I understand it, the hook is oriented to the left side relative to the direction of the curve, as shown in the image below.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="qoreodlf37_0-1749713593707.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1542847iDFC77B49A5FF9866/image-size/medium?v=v2&amp;amp;px=400" role="button" title="qoreodlf37_0-1749713593707.png" alt="qoreodlf37_0-1749713593707.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if rebar curve is Arc shape or&amp;nbsp;when the lines are connected,&amp;nbsp;It seems that the hook orientation is not determined by the direction of the line, but rather by the convex part of the rebar shape.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="qoreodlf37_0-1749714893683.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1542856i0C418D67F1814808/image-size/medium?v=v2&amp;amp;px=400" role="button" title="qoreodlf37_0-1749714893683.png" alt="qoreodlf37_0-1749714893683.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Is my understanding of the RebarHookOrientation rule correct?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;If there’s a detailed explanation or documentation available, please share the link.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Thank you all!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jun 2025 07:55:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-should-i-understand-rebarhookorientation-at-rebar-hook/m-p/13678187#M84104</guid>
      <dc:creator>qoreodlf37</dc:creator>
      <dc:date>2025-06-12T07:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: How Should I Understand 'RebarHookOrientation' at rebar hook.</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-should-i-understand-rebarhookorientation-at-rebar-hook/m-p/13688941#M84143</link>
      <description>&lt;P&gt;Your understanding is partially correct. One rebar shape can have multiple segments, for example: an U-shape rebar has 3 segments, an L-shape rebar has 2 segments, etc.. The direction of rebar hook is determined by:&lt;BR /&gt;1. the direction of the start, or the end, segment. This segment direction conforms to the overall rebar direction&lt;BR /&gt;2. the normal vector of the rebar plane. This normal vector can be used to determine the direction to "duplicate" rebar when you switch rebar layout rule from "Single" other rule.&lt;/P&gt;&lt;P&gt;The right vector is the result of cross product of segment direction and normal vector, conforming to the right hand rule. Any hooks on the side of the right vector is considered right-sided, and vice versa.&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can see my answer &lt;A href="https://forums.autodesk.com/t5/revit-api-forum/gethookorientation-how-to-understand-left-right/m-p/13679619#M84109" target="_blank" rel="noopener"&gt;here&lt;/A&gt; for the better explanation.&lt;/P&gt;&lt;P&gt;Depending on whether the normal vector is pointing at your face or pointing away, the hook direction in your images could be right or wrong.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jun 2025 09:51:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-should-i-understand-rebarhookorientation-at-rebar-hook/m-p/13688941#M84143</guid>
      <dc:creator>longt61</dc:creator>
      <dc:date>2025-06-19T09:51:41Z</dc:date>
    </item>
  </channel>
</rss>

