[vtkusers] Add new vertexes inside 3D structure

Chiranjib Sur sur.chiranjib at gmail.com
Fri Nov 4 15:12:22 EDT 2016


I think the best way to understand and learn is to run the example and then
start tunning parameters in the example code to get a much better feeling
and understanding of the function calls.

I wish I have time to do it and show some cases to you :(

Best wishes. HTH,
Chiranjib

On Fri, Nov 4, 2016 at 2:23 AM, jaki19 <nour_sn at hotmail.fr> wrote:

> the documentations are not very clear for me, I don't understand the result
> where are my polys??
>
>
>
>             vtkSTLReader reader = new vtkSTLReader();
>             reader.SetFileName(path3d);
>
>             reader.Update();
>             vtkPolyData input = new vtkPolyData();
>             input = reader.GetOutput();
>
>             System.out.println("Before subdivision" );
>             System.out.println("-----------------");
>             System.out.print("points: "+input.GetNumberOfPoints() +
> "\n");/---->points: 4500/
>             System.out.print("polys: "+input.GetNumberOfPolys() +
> "\n");/------>polys: 6580/
>             System.out.println("Cells:
> "+input.GetNumberOfCells());/------>Cells: 6580/
>             System.out.println("verts:
> "+input.GetNumberOfVerts());/------>verts: 0/
>             System.out.println("lines:
> "+input.GetNumberOfLines());/------>lines: 0/
>             System.out.println("Strips:
> "+input.GetNumberOfStrips());------>Strips: 0
>             System.out.println("pieces:
> "+input.GetNumberOfPieces());------>pieces: 1
>
>             vtkRandomAttributeGenerator rag =new
> vtkRandomAttributeGenerator();
>             rag.SetInputData(input);
>
>
>             vtkTessellatorFilter tesla= new vtkTessellatorFilter();
>             tesla.SetInputConnection(rag.GetOutputPort());
>             tesla.MergePointsOn();
>             tesla.Update();
>
>             for ( int odim = 1; odim < 4; ++odim )
>             {
>                       tesla.SetOutputDimension( odim );
>                       tesla.Update();
>             }
>
>             tesla.MergePointsOff();
>             tesla.Update();
>
>
>             vtkPolyData subdivised = new vtkPolyData();
>             subdivised.ShallowCopy(tesla.GetOutput());
>
>
>             System.out.println("After Tessellation" );
>             System.out.println("-----------------");
>             System.out.print("points"+subdivised.GetNumberOfPoints() +
> "\n"); ---->points: 19740
>             System.out.print("polys"+subdivised.GetNumberOfPolys() +
> "\n");------>polys:0
>
> System.out.println("Cells"+subdivised.GetNumberOfCells());------>Cells: 0
>
> System.out.println("verts"+subdivised.GetNumberOfVerts());------>verts: 0
>
> System.out.println("lines"+subdivised.GetNumberOfLines());------>lines: 0
>
> System.out.println("Strips"+subdivised.GetNumberOfStrips());------>Strips:
> 0
>
> System.out.println("pieces"+subdivised.GetNumberOfPieces());------>pieces:
> 1
>
>
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.
> com/Add-new-vertexes-inside-3D-structure-tp5741022p5741038.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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/20161105/fd2145af/attachment.html>


More information about the vtkusers mailing list