[vtkusers] Why vtkContourFilter makes symmetric polydata asymetric?
Bill Lorensen
bill.lorensen at gmail.com
Tue Dec 5 16:49:43 EST 2017
What about surf?
On Dec 5, 2017 4:13 PM, "alican" <alican1812 at hotmail.com> wrote:
> *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
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20171205/062b32b0/attachment.html>
More information about the vtkusers
mailing list