# vtkAppendPolyData ?

**URL:** https://discourse.paraview.org/t/vtkappendpolydata/3766
**Category:** ParaView Support
**Created:** [March 6, 2020, 5:44pm UTC](https://discourse.paraview.org/t/vtkappendpolydata/3766 "2020-03-06T17:44:07Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![gujax](https://discourse.paraview.org/user_avatar/discourse.paraview.org/gujax/32/3168_2.png) [@gujax](https://discourse.paraview.org/u/gujax)
#### Post date: [March 6, 2020, 5:44pm UTC](https://discourse.paraview.org/t/vtkappendpolydata/3766/1 "2020-03-06T17:44:07Z")

</div>

Hi  
I am absolutely new to Paraview and only using its Qt-viewer. The solids are being generated by another application (GEANT4).  
So I generated one cone and another hollow cone surrounding the first cone. When I form a union I should see a merged single cone.  
However, when I try to open that wrl file, I get the following error.  
The error is:  
`vtkCompositeDataPipeline (0x61652d0): Input port 0 of algorithm vtkAppendPolyData(0x5064a70) has 0 connections but is not optional.`

I have no idea what to do. I Googled for solutions and looks like there are ways to figure this out using C++ scripts. But is there a way to resolve this on the Paraview viewer that I am using?

Another fact: when I do make a truncated cone, where it is truncated at the apex, then everything works. So looks like union at the apex is failing for whatever reasons.

Any help here is appreciated

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 9, 2020, 3:39am UTC](https://discourse.paraview.org/t/vtkappendpolydata/3766/2 "2020-03-09T03:39:31Z")

</div>

So the .wrl file is generated by GEANT4?

Can you share it here ?  
Do you have other .wrl file that works ?

Here is one that do if that’s helps you.[bot2.wrl](https://discourse.paraview.org/uploads/short-url/r61e2KPgBMhHpqFFPSIYGFmGeO7.wrl) (50.7 KB)

---

<div class="post-metadata">

### Author: ![gujax](https://discourse.paraview.org/user_avatar/discourse.paraview.org/gujax/32/3168_2.png) [@gujax](https://discourse.paraview.org/u/gujax)
#### Post date: [March 9, 2020, 12:50pm UTC](https://discourse.paraview.org/t/vtkappendpolydata/3766/3 "2020-03-09T12:50:33Z")

</div>

Hello Mathieu  
Here is a file that works:  
[g4\_lens\_using\_pairofsolids\_to\_boolean.wrl](https://discourse.paraview.org/uploads/short-url/slopEjpEg6W109uKXQPqM6YF25V.wrl) (65.7 KB)  
For example, part of this is a lens made using 2 pairs of hollow cones. Although the title says ‘boolean’, no booleans were created in this example purposely.  
But I can create boolean of two solids pair wise it works and is similar to this solid i.e., boolean(solidA+solidB =E) and boolean(solidC+solidD=F) shows visually as G=[E;F] i.e., two separate booleans side-by-side.

Here is a file that does NOT work:  
[g4\_unionofbooleans.wrl](https://discourse.paraview.org/uploads/short-url/6i8yfMN3F7dE9xPxLHdiUcnyFAa.wrl) (129 Bytes)  
And this solid is like previous but is made using two pairs (A+B and C+D) to generate two booleans (A+B=E and C+D=F) and then union of these two booleans(E+F=G) to create a final boolean lens (G) very similar to the previous.  
However, this one shows the error I mentioned and I do not see it on the Paraview veiwer.

Thanks for your help.

---

<div class="post-metadata">

### Author: ![gujax](https://discourse.paraview.org/user_avatar/discourse.paraview.org/gujax/32/3168_2.png) [@gujax](https://discourse.paraview.org/u/gujax)
#### Post date: [March 9, 2020, 12:56pm UTC](https://discourse.paraview.org/t/vtkappendpolydata/3766/4 "2020-03-09T12:56:05Z")

</div>

Hello Mathieu  
Can you also explain what is bot2.wrl supposed to be and how it can help me?  
Thank you

---

<div class="post-metadata">

### Author: ![gujax](https://discourse.paraview.org/user_avatar/discourse.paraview.org/gujax/32/3168_2.png) [@gujax](https://discourse.paraview.org/u/gujax)
#### Post date: [March 9, 2020, 8:23pm UTC](https://discourse.paraview.org/t/vtkappendpolydata/3766/5 "2020-03-09T20:23:41Z")

</div>

Hi Matheu  
Yes I am able to visualize bot2.wrl but not sure what does that imply?  
Thanks

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 10, 2020, 4:42am UTC](https://discourse.paraview.org/t/vtkappendpolydata/3766/6 "2020-03-10T04:42:17Z")

</div>

Just an example for a working file.

your non-working file is almost empty and does not contain a geometry :

```
#VRML V2.0 utf8
# Generated by VRML 2.0 driver of GEANT4

#---------- CAMERA
Viewpoint {
  position 0 0 3936.73
}

#End of file.
```

---

<div class="post-metadata">

### Author: ![gujax](https://discourse.paraview.org/user_avatar/discourse.paraview.org/gujax/32/3168_2.png) [@gujax](https://discourse.paraview.org/u/gujax)
#### Post date: [March 10, 2020, 12:21pm UTC](https://discourse.paraview.org/t/vtkappendpolydata/3766/7 "2020-03-10T12:21:40Z")

</div>

Yes correct! Whenever I try to create solids which are boolean of two boolean solids I get nothing - an empty file.  
No idea why? I will explore to see if its a problem with GAMOS or GEANT which generates the solid.  
Thanks

---

<div class="post-metadata">

### Author: ![gujax](https://discourse.paraview.org/user_avatar/discourse.paraview.org/gujax/32/3168_2.png) [@gujax](https://discourse.paraview.org/u/gujax)
#### Post date: [March 10, 2020, 12:22pm UTC](https://discourse.paraview.org/t/vtkappendpolydata/3766/8 "2020-03-10T12:22:48Z")

</div>

BTW, in Paraview UI, is there a way to generate union of two solids. I could create two merged solids but I am not able to create an intersection solid or from them.  
Thanks

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 11, 2020, 2:52am UTC](https://discourse.paraview.org/t/vtkappendpolydata/3766/9 "2020-03-11T02:52:37Z")

</div>

> [@gujax](#):
>
> No idea why?

A bug/missing feature in GEANT most likely.

> BTW, in Paraview UI, is there a way to generate union of two solids. I could create two merged solids but I am not able to create an intersection solid or from them.

There is a filter in VTK called vtkBooleanOperationPolyDataFilter, but it is not exposed in ParaView. You could write a simple XML plugin to expose it.
