shapes.arc#

shapes.arc(angle=90.0, radius=1.0, center=(0.0, 0.0, 0.0), div=10, eltype='line2')#

Create a polygonal arc in the xy-plane.

Parameters#

anglefloat, optional

Sector angle subtended by the arc, in degrees. Default is 90.0.

radiusfloat, optional

Radius of the arc. Default is 1.0.

centerarray_like of shape (3,), optional

Coordinates of the circle center. Default is (0.0, 0.0, 0.0).

divint, optional

Number of elements (subdivisions) in the arc. Default is 10.

eltype{“line2”, “tri3”}, optional

Element type of the mesh to return:

  • “line2”: return the arc contour as 2-node line elements.

  • “tri3”: return a filled arc sector with 3-node triangular elements, connecting the contour to the center.

Returns#

Mesh

A mesh with the requested element type.

Examples#

>>> A1 = arc(angle=180, radius=1.0, div=4)
>>> print(A1)
Mesh: n_nodes: 5, n_elems: 4, plexitude: 2, level: 1, eltype: line2
  BBox: [-1.  0.  0.], [1. 1. 0.]
  Size: [2. 1. 0.]
  Length: 3.061
>>> print(A1.coords)
[[ 1.      0.      0.    ]
 [ 0.7071  0.7071  0.    ]
 [ 0.      1.      0.    ]
 [-0.7071  0.7071  0.    ]
 [-1.      0.      0.    ]]

Filled arc sector:

>>> A2 = arc(angle=180, radius=1.0, div=4, eltype='tri3')
>>> print(A2)
Mesh: n_nodes: 6, n_elems: 4, plexitude: 3, level: 2, eltype: tri3
  BBox: [-1.  0.  0.], [1. 1. 0.]
  Size: [2. 1. 0.]
  Length: 5.061  Area: 1.414