<?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: Creating a curve that passes through given points in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/creating-a-curve-that-passes-through-given-points/m-p/9132390#M38808</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;a Curve is an (invisible) object in memory, a ModelCurve or DetailCurve is an Element in the Document.&lt;/P&gt;&lt;P&gt;Your HermiteSpline is just a Curve.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See also:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/revit-api-forum/create-3d-model-curve-from-list-lt-xyz-gt-in-project-document/m-p/8976261" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/revit-api-forum/create-3d-model-curve-from-list-lt-xyz-gt-in-project-document/m-p/8976261&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Revitalizer&lt;/P&gt;</description>
    <pubDate>Thu, 07 Nov 2019 08:06:00 GMT</pubDate>
    <dc:creator>Revitalizer</dc:creator>
    <dc:date>2019-11-07T08:06:00Z</dc:date>
    <item>
      <title>Creating a curve that passes through given points</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/creating-a-curve-that-passes-through-given-points/m-p/9132144#M38805</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a list of points (20 points in total) and I want to create a curve that passes through these points in a Revit project. By a little bit of research I found out that there is function NurbSpline.CreateCurve(Points, Weights) that can possibly do this for me. The question is as far as I know, the Spline does not pass through the points and it passes just near the points!. Is there any class or method available that can create a model line (curve) that actually passes through the points?&lt;/P&gt;&lt;P&gt;And another thing, what is that pass in variable "weight" stands for?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help,&lt;/P&gt;&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 04:46:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/creating-a-curve-that-passes-through-given-points/m-p/9132144#M38805</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-07T04:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a curve that passes through given points</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/creating-a-curve-that-passes-through-given-points/m-p/9132255#M38806</link>
      <description>&lt;P&gt;So I tried another method which is pretty simple:&lt;/P&gt;&lt;P&gt;Hspline = HermiteSpline.Create(Points, False)&lt;/P&gt;&lt;P&gt;At first I thought that maybe it is not working because it was not showing me anything in the views. But when I checked the length and other properties for Hspline, they were correct!&amp;nbsp;&lt;/P&gt;&lt;P&gt;In order to see the curve, I placed small spheres along the curve and it seems that the curve has been created correctly but I don't know why its not been shown!&lt;/P&gt;&lt;P&gt;Should I create a model line and how can i do that?&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Points.PNG" style="width: 875px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/695407iBB17937E9EB7654D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Points.PNG" alt="Points.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 06:24:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/creating-a-curve-that-passes-through-given-points/m-p/9132255#M38806</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-07T06:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a curve that passes through given points</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/creating-a-curve-that-passes-through-given-points/m-p/9132369#M38807</link>
      <description>&lt;P&gt;You probably need to adjust your view settings to ensure the curve is visible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That has next to nothing to do with the API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Explore manually through the end user interface how to set up the view correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once you know that, you can probably easily achieve the same programmatically though the API as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a solution that cheats by using very short straight linear line segments instead of a real true smooth curve:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2013/08/generating-a-midcurve-between-two-curve-elements.html" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2013/08/generating-a-midcurve-between-two-curve-elements.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 07:57:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/creating-a-curve-that-passes-through-given-points/m-p/9132369#M38807</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2019-11-07T07:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a curve that passes through given points</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/creating-a-curve-that-passes-through-given-points/m-p/9132390#M38808</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;a Curve is an (invisible) object in memory, a ModelCurve or DetailCurve is an Element in the Document.&lt;/P&gt;&lt;P&gt;Your HermiteSpline is just a Curve.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See also:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/revit-api-forum/create-3d-model-curve-from-list-lt-xyz-gt-in-project-document/m-p/8976261" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/revit-api-forum/create-3d-model-curve-from-list-lt-xyz-gt-in-project-document/m-p/8976261&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Revitalizer&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 08:06:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/creating-a-curve-that-passes-through-given-points/m-p/9132390#M38808</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2019-11-07T08:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a curve that passes through given points</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/creating-a-curve-that-passes-through-given-points/m-p/9137755#M38809</link>
      <description>&lt;P&gt;Thanks so much Jeremy for the response. I will Check the view properties and let you know if that was an issue.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Dave&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Nov 2019 11:08:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/creating-a-curve-that-passes-through-given-points/m-p/9137755#M38809</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-10T11:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a curve that passes through given points</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/creating-a-curve-that-passes-through-given-points/m-p/9137758#M38810</link>
      <description>&lt;P&gt;Hi Revitalizer,&lt;/P&gt;&lt;P&gt;The post that you sent me the link is exactly what I want to do. I will look into it and will send the result in this thread.&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Sun, 10 Nov 2019 11:09:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/creating-a-curve-that-passes-through-given-points/m-p/9137758#M38810</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-10T11:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a curve that passes through given points</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/creating-a-curve-that-passes-through-given-points/m-p/9166398#M38811</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I just wanted to update the status on this thread:&lt;/P&gt;&lt;P&gt;So Previously I wasn't able to create a HermiteSpline using Revit API (it was being created but wasn't visible), it was exactly as Revitalizer mentioned, -HermiteSpline is just a curve which is not visible by itself-, but you can extract whatever you need from this curve (points on the curve, intersection of the curve with different elements, length, and ...)", in order to make it visible we have to create a model curve. Here is a simple code which does that for us (it is in Python):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;plane = Plane.CreateByThreePoints(put three points here which are not on a straight line)&lt;/P&gt;&lt;P&gt;sketchplane = SketchPlane.Create(revitdocument, plane)&lt;/P&gt;&lt;P&gt;hspline = HermiteSpline.Create(you should put a list of points here that the hspline should cross, False)&lt;/P&gt;&lt;P&gt;modelcurve = revitdocument.Create.NewModelCurve(hspline, sketchplane)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please note that this model curve is an Spline which is not splittable, so if you want to split it at some point, I found it easier to create different lists of points and create separate splines (if anyone has any other suggestion, that would be great.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help Revitalizer &amp;amp; Jeremy.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Dave&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2019 22:16:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/creating-a-curve-that-passes-through-given-points/m-p/9166398#M38811</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-25T22:16:56Z</dc:date>
    </item>
  </channel>
</rss>

