Repository: pyvista/pyvista

Issue:
circle creates creates one zero length edge
### Describe the bug, what's wrong, and what you expected.

I expected that:
> circle = pv.Circle(radius, resolution=n)

1. would create a circle with n points and edge. 
It does yay :-) 

3. That each edge of the would have similar length.
It does _not_ :-(

The problems seems circle  closed is doubly:
- once by the coordinates (circle.points[:, 0] == approx(circle.points[:, -1])
- and a second time by the face (circle.faces[0] == [n, 0, 1, 2, ... n-1])





### Steps to reproduce the bug.

```python
import pyvista as pv

circle = pv.Circle(radius=1, resolution=4) # lets make a low res circle
print(circle.faces)  # out: array([4, 0, 1, 2, 3])
print(circle.n_points)  # out: 4

# the print outputs gives the expectation that circle.plot() will look like a square 
circle.plot()
```
![pv.Circle(radius=1, resolution=4).plot()](https://user-images.githubusercontent.com/107837123/207049939-9b24ac31-a8e8-4ca7-97d3-3f4105a524dc.png)




### System Information

```shell
--------------------------------------------------------------------------------
  Date: Mon Dec 12 13:55:16 2022 CET

                OS : Linux
            CPU(s) : 8
           Machine : x86_64
      Architecture : 64bit
       Environment : IPython
       GPU Details : error

  Python 3.10.4 (main, Mar 23 2022, 20:25:24) [GCC 11.3.0]

           pyvista : 0.36.1
               vtk : 9.1.0
             numpy : 1.23.5
           imageio : 2.22.4
           appdirs : 1.4.4
            scooby : 0.7.0
        matplotlib : 3.6.2
         pyvistaqt : 0.9.0
             PyQt5 : Version unknown
           IPython : 8.2.0
             scipy : 1.9.3
--------------------------------------------------------------------------------
```


### Screenshots

_No response_


Discussion:

Patch:
diff --git a/pyvista/utilities/geometric_objects.py b/pyvista/utilities/geometric_objects.py
--- a/pyvista/utilities/geometric_objects.py
+++ b/pyvista/utilities/geometric_objects.py
@@ -1282,15 +1282,22 @@ def Circle(radius=0.5, resolution=100):
     pyvista.PolyData
         Circle mesh.
 
+    Notes
+    -----
+    .. versionchanged:: 0.38.0
+       Prior to version 0.38, this method had incorrect results, producing
+       inconsistent edge lengths and a duplicated point which is now fixed.
+
     Examples
     --------
     >>> import pyvista
     >>> radius = 0.5
     >>> circle = pyvista.Circle(radius)
     >>> circle.plot(show_edges=True, line_width=5)
+
     """
     points = np.zeros((resolution, 3))
-    theta = np.linspace(0.0, 2.0 * np.pi, resolution)
+    theta = np.linspace(0.0, 2.0 * np.pi, resolution, endpoint=False)
     points[:, 0] = radius * np.cos(theta)
     points[:, 1] = radius * np.sin(theta)
     cells = np.array([np.append(np.array([resolution]), np.arange(resolution))])


Test patch:
diff --git a/tests/test_geometric_objects.py b/tests/test_geometric_objects.py
--- a/tests/test_geometric_objects.py
+++ b/tests/test_geometric_objects.py
@@ -275,6 +275,11 @@ def test_circle():
     assert mesh.n_cells
     diameter = np.max(mesh.points[:, 0]) - np.min(mesh.points[:, 0])
     assert np.isclose(diameter, radius * 2.0, rtol=1e-3)
+    line_lengths = np.linalg.norm(
+        np.roll(mesh.points, shift=1, axis=0) - mesh.points,
+        axis=1,
+    )
+    assert np.allclose(line_lengths[0], line_lengths)
 
 
 def test_ellipse():