<?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: Cannot get rebar centerline curve using GetCenterlineCurves() in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/cannot-get-rebar-centerline-curve-using-getcenterlinecurves/m-p/10536964#M41029</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Could you please give an example of usage &lt;EM&gt;Rebar.GetShapeDrivenAccessor().GetBarPositionTransform&lt;STRONG&gt;(i) &lt;/STRONG&gt;&lt;/EM&gt;? With &lt;EM&gt;GetBarPositionTransform&lt;/EM&gt; I can get a Transform of each bar in group, but I don't know how to use it to create bars.&lt;/P&gt;&lt;P&gt;I would like to recreate each rebar from given rebar group as a single rebar.&lt;/P&gt;&lt;P&gt;As said in this topic GetCenterlineCurves with index doesn't do anything, all what I get is a list with the same shape of first rebar.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;mp = MultiplanarOption.IncludeOnlyPlanarCurves
rebar = UnwrapElement(IN[0])
n = rebar.NumberOfBarPositions

curves = []
curvesDynamo = []
i = 0
for x in range(n):
	curves.append(rebar.GetCenterlineCurves(False, False, True,mp,i))
	i+=1
for curve in curves:
	for	c in curve:
		curvesDynamo.append(c)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Aug 2021 11:30:39 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-08-11T11:30:39Z</dc:date>
    <item>
      <title>Cannot get rebar centerline curve using GetCenterlineCurves()</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/cannot-get-rebar-centerline-curve-using-getcenterlinecurves/m-p/8910986#M41023</link>
      <description>&lt;P&gt;I am using Revit 2019 API and I want to get the center line curve of the first and the last rebar in a rebar set. When I used the following method:&lt;/P&gt;&lt;P&gt;Rebar.&lt;FONT&gt;GetCenterlineCurves(bool adjustForSelfIntersection, &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bool suppressHooks, &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bool suppressBendRadius,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MultiplanarOption multiplanarOption,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int barPositionIndex);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it seems that the parameter "&lt;FONT&gt;barPositionIndex&lt;/FONT&gt;" has no effect at all. No matter what valid position index of the rebar set I inputted, the curve list I received is the curves of the first bar - the same result of :&lt;/P&gt;&lt;P&gt;RebarShapeDriveAccessor.ComputeDrivingCurve();&lt;/P&gt;&lt;P&gt;How is this possible? Is there anything I missed in the document?&lt;/P&gt;&lt;P&gt;P/s: I found an other way to achieve what I want by translating the first rebar curves along the direction of rebar set though.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 03:33:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/cannot-get-rebar-centerline-curve-using-getcenterlinecurves/m-p/8910986#M41023</guid>
      <dc:creator>longt61</dc:creator>
      <dc:date>2019-07-16T03:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get rebar centerline curve using GetCenterlineCurves()</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/cannot-get-rebar-centerline-curve-using-getcenterlinecurves/m-p/8922463#M41024</link>
      <description>&lt;P&gt;Take a look at the new external command&amp;nbsp;&lt;SPAN&gt;&lt;U&gt;CmdRebarCurves&lt;/U&gt;&amp;nbsp;&lt;/SPAN&gt;in The Building Coder samples:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/jeremytammik/the_building_coder_samples/blob/master/BuildingCoder/BuildingCoder/CmdRebarCurves.cs" target="_blank"&gt;https://github.com/jeremytammik/the_building_coder_samples/blob/master/BuildingCoder/BuildingCoder/CmdRebarCurves.cs&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does it achieve what you need?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If not, please supply a minimal reproducible case demonstrating your problem:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/about-the-author.html#1b" target="_blank"&gt;https://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;Thank you!&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 10:00:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/cannot-get-rebar-centerline-curve-using-getcenterlinecurves/m-p/8922463#M41024</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2019-07-22T10:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get rebar centerline curve using GetCenterlineCurves()</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/cannot-get-rebar-centerline-curve-using-getcenterlinecurves/m-p/8928376#M41025</link>
      <description>&lt;P&gt;Congratulations on solving the problem as described in your post scriptum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In fact, that seems to be the same approach used by&amp;nbsp;CmdRebarCurves.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2019 16:03:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/cannot-get-rebar-centerline-curve-using-getcenterlinecurves/m-p/8928376#M41025</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2019-07-24T16:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get rebar centerline curve using GetCenterlineCurves()</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/cannot-get-rebar-centerline-curve-using-getcenterlinecurves/m-p/8929101#M41026</link>
      <description>&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;Rebar.GetCenterlineCurves(… , &lt;STRONG&gt;&lt;FONT color="#000000"&gt;i&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;)&lt;/EM&gt; will return the curves of the Rebar at the &lt;EM&gt;i-th&lt;/EM&gt; position.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;However, You must distinguish among 3 different cases:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;&lt;EM&gt;Rebar.DistributionType == DistributionType.Uniform.&lt;/EM&gt; &lt;/STRONG&gt;The rebar curves will be equal at all valid positions.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;&lt;EM&gt;Rebar.DistributionType == DistributionType.VaryingLength.&lt;/EM&gt;&lt;/STRONG&gt; According to the rebar constraints, the rebar curves may vary along the distribution path. For example, a set of straight rebar in a triangular slab.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;&lt;EM&gt;Rebar.IsRebarFreeForm() == true.&lt;/EM&gt;&lt;/STRONG&gt; The Rebar curves of FreeFormRebar at each position will be defined by the given constraints but also by the specific RebarUpdateServer to which the Rebar is subscribed, for instance using SurfaceDistribution or AlignedDistribution.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The Rebar curves at each &lt;EM&gt;i-th&amp;nbsp;&lt;/EM&gt;position&amp;nbsp;could vary or not, but in case of non-FreeFormRebar (&lt;EM&gt;Rebar.IsRebarFreeForm() == false&lt;/EM&gt;), you would have to apply the corresponding Transformation in order to obtain the actual location in 3D Space:&amp;nbsp;&lt;EM&gt;Rebar.GetShapeDrivenAccessor().GetBarPositionTransform(&lt;STRONG&gt;i&lt;/STRONG&gt;);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2019 22:25:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/cannot-get-rebar-centerline-curve-using-getcenterlinecurves/m-p/8929101#M41026</guid>
      <dc:creator>manuel.solis.lopez</dc:creator>
      <dc:date>2019-07-24T22:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get rebar centerline curve using GetCenterlineCurves()</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/cannot-get-rebar-centerline-curve-using-getcenterlinecurves/m-p/8929302#M41027</link>
      <description>&lt;P&gt;Thank you for the &lt;FONT&gt;explanation. For more information, I was using Rebar driven by shape and uniform distribution, thus, the shape of rebar is the same for every bar. &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;However, &lt;/FONT&gt;&lt;FONT&gt;I just find it strange and quite confusing that the&amp;nbsp;GetCenterlineCurves() does not return the actual position of the bar but we have to explicitly transform it ourselves without mentioning it in the api documentation. It seems to me if the method return the actual position of the center line, then the barPositionIndex parameter would make more sense.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2019 02:18:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/cannot-get-rebar-centerline-curve-using-getcenterlinecurves/m-p/8929302#M41027</guid>
      <dc:creator>longt61</dc:creator>
      <dc:date>2019-07-25T02:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get rebar centerline curve using GetCenterlineCurves()</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/cannot-get-rebar-centerline-curve-using-getcenterlinecurves/m-p/8929562#M41028</link>
      <description>&lt;P&gt;Thank you very much, Manuel, for the helpful explanation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I preserved this solution for posterity on the blog and added your explanation there as well:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/2019/07/roadmap-rebar-curves-wizard-zip-and-more.html#4" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/2019/07/roadmap-rebar-curves-wizard-zip-and-more.html#4&lt;/A&gt;&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2019 06:30:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/cannot-get-rebar-centerline-curve-using-getcenterlinecurves/m-p/8929562#M41028</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2019-07-25T06:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get rebar centerline curve using GetCenterlineCurves()</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/cannot-get-rebar-centerline-curve-using-getcenterlinecurves/m-p/10536964#M41029</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Could you please give an example of usage &lt;EM&gt;Rebar.GetShapeDrivenAccessor().GetBarPositionTransform&lt;STRONG&gt;(i) &lt;/STRONG&gt;&lt;/EM&gt;? With &lt;EM&gt;GetBarPositionTransform&lt;/EM&gt; I can get a Transform of each bar in group, but I don't know how to use it to create bars.&lt;/P&gt;&lt;P&gt;I would like to recreate each rebar from given rebar group as a single rebar.&lt;/P&gt;&lt;P&gt;As said in this topic GetCenterlineCurves with index doesn't do anything, all what I get is a list with the same shape of first rebar.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;mp = MultiplanarOption.IncludeOnlyPlanarCurves
