[vtkusers] Normal vector of the surface of ellipstic cylinder

arwtyxouymz arw.tyx-ouy_mz at ezweb.ne.jp
Fri Jul 28 03:47:26 EDT 2017


Thank you!

So, I should change cylinder creation method from:
2D EllipsePolyData -> extrude 50.0point -> Convert to PolyData

to:
2D EllipsePolyData -> extrude 0.50point -> Convert to PolyData
-> extrude 0.50point -> Convert to PolyData -> .....until reach to 50.0point

Is this right?

I have created this part, but it doesn't work.
please check.

=============================================
// 2D ellipse
    vtkSmartPointer<vtkPolyData> ellipse =
            vtkSmartPointer<vtkPolyData>::New();
    ellipse->GlobalReleaseDataFlagOff();
    ellipse->Allocate(1, 1);
    ellipse->SetPoints(points);
    ellipse->SetLines(lines);

// extrude 0.5point
    vtkSmartPointer<vtkLinearExtrusionFilter> extrude =
            vtkSmartPointer<vtkLinearExtrusionFilter>::New();
    extrude->SetInputData(ellipse);
    extrude->SetExtrusionTypeToNormalExtrusion();
    extrude->SetScaleFactor(1.0);
    extrude->SetVector(0, 0, -0.50);
    extrude->Update();

// convert to polyData
    vtkSmartPointer<vtkPolyData> ellipticCylinder = extrude->GetOutput();

    double dl = 0.5;

// loop until z_length
    while (dl <= z_length)
    {
        extrude->InitializeObjectBase();
        extrude->SetInputData(ellipticCylinder);
        extrude->SetExtrusionTypeToNormalExtrusion();
        extrude->SetScaleFactor(1.0);
        extrude->SetVector(0, 0, -0.50);
        extrude->Update();

        ellipticCylinder = extrude->GetOutput();
        dl += 0.50;
    }
// next connect to polyDataMapper
================================================

please help me!





--
View this message in context: http://vtk.1045678.n5.nabble.com/Normal-vector-of-the-surface-of-ellipstic-cylinder-tp5744171p5744189.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list