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

**URL:** https://discourse.vtk.org/t/inner-edge-display-for-quadric-element-is-not-correct-for-version-9-1/7665
**Category:** Support
**Created:** [January 18, 2022, 10:15am UTC](https://discourse.vtk.org/t/inner-edge-display-for-quadric-element-is-not-correct-for-version-9-1/7665 "2022-01-18T10:15:17Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Jay-Yu](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jay-yu/32/4554_2.png) [@Jay-Yu](https://discourse.vtk.org/u/Jay-Yu)
#### Post date: [January 18, 2022, 10:15am UTC](https://discourse.vtk.org/t/inner-edge-display-for-quadric-element-is-not-correct-for-version-9-1/7665/1 "2022-01-18T10:15:17Z")

</div>

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!

 ![图片](https://discourse.vtk.org/uploads/default/original/2X/4/4e2fede332c0277b35dbbce30de53f10ce79d76b.png)  
 ![图片](https://discourse.vtk.org/uploads/default/original/2X/a/af7040d1127af44c897a38a954e1fc87bafaabae.png)

[testDisplay.vtp](https://discourse.vtk.org/uploads/5a2e8a0fa77065abc71b8cefaf9460e1/testDisplay.vtp)

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/cory.quammen/32/6751_2.png) [@cory.quammen](https://discourse.vtk.org/u/cory.quammen)
#### Post date: [January 18, 2022, 6:35pm UTC](https://discourse.vtk.org/t/inner-edge-display-for-quadric-element-is-not-correct-for-version-9-1/7665/2 "2022-01-18T18:35:38Z")

</div>

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

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [January 18, 2022, 9:50pm UTC](https://discourse.vtk.org/t/inner-edge-display-for-quadric-element-is-not-correct-for-version-9-1/7665/3 "2022-01-18T21:50:01Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Jay-Yu](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jay-yu/32/4554_2.png) [@Jay-Yu](https://discourse.vtk.org/u/Jay-Yu)
#### Post date: [January 19, 2022, 12:55am UTC](https://discourse.vtk.org/t/inner-edge-display-for-quadric-element-is-not-correct-for-version-9-1/7665/4 "2022-01-19T00:55:04Z")

</div>

Dear Cory Quammen and Mathieu Westphal,

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

```auto
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!

---

<div class="post-metadata">

### Author: ![Jay-Yu](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jay-yu/32/4554_2.png) [@Jay-Yu](https://discourse.vtk.org/u/Jay-Yu)
#### Post date: [February 15, 2022, 12:36am UTC](https://discourse.vtk.org/t/inner-edge-display-for-quadric-element-is-not-correct-for-version-9-1/7665/5 "2022-02-15T00:36:51Z")

</div>

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!

 ![图片](https://discourse.vtk.org/uploads/default/original/2X/4/4da5336de733ed881526ff0b8fde70eb43bab0f5.jpeg)

---

<div class="post-metadata">

### Author: ![LexaMark](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lexamark/32/5342_2.png) [@LexaMark](https://discourse.vtk.org/u/LexaMark)
#### Post date: [June 12, 2022, 2:02pm UTC](https://discourse.vtk.org/t/inner-edge-display-for-quadric-element-is-not-correct-for-version-9-1/7665/6 "2022-06-12T14:02:54Z")

</div>

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.

 ![bugEdgeOn](https://discourse.vtk.org/uploads/default/original/2X/1/19b9324f775b36164673abdc5230607e94150ab5.png)

---

<div class="post-metadata">

### Author: ![mau\_igna\_06](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mau_igna_06/32/8064_2.png) [@mau\_igna\_06](https://discourse.vtk.org/u/mau_igna_06)
#### Post date: [June 12, 2022, 4:34pm UTC](https://discourse.vtk.org/t/inner-edge-display-for-quadric-element-is-not-correct-for-version-9-1/7665/7 "2022-06-12T16:34:36Z")

</div>

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

> <https://github.com/Kitware/VTK/blob/461c97954d22f2d300ae6f20e361bb4b9780ed27/Filters/Geometry/vtkDataSetSurfaceFilter.cxx#L1998>

---

<div class="post-metadata">

### Author: ![LexaMark](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lexamark/32/5342_2.png) [@LexaMark](https://discourse.vtk.org/u/LexaMark)
#### Post date: [June 12, 2022, 5:12pm UTC](https://discourse.vtk.org/t/inner-edge-display-for-quadric-element-is-not-correct-for-version-9-1/7665/8 "2022-06-12T17:12:03Z")

</div>

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.

 ![BugEdgeOn2](https://discourse.vtk.org/uploads/default/original/2X/8/853de2df0e2765f9da4b815f4d9549f8478dbcdc.png)

---

<div class="post-metadata">

### Author: ![LexaMark](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lexamark/32/5342_2.png) [@LexaMark](https://discourse.vtk.org/u/LexaMark)
#### Post date: [June 12, 2022, 5:14pm UTC](https://discourse.vtk.org/t/inner-edge-display-for-quadric-element-is-not-correct-for-version-9-1/7665/9 "2022-06-12T17:14:34Z")

</div>

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

---

<div class="post-metadata">

### Author: ![LexaMark](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lexamark/32/5342_2.png) [@LexaMark](https://discourse.vtk.org/u/LexaMark)
#### Post date: [June 13, 2022, 9:10am UTC](https://discourse.vtk.org/t/inner-edge-display-for-quadric-element-is-not-correct-for-version-9-1/7665/10 "2022-06-13T09:10:55Z")

</div>

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

![oneCellByDrawbyTwoTriangle](https://discourse.vtk.org/uploads/default/original/2X/2/27a081c2b21ce5f6a8cd3f3189fa452b78744f6b.png)

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

Who can help me?

 ![AnotherModel](https://discourse.vtk.org/uploads/default/original/2X/8/8269942aa9d05d42fa7a103b714d8a1492d11aa5.png)
