# Add curve in polilyne 3d with dynamo

**URL:** <https://forum.dynamobim.com/t/add-curve-in-polilyne-3d-with-dynamo/57264>\
**Category:** Civil 3D\
**Created:** [November 14, 2020, 6:32pm UTC](https://forum.dynamobim.com/t/add-curve-in-polilyne-3d-with-dynamo/57264 "2020-11-14T18:32:48Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![dr.hybride](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@dr.hybride](https://forum.dynamobim.com/u/dr.hybride)\
**Post date:** [November 14, 2020, 6:32pm UTC](https://forum.dynamobim.com/t/add-curve-in-polilyne-3d-with-dynamo/57264/1 "2020-11-14T18:32:49Z")

</div>

hello guys

i have a 3D polyligne that i got points from this polyligne by dynamo (see the first picture), now i want to realize curves with these points, (see the second picture red line on Z plan ). is it possible ?

thank you for you help

!

 ![getpointonpolilygn_2020-11-14_07-12-29](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/8/188c6c61cc27c269725fc5c7f3bdb486d3123e1e.png)  
 ![test](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/c/1cf406fd4fd36fe6d3ae33950426d24563b006eb.png)

---

<div class="post-metadata">

**Author:** ![Daan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/daan/32/82246_2.png) [@Daan](https://forum.dynamobim.com/u/Daan)\
**Post date:** [November 14, 2020, 6:56pm UTC](https://forum.dynamobim.com/t/add-curve-in-polilyne-3d-with-dynamo/57264/2 "2020-11-14T18:56:52Z")

</div>

hi @dr.hybride,

This is very well possible with Dynamo!  
Could you maybe in depth explain how you want these curves to look? What are the input parameters for these curves?

If you want a straight line you can use the **Line.ByStartandEndpoint** node.

Regards,  
Daan

---

<div class="post-metadata">

**Author:** ![dr.hybride](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@dr.hybride](https://forum.dynamobim.com/u/dr.hybride)\
**Post date:** [November 14, 2020, 7:48pm UTC](https://forum.dynamobim.com/t/add-curve-in-polilyne-3d-with-dynamo/57264/3 "2020-11-14T19:48:33Z")

</div>

thank you for you help

attached an other picture for more explanations. for help to creat this curve or line i can to creat a line with known lenght at the middle of two points, but i dont know how?

 ![curves](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/3/23885c36d8afc71625c6ca8f10e3641eca0608cb.png)

---

<div class="post-metadata">

**Author:** ![Daan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/daan/32/82246_2.png) [@Daan](https://forum.dynamobim.com/u/Daan)\
**Post date:** [November 15, 2020, 1:20pm UTC](https://forum.dynamobim.com/t/add-curve-in-polilyne-3d-with-dynamo/57264/4 "2020-11-15T13:20:29Z")

</div>

Hi @dr.hybride,

You could create a local coordinatesystem at the 0.5 parameter of each line and then place a point at the left or right at the desired distance, now you have for each curve a startpoint, midpoint and endpoint and you can create an arc by three points 🙂

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [November 15, 2020, 5:28pm UTC](https://forum.dynamobim.com/t/add-curve-in-polilyne-3d-with-dynamo/57264/5 "2020-11-15T17:28:51Z")

</div>

Assuming you have the curves from the polyline in Dynamo already:

1. Polycurve.Curves
2. Curve.PointAtParameter where the curves are the curve input, set to @L1, and the parameter is a list defined as 0, 0.4, and 1 (a code block of 0…1…#3 will work).
3. Geometry.Translate to move the sublists of points by the desired distances down. Distances should be three values in a list, woth the first and last number being the same (ie: `[0,3,0];`). Be sure to set both lists to @L2 so that things move correctly.
4. Use an Arc.ByBestFit node to draw the arc.

---

<div class="post-metadata">

**Author:** ![dr.hybride](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@dr.hybride](https://forum.dynamobim.com/u/dr.hybride)\
**Post date:** [November 16, 2020, 8:14pm UTC](https://forum.dynamobim.com/t/add-curve-in-polilyne-3d-with-dynamo/57264/6 "2020-11-16T20:14:05Z")

</div>

thank you very much but i am bloked for placing the point left or right at the desired distance, attached the pitcure where i stopped , how is called the node ?  
thank you

 ![getpointonpolilygn_2020-11-16_08-58-59](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/7/b7c0d6aea5d555f3f20e752ebf1ef729753f67b0.png)

---

<div class="post-metadata">

**Author:** ![mzjensen](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@mzjensen](https://forum.dynamobim.com/u/mzjensen)\
**Post date:** [November 16, 2020, 8:27pm UTC](https://forum.dynamobim.com/t/add-curve-in-polilyne-3d-with-dynamo/57264/7 "2020-11-16T20:27:11Z")

</div>

@dr.hybride is this what you are looking for?

![Arcs](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/f/eff1712f7575bf631aa4f99b345d70f097676c6a.gif)

---

<div class="post-metadata">

**Author:** ![dr.hybride](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@dr.hybride](https://forum.dynamobim.com/u/dr.hybride)\
**Post date:** [November 17, 2020, 10:03am UTC](https://forum.dynamobim.com/t/add-curve-in-polilyne-3d-with-dynamo/57264/8 "2020-11-17T10:03:51Z")

</div>

yes, very good job thank you very much,  
can you take a picture of whole dynamo screen please ?  
just an other question, can we change independently the diameter’s curve ? it will be perfect.

---

<div class="post-metadata">

**Author:** ![Daan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/daan/32/82246_2.png) [@Daan](https://forum.dynamobim.com/u/Daan)\
**Post date:** [November 17, 2020, 1:49pm UTC](https://forum.dynamobim.com/t/add-curve-in-polilyne-3d-with-dynamo/57264/9 "2020-11-17T13:49:44Z")

</div>

@dr.hybride,

You could input a list of distances for the offset distance

---

<div class="post-metadata">

**Author:** ![mzjensen](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@mzjensen](https://forum.dynamobim.com/u/mzjensen)\
**Post date:** [November 17, 2020, 3:55pm UTC](https://forum.dynamobim.com/t/add-curve-in-polilyne-3d-with-dynamo/57264/10 "2020-11-17T15:55:11Z")

</div>

@dr.hybride here is the script.

[Arcs.dyn](https://forum.dynamobim.com/uploads/short-url/fOp0uHwpOtgepbWthydURafetfI.dyn) (23.5 KB)

---

<div class="post-metadata">

**Author:** ![dr.hybride](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@dr.hybride](https://forum.dynamobim.com/u/dr.hybride)\
**Post date:** [November 17, 2020, 6:47pm UTC](https://forum.dynamobim.com/t/add-curve-in-polilyne-3d-with-dynamo/57264/11 "2020-11-17T18:47:44Z")

</div>

i don’t know how much i can thank you.  
it’s perfect  
just a other question,can we change independently the diameter’s curve?

---

<div class="post-metadata">

**Author:** ![mzjensen](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@mzjensen](https://forum.dynamobim.com/u/mzjensen)\
**Post date:** [November 17, 2020, 7:05pm UTC](https://forum.dynamobim.com/t/add-curve-in-polilyne-3d-with-dynamo/57264/12 "2020-11-17T19:05:20Z")

</div>

Do this.

> [@Daan](#):
>
> You could input a list of distances for the offset distance

So instead of a single number slider for the _Point.ByCartesianCoordinates_ node, create a list of diameters that you want. The list will need to have the same number of indices as the number of arcs you are creating. So if you have 2 arcs and want to have diameters of 5 and 10, then it would be a simple code block with this:

`[5,10];`

That’s just one approach - there are many ways to make a list of numbers 🙂

---

<div class="post-metadata">

**Author:** ![dr.hybride](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@dr.hybride](https://forum.dynamobim.com/u/dr.hybride)\
**Post date:** [November 20, 2020, 9:03pm UTC](https://forum.dynamobim.com/t/add-curve-in-polilyne-3d-with-dynamo/57264/13 "2020-11-20T21:03:13Z")

</div>

thank you very much  
you are the best.