rebar = UnwrapElement(IN[0])
n = rebar.NumberOfBarPositions

curves = []
curvesDynamo = []
i = 0
for x in range(n):
	curves.append(rebar.GetCenterlineCurves(False, False, True,mp,i))
	i+=1
for curve in curves:
	for	c in curve:
		curvesDynamo.append(c)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Aug 2021 11:30:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/cannot-get-rebar-centerline-curve-using-getcenterlinecurves/m-p/10536964#M41029</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-11T11:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get rebar centerline curve using GetCenterlineCurves()</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/cannot-get-rebar-centerline-curve-using-getcenterlinecurves/m-p/12723848#M41030</link>
      <description>&lt;P&gt;Last year I spent a lot of time trying to get a little Add-in to work. What I wanted is exactly what "Rebar Bending Detail" (introduced at 2024 Revit Release) does. I could extract the centerline curves using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;rebarCurves = (List&amp;lt;Curve&amp;gt;)rebar.GetCenterlineCurves(false,
                                                    false,
                                                    false,
                                         MultiplanarOption.IncludeOnlyPlanarCurves,
                                                    0);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;from &lt;EM&gt;Rebar&lt;/EM&gt;&amp;nbsp;and project it to the &lt;EM&gt;view&lt;/EM&gt; as &lt;I&gt;detail lines&lt;/I&gt;&amp;nbsp;using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Document.ConvertModelToDetailCurves(view, modelCurves);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;mentioned here and Typepad awesome examples. But I never was able to do the same with the most special type of Rebar: Spiral.&lt;/P&gt;&lt;P&gt;Always get a exception: "Curve must be on the plane". I've researched a lot about it until I realize that even draw a Helix using default Revit tools is hard. Seems Revit lack's a lot of usefully "basic" geometric operations. Then I gave up.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now trying the Revit 2024 tool for Bending Details I remembered this work of mine, and I was excited to see how Revit's Team worked in Spiral Rebars bend detail. The answer proved my point: Revit lack's a lot of basic geometric operations. They simple draw a simplified detail using basic lines instead of a projection of the Spiral (as I tried before). For other Rebar seems to be a projection. Simple solution. Works. But exposes the lack of basic operations from API.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2024 00:20:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/cannot-get-rebar-centerline-curve-using-getcenterlinecurves/m-p/12723848#M41030</guid>
      <dc:creator>Mr.Borges</dc:creator>
      <dc:date>2024-04-22T00:20:33Z</dc:date>
    </item>
  </channel>
</rss>

