# Cascade appanding -TopoDS\_Shape- to -vtkAppendPolyData- or -vtkCleanPolyData- or simply convert -TopoDS\_Shape- to -vtkPolyData- NOT WORKING

**URL:** https://discourse.vtk.org/t/cascade-appanding-topods-shape-to-vtkappendpolydata-or-vtkcleanpolydata-or-simply-convert-topods-shape-to-vtkpolydata-not-working/7967
**Category:** Support
**Tags:** training
**Created:** [March 3, 2022, 12:21pm UTC](https://discourse.vtk.org/t/cascade-appanding-topods-shape-to-vtkappendpolydata-or-vtkcleanpolydata-or-simply-convert-topods-shape-to-vtkpolydata-not-working/7967 "2022-03-03T12:21:13Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![anon41080341](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/a/ea5d25/32.png) [@anon41080341](https://discourse.vtk.org/u/anon41080341)
#### Post date: [March 9, 2022, 11:39am UTC](https://discourse.vtk.org/t/cascade-appanding-topods-shape-to-vtkappendpolydata-or-vtkcleanpolydata-or-simply-convert-topods-shape-to-vtkpolydata-not-working/7967/3 "2022-03-09T11:39:10Z")

</div>

Dear @mwestphal  
1)please check out my new post about the Latest OpenCascade YouTube. 🙏  
[https://discourse.vtk.org/t/lesson-17-1-point-membership-classification-with-opencascade-vtk/8009](https://discourse.vtk.org/t/lesson-17-1-point-membership-classification-with-opencascade-vtk/8009)

If you will look inside, you will notice, I represent a Cone with old AIS OCC BRepPrimAPI\_MakeCone.  
Wich will be represented as TopoDS\_Shape.

2)Is there no simple conversion so that i can insert a TopoDS\_Shape in the next lines. 🙄

gp\_Ax2 sphere\_origin(gp\_Pnt(0, 0, 0), gp\_Dir(0, 0, 1));  
BRepPrimAPI\_MakeCone mkCone(sphere\_origin, 1.0,0.01,1);  
const TopoDS\_Shape& TopoDS\_ShapemkConeTMP = mkCone.Shape();  
TopoDS\_Shape TopoDS\_ShapeCONE = static\_cast\<TopoDS\_Shape\>(TopoDS\_ShapemkConeTMP);

//VTKplane  
vtkNew VTKplane;  
VTKplane-\>SetOrigin(0, 0, 0);  
VTKplane-\>SetNormal(0, 0, 1);

// Create cutter  
vtkNew cutter;  
cutter-\>SetCutFunction(VTKplane);  
cutter-\>SetInputConnection(VTKsphere-\>GetOutputPort()); // PUT TopoDS\_ShapeCONE instead!!  
cutter-\>Update();

Of Course, my Goul is to be able to put TopoDS\_ShapeIGES, In this code.  
But , the mesh is also represented in TopoDS\_Shape. So the question remains the same.

Thank you as always. for the time and effort 🙏

---

_[View the full topic](https://discourse.vtk.org/t/cascade-appanding-topods-shape-to-vtkappendpolydata-or-vtkcleanpolydata-or-simply-convert-topods-shape-to-vtkpolydata-not-working/7967)._
