inner edge display for quadric element is not correct for version 9.1

Could any one help me to solve this issue? the attached file is polyData with quadratic quad elements. when i display surface grid with version 9.0, everything is wonderful. but for version 9.1, some edges visibility are not correct. please see below pictures and file for details.

thanks for your kindly help!


testDisplay.vtp

Hi, could you share the code you are using to generate the images above?

1 Like

There is a related issue in case it is needed: https://gitlab.kitware.com/vtk/vtk/-/issues/18440

Dear Cory Quammen and Mathieu Westphal,

thanks for your reply. Below is the sample code i used to test and generate above images.

void testReadPolydata(int argc, char* argv[])
{
    vtkNew<vtkXMLPolyDataReader> reader;
    reader->SetFileName(argv[1]);
    reader->Update();

    auto poly = reader->GetOutput();

    vtkNew<vtkOpenGLPolyDataMapper> mapper;
    mapper->SetInputData(poly);

    vtkNew<vtkActor> actor;
    actor->SetMapper(mapper);
    actor->GetProperty()->SetEdgeVisibility(1);

    vtkNew<vtkRenderer> render;
    render->AddViewProp(actor);

    vtkNew<vtkRenderWindow> window;
    window->AddRenderer(render);

    vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor =
        vtkSmartPointer<vtkRenderWindowInteractor>::New();
    renderWindowInteractor->SetRenderWindow(window);

    renderWindowInteractor->Initialize();


    window->Render();
    renderWindowInteractor->Start();

}

thanks for your kindly help!

Dear Cory Quammen,

this is still a problem in vtk master version. But I found out the key point is VTK_QUADRIC_EDGE in the test polyData. when i remove all quadric lines in the test PolyData, everything seems great! Could you help to solve this problem?

thanks for your help!

I have found the same problem。
If the Cell that is not planar in the actor,the edges by calling SetEdgeVisibility(1) will be in disorder.

By hiding some actors,the wrong edges shown like below.

The newwest master version still has the problem.

1 Like

I couldn’t understand much but I guess the problem is around here:

All lines in yellow color in below figure should be not existed.

The abnormal lines are caused by the cells which are not planar while those cells are drawed by two triangles but not a quadrilateral edges.

Maybe . Thanks for your attention. Waiting for the code check and the revision.

One vtkPolygon type Cell with 4 points was drawn by two triangles .

oneCellByDrawbyTwoTriangle

Edges are wrong in another model whith vtkPolygon type Cells and vtkHexahedron type Cells.

Who can help me?