# Unique node numeration on edges of vtkLagrangeTetra

**URL:** https://discourse.paraview.org/t/unique-node-numeration-on-edges-of-vtklagrangetetra/17242
**Category:** Development
**Created:** [October 13, 2025, 8:28pm UTC](https://discourse.paraview.org/t/unique-node-numeration-on-edges-of-vtklagrangetetra/17242 "2025-10-13T20:28:24Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jeDuck](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/898d66/32.png) [@jeDuck](https://discourse.paraview.org/u/jeDuck)
#### Post date: [October 13, 2025, 8:28pm UTC](https://discourse.paraview.org/t/unique-node-numeration-on-edges-of-vtklagrangetetra/17242/1 "2025-10-13T20:28:24Z")

</div>

Hello!

In most vtkCell types if the function GetEdge() is called, the points on the edge are in such order: first point, then last point, and then the remaining points in sequence. This is not the case for vtkLagrangeTetra, the points are in order from first to last. Why is that?

If I have:

vtkCell\* cell;

auto edge = cell→GetEdge(0);

How can I get the first and last point ids on the edge without any special treatment for specific cell types?

---

<div class="post-metadata">

### Author: ![dcthomp](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dcthomp/32/20_2.png) [@dcthomp](https://discourse.paraview.org/u/dcthomp)
#### Post date: [October 20, 2025, 3:58pm UTC](https://discourse.paraview.org/t/unique-node-numeration-on-edges-of-vtklagrangetetra/17242/2 "2025-10-20T15:58:17Z")

</div>

I can’t speak to the rationale of the ordering (TJ Corona implemented it and has since left Kitware for other pastures). But you should be able to use these methods to transform back and forth between a 3-tuple index and a flat offset of points in connectivity order:

```cpp
  void ToBarycentricIndex(vtkIdType index, vtkIdType* bindex);
  vtkIdType ToIndex(const vtkIdType* bindex);

```

---

<div class="post-metadata">

### Author: ![jeDuck](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/898d66/32.png) [@jeDuck](https://discourse.paraview.org/u/jeDuck)
#### Post date: [October 21, 2025, 2:06pm UTC](https://discourse.paraview.org/t/unique-node-numeration-on-edges-of-vtklagrangetetra/17242/3 "2025-10-21T14:06:58Z")

</div>

I do not have a barycentric index, I solely have an edge local id and I want to be able to get the first and last index of the edges for an arbitrary cell type, is it possible to implement without special treatment for different cell types?

---

<div class="post-metadata">

### Author: ![jeDuck](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/898d66/32.png) [@jeDuck](https://discourse.paraview.org/u/jeDuck)
#### Post date: [October 27, 2025, 6:07pm UTC](https://discourse.paraview.org/t/unique-node-numeration-on-edges-of-vtklagrangetetra/17242/4 "2025-10-27T18:07:33Z")

</div>

This is definitely a bug. I checked and vtkLagrangeTetra returns vtkLagrangeCurve with GetEdge() function. And vtkLagrangeCurve has the usual topology as seen in vtkHigherOrderCurve::PointIndexFromIJK: two corner nodes are first and then the internal nodes. So the topology of the edges is mixed up
