Closed bluelightning32 closed 5 years ago
Please send me your meshes as .vtk
I applied this diff to save the vtk files:
diff --git a/colors.cxx b/colors.cxx
index d826524..da194df 100644
--- a/colors.cxx
+++ b/colors.cxx
@@ -5,6 +5,7 @@
#include <vtkCylinderSource.h>
#include <vtkRotationalExtrusionFilter.h>
#include <vtkPolyDataNormals.h>
+#include <vtkPolyDataWriter.h>
#include <vtkRegularPolygonSource.h>
#include <vtkTransform.h>
#include <vtkTransformFilter.h>
@@ -93,7 +94,17 @@ vtkSmartPointer<vtkAlgorithm> GenerateShape() {
auto cyl_color = Color(cyl, 1, 1, 0);
- return Union(spring, spring2, cyl_color);
+ auto vtk_writer = vtkSmartPointer<vtkPolyDataWriter>::New();
+ vtk_writer->SetInputConnection(spring->GetOutputPort());
+ vtk_writer->SetFileName("spring.vtk");
+ vtk_writer->Write();
+
+ vtk_writer = vtkSmartPointer<vtkPolyDataWriter>::New();
+ vtk_writer->SetInputConnection(cyl_color->GetOutputPort());
+ vtk_writer->SetFileName("cylinder.vtk");
+ vtk_writer->Write();
+
+ return Union(spring, cyl_color);
}
int main(int argc, char *argv[]) {
I have analysed it. The exceptions are only present when using the old release. I have revised the Simplify-function a few days ago. The head-version works fine with your meshes.
Thanks! I can confirm it works now.
This program seems to produce the correct output, but vtkPolyDataBooleanFilter spamming the console with warnings:
Please add a flag to disable these warnings.