Court Geometry

The court module defines the dimensions, landmarks, and coordinate system of an official padel court. On this page, we'll dive into the different classes and methods you can use to interact with court geometry programmatically.

The CourtDimensions model

The CourtDimensions dataclass houses the official measurements of the court. All units are expressed in meters.

Properties

  • Name
    length
    Type
    float
    Description

    The total length of the padel court.

  • Name
    width
    Type
    float
    Description

    The total width of the padel court.


The PadelCourt model

The PadelCourt class is the main geometry model. It uses a centralized coordinate system where the origin (0.0, 0.0) is exactly at the center of the court (at the net). The X axis represents the width, and the Y axis represents the length.

Properties

  • Name
    dimensions
    Type
    CourtDimensions
    Description

    An instance of the CourtDimensions class containing the physical measurements.


classmethodPadelCourt.fip_standard()

Standard Initialization

This class method allows you to easily instantiate a PadelCourt using the standard measurements established by the International Padel Federation (FIP).

By default, an FIP court is 20.0m in length and 10.0m in width.

Instantiation

classmethod
fip_standard
from padelkit import PadelCourt

court = PadelCourt.fip_standard()

Output structure

PadelCourt(
  dimensions=CourtDimensions(length=20.0, width=10.0)
)

methodcourt.point()

Get a landmark coordinate

This method allows you to retrieve the exact (x, y) coordinates of a specific standard landmark on the court.

Required arguments

  • Name
    name
    Type
    Landmark | str
    Description

    The name of the landmark. This can be an instance of the Landmark Enum (e.g., Landmark.NET_CENTER) or its string equivalent (e.g., "NET_CENTER").

Usage

method
point
from padelkit import PadelCourt

court = PadelCourt.fip_standard()
net_center = court.point("NET_CENTER")

Output

(0.0, 0.0)

methodcourt.landmarks_2d()

List all landmarks

This method returns a dictionary containing all the standardized 2D positions of the court landmarks. It's useful if you need to draw the court or access multiple points at once.

Usage

method
landmarks_2d
from padelkit import PadelCourt

court = PadelCourt.fip_standard()
all_points = court.landmarks_2d()

Output (abridged)

{
  "CENTER": [0.0, 0.0],
  "NET_LEFT": [-5.0, 0.0],
  "NET_RIGHT": [5.0, 0.0],
  "TOP_LEFT": [-5.0, -10.0],
  "TOP_RIGHT": [5.0, -10.0],
  "BOTTOM_LEFT": [-5.0, 10.0],
  "BOTTOM_RIGHT": [5.0, 10.0]
}

Was this page helpful?