# CSG GoldFeather using VTK

**URL:** https://discourse.kitware.com/t/csg-goldfeather-using-vtk/1327
**Category:** Uncategorized
**Created:** [July 17, 2024, 10:17am UTC](https://discourse.kitware.com/t/csg-goldfeather-using-vtk/1327 "2024-07-17T10:17:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Coskun](https://discourse.kitware.com/letter_avatar_proxy/v4/letter/c/2bfe46/32.png) [@Coskun](https://discourse.kitware.com/u/Coskun)
#### Post date: [July 17, 2024, 10:17am UTC](https://discourse.kitware.com/t/csg-goldfeather-using-vtk/1327/1 "2024-07-17T10:17:52Z")

</div>

Hi, I am trying to implement the CSG Goldfeather algorithm using VTK. I am following the example from [glt/src/csg/goldlay2.cpp at master · nigels-com/glt · GitHub 1](https://github.com/nigels-com/glt/blob/master/src/csg/goldlay2.cpp). I succeeded in implementing the algorithm using python and direct OpenGL api calls.

However, I am struggling to implement the algorithm in the VTK framework. The problem seems be in this code block [glt/src/csg/goldlay2.cpp at master · nigels-com/glt · GitHub](https://github.com/nigels-com/glt/blob/master/src/csg/goldlay2.cpp#L292-L348). All the code above the highlighted block works the same with and without the VTK framework. After some debugging, I think the problem lines in line 340 and 346.

To be more clear, when I commented lines L292-L348, the VTK (yellow and orange cubes) implementation and the python (yellow cyan cubes) implementation create the same result.

But when I uncomment L292-L348 lines the results look different. VTK (yellow and orange cubes) vs Python (yellow cyan cubes): Normally this lines should nothing change in view when uncommented.

 ![image(1)](https://discourse.kitware.com/uploads/default/original/1X/a101d58f49087a7024c46ca0fde0c18474a6a2bb.png)

To give some more details. I think I need to override mapper and actor classes in order to removed default built-in “glCullFace”, “glDepthMask(GL\_TRUE)” etc settings.

Question is: What could be the reason?

Thank you for your help !
