 			current_polygon.vertex[0].x = v1.x; current_polygon.vertex[0].y = v1.y; current_polygon.vertex[0].z = v1.z; current_polygon.vertex[0].w = 1.0;
 			current_polygon.vertex[1].x = v2.x; current_polygon.vertex[1].y = v2.y; current_polygon.vertex[1].z = v2.z; current_polygon.vertex[1].w = 1.0;
 			current_polygon.vertex[2].x = v3.x; current_polygon.vertex[2].y = v3.y; current_polygon.vertex[2].z = v3.z; current_polygon.vertex[2].w = 1.0;
-			//counter++;
+			counter++;
 		}
 		// end debug
 		/*

			cudaMalloc((void**)&dev_facets_nn_, sizeof(index_t) * facet_nb_ * 1);

			//Output result.
			//cudaMalloc((void**)&dev_ret_, sizeof(double) *  facet_nb_ * 10 * 40);
			cudaMalloc((void**)&dev_ret_, sizeof(double) * points_nb_ * 4);
			CheckCUDAError("Allocating device memory");

			//Copy

		has_visited[has_visited_nb++] = to_visit[idx][0];
		
		
		index_t counter = 0;
		while (to_visit_pos){
			index_t current_seed = to_visit[idx][to_visit_pos - 1];
			to_visit_pos--;
