[vtkusers] Why vtkContourFilter makes symmetric polydata asymetric?

alican alican1812 at hotmail.com
Tue Dec 5 16:12:50 EST 2017


*myPolydata* is fully symmetric, *boundaryPoly *is still so, but
cf->GetOutput() is not. Why?

	vtkSmartPointer<vtkFeatureEdges> featureEdges =
vtkSmartPointer<vtkFeatureEdges>::New();
	featureEdges->SetInputData(*myPolydata*);
	featureEdges->BoundaryEdgesOn();
	featureEdges->FeatureEdgesOff();
	featureEdges->ManifoldEdgesOn();
	featureEdges->NonManifoldEdgesOff();
	featureEdges->Update();

	vtkSmartPointer<vtkStripper> boundaryStrips =
vtkSmartPointer<vtkStripper>::New();
	boundaryStrips->SetInputConnection(featureEdges->GetOutputPort());
	boundaryStrips->SetJoinContiguousSegments(1);
	boundaryStrips->Update();

	// Change the polylines into polygons
	vtkSmartPointer<vtkPolyData> boundaryPoly =
vtkSmartPointer<vtkPolyData>::New();
	boundaryPoly->SetPoints(boundaryStrips->GetOutput()->GetPoints());
	boundaryPoly->SetPolys(boundaryStrips->GetOutput()->GetLines());

	vtkSmartPointer<vtkSurfaceReconstructionFilter> surf =
vtkSmartPointer<vtkSurfaceReconstructionFilter>::New();
	surf->SetInputData(*boundaryPoly*);
	surf->Update();

	vtkSmartPointer<vtkContourFilter> cf =
vtkSmartPointer<vtkContourFilter>::New();
	cf->SetInputConnection(surf->GetOutputPort());
	cf->SetValue(0, 0.1);
	cf->Update();




--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html


More information about the vtkusers mailing list