create_cshape

nrv.utils.geom.create_cshape(center: tuple[float, float] = (0, 0), radius: float | tuple[float, float] = 10, rot: None | float = None, degree: bool = False, diameter: None | float | tuple[float, float] = None, vertices: None | ndarray = None) CShape[source]

generate a CShape from parameters

Parameters:
  • center (tuple[float, float], optional) – Center of the shape, by default (0, 0)

  • radius (float | tuple[float, float], optional) – Radius of the shape, by default 10

  • rot (None | float, optional) – Rotation of the shape, by default None

  • diameter (None | float | tuple[float, float], optional) – Diameter of the shape. If None, radius value is used to define the shape, by default None

  • vertices (None|np.ndarray, optional) – If not none create a polygon with these vertices coordinate, by default None

Return type:

CShape