# Making a surface using polylines

**URL:** <https://discourse.vtk.org/t/making-a-surface-using-polylines/11536>\
**Category:** Development\
**Tags:** python, code\
**Created:** [May 25, 2023, 10:51am UTC](https://discourse.vtk.org/t/making-a-surface-using-polylines/11536 "2023-05-25T10:51:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sai\_Chaitanya\_Rodda](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sai_chaitanya_rodda/32/7139_2.png) [@Sai\_Chaitanya\_Rodda](https://discourse.vtk.org/u/Sai_Chaitanya_Rodda)\
**Post date:** [May 25, 2023, 10:51am UTC](https://discourse.vtk.org/t/making-a-surface-using-polylines/11536/1 "2023-05-25T10:51:19Z")

</div>

Hello Everyone,

Greetings! I have polylines in my polydata which are curved and kind of parllel to each other as shown in the bottom fig.

 ![image](https://discourse.vtk.org/uploads/default/original/2X/1/149fad6991266f835e93e24ba10466ffbdd6e810.png)

Now, I want to create a surface using the lines which should be like this as shown in the bottom fig.

 ![image](https://discourse.vtk.org/uploads/default/original/2X/f/fed40ff204a19130cfc8a68af6440896d2cd1dc5.jpeg)

The surface you see above is made using vtkRuledSurfaceFilter(). But I am facing some problems with this filter as after I mirror this surface to get second half. I am not able to properly set a opacity to it. and also there are some other problems like it creates some gaps.

Is there any other method other than ruled surface filter to form a surface on polylines?

---

<div class="post-metadata">

**Author:** ![jaswantp](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jaswantp/32/10046_2.png) [@jaswantp](https://discourse.vtk.org/u/jaswantp)\
**Post date:** [May 25, 2023, 7:23pm UTC](https://discourse.vtk.org/t/making-a-surface-using-polylines/11536/2 "2023-05-25T19:23:35Z")

</div>

> after I mirror this surface to get second half. I am not able to properly set a opacity to it.

Do you use another actor to show the second half?

> there are some other problems like it creates some gaps.

Are the gaps between the two halves or within the surface itself?

> Is there any other method other than ruled surface filter to form a surface on polylines?

Have you considered a constrained vtkDelaunay2D using the polylines? Suggesting delaunay because the lines don’t look so crazy. @will.schroeder may have more suggestions.

---

<div class="post-metadata">

**Author:** ![Sai\_Chaitanya\_Rodda](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sai_chaitanya_rodda/32/7139_2.png) [@Sai\_Chaitanya\_Rodda](https://discourse.vtk.org/u/Sai_Chaitanya_Rodda)\
**Post date:** [May 26, 2023, 3:29am UTC](https://discourse.vtk.org/t/making-a-surface-using-polylines/11536/3 "2023-05-26T03:29:48Z")

</div>

Hello Jaswant,

Thank you for your quick response!

> [@jaswantp](#):
>
> Do you use another actor to show the second half?

I didn’t use it but thank you because this did provide a solution to problem. Now I am appending the mirrored polydata with the original polydata and my opacity problems solved. (Also I didn’t use the actor as you suggested because I needed the complete surface to be stored as a vtp file)

> [@jaswantp](#):
>
> Are the gaps between the two halves or within the surface itself?

Don’t mind about the gaps. It is created because of our problem with our data.

> [@jaswantp](#):
>
> Have you considered a constrained vtkDelaunay2D using the polylines? Suggesting delaunay because the lines don’t look so crazy. @will.schroeder may have more suggestions.

I will try and let you know the results. I would have sent a polydata file as a sample but discourse doesn’t allow me since I’m a new user. Sorry!
