# Interpolated Curve Issue

**URL:** <https://forum.dynamobim.com/t/interpolated-curve-issue/8974>\
**Category:** Geometry\
**Created:** [January 19, 2017, 8:59am UTC](https://forum.dynamobim.com/t/interpolated-curve-issue/8974 "2017-01-19T08:59:37Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hagani\_Ginting](https://avatars.discourse-cdn.com/v4/letter/h/b4bc9f/32.png) [@Hagani\_Ginting](https://forum.dynamobim.com/u/Hagani_Ginting)\
**Post date:** [January 19, 2017, 8:59am UTC](https://forum.dynamobim.com/t/interpolated-curve-issue/8974/1 "2017-01-19T08:59:37Z")

</div>

Hi Guys,

I’m having a bit of issue here, probably its just a small thing that I missed out (hopefully) but for some reason my set of points on attached image don’t really produce a smooth interpolated curve.  
Any suggestion to solve this issue ?  
[ripple.dyn](https://forum.dynamobim.com/uploads/short-url/eT0CrS1tnJub1FuSi2RF08n98tQ.dyn) (14.9 KB)

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/f/ff146c0b010d1332f9aa7e8ae0f2048add20ce45.PNG)

Many thanks  
Hagani

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [January 19, 2017, 9:30am UTC](https://forum.dynamobim.com/t/interpolated-curve-issue/8974/2 "2017-01-19T09:30:07Z")

</div>

Hi, you can try a _NurbsCurve.ByPoints (points, closeCurve)_ instead. See also here for some basics:  
[http://dynamoprimer.com/en/05\_Geometry-for-Computational-Design/5-4\_curves.html](http://dynamoprimer.com/en/05_Geometry-for-Computational-Design/5-4_curves.html)

---

<div class="post-metadata">

**Author:** ![Petar\_Penchev1](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/petar_penchev1/32/8592_2.png) [@Petar\_Penchev1](https://forum.dynamobim.com/u/Petar_Penchev1)\
**Post date:** [January 19, 2017, 9:44am UTC](https://forum.dynamobim.com/t/interpolated-curve-issue/8974/3 "2017-01-19T09:44:15Z")

</div>

Just change the degree to something larger than 1.  
Here is quick example ( Ive sorted the points first to be shure that 'they are in the right order from the point in red.)

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/e/5ed2214cc8a26172c60e6f1445d644b673ccfa2c.png)

---

<div class="post-metadata">

**Author:** ![Hagani\_Ginting](https://avatars.discourse-cdn.com/v4/letter/h/b4bc9f/32.png) [@Hagani\_Ginting](https://forum.dynamobim.com/u/Hagani_Ginting)\
**Post date:** [January 19, 2017, 9:58am UTC](https://forum.dynamobim.com/t/interpolated-curve-issue/8974/4 "2017-01-19T09:58:01Z")

</div>

@Yna_Db Thanks, it resulted the same weird curve.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/a/2a667cddc2bd0e5eedd8b9152e81484a5c41a685.PNG)

@Petar_Penchev1 Yep the Degree by default was 3 but still it act weird. My list of points has also sorted in correct order.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/1/a1f4e2b9a2fac64805c4e92df00ab689170475cb.PNG)

---

<div class="post-metadata">

**Author:** ![Petar\_Penchev1](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/petar_penchev1/32/8592_2.png) [@Petar\_Penchev1](https://forum.dynamobim.com/u/Petar_Penchev1)\
**Post date:** [January 19, 2017, 10:03am UTC](https://forum.dynamobim.com/t/interpolated-curve-issue/8974/5 "2017-01-19T10:03:15Z")

</div>

That is strange. You can see clearly from the example I’ve posted that evrything goes well. Please upload your script and sample rvt model to be able to investigate where the problem is.

---

<div class="post-metadata">

**Author:** ![Hagani\_Ginting](https://avatars.discourse-cdn.com/v4/letter/h/b4bc9f/32.png) [@Hagani\_Ginting](https://forum.dynamobim.com/u/Hagani_Ginting)\
**Post date:** [January 19, 2017, 10:10am UTC](https://forum.dynamobim.com/t/interpolated-curve-issue/8974/6 "2017-01-19T10:10:49Z")

</div>

@Petar_Penchev1 You can download the script from my first post, the revit file basically just a single model line. Many thanks

---

<div class="post-metadata">

**Author:** ![Petar\_Penchev1](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/petar_penchev1/32/8592_2.png) [@Petar\_Penchev1](https://forum.dynamobim.com/u/Petar_Penchev1)\
**Post date:** [January 19, 2017, 10:47am UTC](https://forum.dynamobim.com/t/interpolated-curve-issue/8974/7 "2017-01-19T10:47:19Z")

</div>

Hi There,

It looks like that the specific of the position of the points are causing the strange behavior of the Nurb node.  
Here is my try on the topic. I’ve amended your script a little bit. Just to try. I’ve set up every second point to offset from the original curve on the normal vector to the curve. You can experiment with the number sliders to see how the nurb curve changes. Hope this helps you understand the nurb curve behavior.

[MyTry.dyn](https://forum.dynamobim.com/uploads/short-url/bsiWrUniVk8KupkB8zwOP5dwHVL.dyn) (13.2 KB)

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/1/910193e7acffb70d5727d28d4a70504cebdba0fb.png)

---

<div class="post-metadata">

**Author:** ![Hagani\_Ginting](https://avatars.discourse-cdn.com/v4/letter/h/b4bc9f/32.png) [@Hagani\_Ginting](https://forum.dynamobim.com/u/Hagani_Ginting)\
**Post date:** [January 19, 2017, 11:06am UTC](https://forum.dynamobim.com/t/interpolated-curve-issue/8974/8 "2017-01-19T11:06:27Z")

</div>

Thanks Petar,

I have just used your script and still it act weird in mine. Probably there’s a problem with my Dynamo. See below picture

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/1/61acea408612f1df93e129df558d126697cb0bfd.PNG)

Cheers

---

<div class="post-metadata">

**Author:** ![Petar\_Penchev1](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/petar_penchev1/32/8592_2.png) [@Petar\_Penchev1](https://forum.dynamobim.com/u/Petar_Penchev1)\
**Post date:** [January 19, 2017, 11:45am UTC](https://forum.dynamobim.com/t/interpolated-curve-issue/8974/9 "2017-01-19T11:45:02Z")

</div>

As I said, Dynamo is working just fine. This is due to the nurb curve geometry behaviour. If there are a lot of points the nurb curve is not smooth. if you decreace the points (like on my screenshot - 20) the curve is smooth. The problem is there are a lot of points very close to each other and the curve can’t be smooth.  
In the script I’ve uploaded you can try and see which is the gratest number of points which gives you smooth curve.

---

<div class="post-metadata">

**Author:** ![Hagani\_Ginting](https://avatars.discourse-cdn.com/v4/letter/h/b4bc9f/32.png) [@Hagani\_Ginting](https://forum.dynamobim.com/u/Hagani_Ginting)\
**Post date:** [January 19, 2017, 11:53am UTC](https://forum.dynamobim.com/t/interpolated-curve-issue/8974/10 "2017-01-19T11:53:19Z")

</div>

Ahh I see, I might need to find another solution using PolyCurve though as I’ll be using more than 50pts which doesn’t really work with NurbsCurve as you mentioned.  
Thanks for helping Petar 🙂

Cheers

---

<div class="post-metadata">

**Author:** ![viktor\_kuzev](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/viktor_kuzev/32/48254_2.png) [@viktor\_kuzev](https://forum.dynamobim.com/u/viktor_kuzev)\
**Post date:** [January 19, 2017, 12:20pm UTC](https://forum.dynamobim.com/t/interpolated-curve-issue/8974/11 "2017-01-19T12:20:27Z")

</div>

This is just the visual representation. The curve is ok, only the displaying is not:

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/c/4c863dd388ac69420eeee0d8a90b265fe5f88cba.png)

---

<div class="post-metadata">

**Author:** ![Petar\_Penchev1](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/petar_penchev1/32/8592_2.png) [@Petar\_Penchev1](https://forum.dynamobim.com/u/Petar_Penchev1)\
**Post date:** [January 19, 2017, 12:45pm UTC](https://forum.dynamobim.com/t/interpolated-curve-issue/8974/12 "2017-01-19T12:45:02Z")

</div>

This was interesting. It is good to know the problem is only in the displaying.  
Of course you can use polycurve fillet options if that suits to your purpose.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/c/ec93bef0c47a2bdb0845291639f82796117d73e1.png)

---

<div class="post-metadata">

**Author:** ![Hagani\_Ginting](https://avatars.discourse-cdn.com/v4/letter/h/b4bc9f/32.png) [@Hagani\_Ginting](https://forum.dynamobim.com/u/Hagani_Ginting)\
**Post date:** [January 20, 2017, 12:59am UTC](https://forum.dynamobim.com/t/interpolated-curve-issue/8974/13 "2017-01-20T00:59:10Z")

</div>

@viktor_kuzev thanks for clarifying this Viktor, didn’t expect that before. I tried with Grasshopper with the same workflow and all good.

@Petar_Penchev1 Thanks mate, guess I will down with NurbsCurve as the polycurve is quite heavy when I have too many points

Cheers
