# how to create a polydata when points(x,y,z) are given.

**URL:** https://discourse.vtk.org/t/how-to-create-a-polydata-when-points-x-y-z-are-given/10387
**Category:** Support
**Created:** [January 5, 2023, 10:51am UTC](https://discourse.vtk.org/t/how-to-create-a-polydata-when-points-x-y-z-are-given/10387 "2023-01-05T10:51:04Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![we\_create](https://discourse.vtk.org/user_avatar/discourse.vtk.org/we_create/32/5917_2.png) [@we\_create](https://discourse.vtk.org/u/we_create)
#### Post date: [January 5, 2023, 10:51am UTC](https://discourse.vtk.org/t/how-to-create-a-polydata-when-points-x-y-z-are-given/10387/1 "2023-01-05T10:51:04Z")

</div>

Hi all,  
can anybody guide me with creating a poly data when x,y,z.  
I have the points in a text format.Do we have predifined class and if there is any can anybody guide me with creating the polydata(a 3d view) with points.

---

<div class="post-metadata">

### Author: ![spyridon97](https://discourse.vtk.org/user_avatar/discourse.vtk.org/spyridon97/32/7069_2.png) [@spyridon97](https://discourse.vtk.org/u/spyridon97)
#### Post date: [January 6, 2023, 8:33am UTC](https://discourse.vtk.org/t/how-to-create-a-polydata-when-points-x-y-z-are-given/10387/2 "2023-01-06T08:33:59Z")

</div>

Check vtkTableToPolyData

---

<div class="post-metadata">

### Author: ![we\_create](https://discourse.vtk.org/user_avatar/discourse.vtk.org/we_create/32/5917_2.png) [@we\_create](https://discourse.vtk.org/u/we_create)
#### Post date: [January 10, 2023, 2:58am UTC](https://discourse.vtk.org/t/how-to-create-a-polydata-when-points-x-y-z-are-given/10387/3 "2023-01-10T02:58:54Z")

</div>

Thank you @spyridon97

---

<div class="post-metadata">

### Author: ![we\_create](https://discourse.vtk.org/user_avatar/discourse.vtk.org/we_create/32/5917_2.png) [@we\_create](https://discourse.vtk.org/u/we_create)
#### Post date: [January 10, 2023, 4:17am UTC](https://discourse.vtk.org/t/how-to-create-a-polydata-when-points-x-y-z-are-given/10387/4 "2023-01-10T04:17:58Z")

</div>

But the problem is i’m giving only point data as input.But in the example they are using a STL reader for reading the probesurface.  
Here I read the file using the delimited text reader(in the vtk examples-DelimitedTextReader).But the problem is that in my input file the data are divided into different sections.  
How to connect those sections and read them and get an output(The output looks like a curve) .  
can anybody plz help me.

---

<div class="post-metadata">

### Author: ![spyridon97](https://discourse.vtk.org/user_avatar/discourse.vtk.org/spyridon97/32/7069_2.png) [@spyridon97](https://discourse.vtk.org/u/spyridon97)
#### Post date: [January 10, 2023, 10:09am UTC](https://discourse.vtk.org/t/how-to-create-a-polydata-when-points-x-y-z-are-given/10387/5 "2023-01-10T10:09:40Z")

</div>

Can you provide an input file and describe how it’s structured and what you are trying to accomplish?

---

<div class="post-metadata">

### Author: ![we\_create](https://discourse.vtk.org/user_avatar/discourse.vtk.org/we_create/32/5917_2.png) [@we\_create](https://discourse.vtk.org/u/we_create)
#### Post date: [January 16, 2023, 8:31am UTC](https://discourse.vtk.org/t/how-to-create-a-polydata-when-points-x-y-z-are-given/10387/6 "2023-01-16T08:31:59Z")

</div>

Sorry for the late reply and thank you @spyridon97.  
The issue is ok now .I used a simple c++ file handler for it.
