# Grading Rules

### Assign a Size Chart Before Grading

Before defining grading rules, a Size Chart must be assigned.

1. Click **Assign/Manage Size Chart** button in the top bar
2. Select the Size Chart you want to use
   * When assigning a **Size Chart Template**, you can enable the **Assign and Edit Template** switch to edit the template directly
3. Click on **Assign** button
4. Activate **Grading mode** (Ctrl/Cmd + G) to start editing rules

{% hint style="info" %}
IMPORTANT: if you have just created a new **Size Chart Template**, you must assign it with this switch enabled in order to define the template grading rules.
{% endhint %}

The Grading Settings panel will open and display:

* The active Size Chart
* The Sample Size defined in the anatomical set

***

### Select a grading point

1. Click a point on the pattern where grading should be applied.\
   Eligible grading points are shown along the edges of pattern pieces.
2. When a point is selected, it appears as an active grading point in the preview.

If multiple points overlap in the same position, selecting one of them will include the entire group.

The **Grade Rule** panel opens and displays:

* The grading point **Name**
* The list of sizes from the assigned Size Chart
* Input fields for **dx** and **dy** values

***

### Grading rules table

* The Sample Size row is always set to `0,0` and cannot be edited.
* Units can be displayed in **mm** or **cm**.
* Changes are saved **automatically** as soon as a value is confirmed by pressing Enter.

#### Enter grading values

* Click a cell in the **dx** or **dy** column and enter a value.
* Press **Enter** or **Tab** to confirm.
* The value is saved immediately and applied to the preview.

Values are applied symmetrically:

* Larger sizes use the entered value
* Smaller sizes use the opposite sign

**Examples**

* Entering `-6` in the **dx** column for a smaller size applies `-6` to all smaller sizes and `6` to all larger sizes.
* Entering `-2` in the **dy** column for a larger size applies `-2` to larger sizes and `2` to smaller sizes.

***

#### Quick column actions

The grading table provides additional shortcuts:

* **Fill column**\
  Press `Shift + Enter` or `Cmd/Ctrl + Enter` to fill the entire column, automatically inverting values beyond the sample size.
* **Invert dx / Invert dy values**\
  Use the column header buttons to reverse the direction of the rule.
* **Reset rules**\
  Reset all values to `0,0`&#x20;
* **Undo / Redo**
  * `Cmd/Ctrl + Z`
  * `Cmd/Ctrl + Shift + Z` (or `Cmd/Ctrl + Y`)

{% hint style="info" %}
The `dd` (diagonal distance) column is informational only and cannot be edited.
{% endhint %}

***

### Editing individual sizes

If some sizes require non-linear or irregular grading:

* Click directly on any size cell
* Enter a custom **dx** or **dy** value

Each cell can be edited independently.

***

### Stack Point (grading anchor)

A Stack Point locks one reference point per piece, making all other grading values relative to it.

* Activate with `Alt + Click` on a point or by using the **Stack Point** button on preview sidebar.
* To limit the stack to a single axis (X or Y):
  * `Cmd/Ctrl + Alt + Click` on the point, or
  * `Cmd/Ctrl + Alt + K` with a point selected.
* Repeat the action on the same point to disable it.

Stacked points are marked with a **STACKED** badge in the left Grade Rule panel.

***

### Copy and paste grading rules

To reuse existing rules:

1. Select the source grading point.
2. Click **Copy**.
3. Select one or more target points.
4. Click **Paste**.

You can also paste selectively:

* Paste only **X** or **Y** values
* Use `Cmd/Ctrl + Alt + V` or `Alt + Click` on the Paste button

Changes are applied immediately.

***

### Directional grading (advanced)

Directional grading lets you edit dx/dy along rotated local axes.

* Activate from the Grade Rule panel header button or press `D` to cycle through:
  * Previous
  * Next
  * Tangent
* The preview shows a visual direction hint.
* Press `Esc` to exit directional mode.

***

### Proportional grading

#### 1. Auto-Interpolation (Single Point)

Location: Grade Rule panel on the left

**Steps**

1. Select the relevant point
2. Click the Route icon at the bottom of the panel, or press Alt + P

The point will be automatically interpolated based on the previous and next points along the contour.

#### 2. Auto-interpolation (all point on a segment)

Location: The right sidebar of the preview:

**Steps**

* Activate with the "Route" icon or `Alt + Y`.
* Select:
  1. A start point
  2. An end point on the same piece

Grading rules are interpolated along the shortest contour path and applied to all encountered points.

* Hold `X` or `Y` to force an axis
* `Alt + X` resets the start point
* `Esc` exits the tool

#### 3. Proportionally (based on start and end points)

Location: Right sidebar of the preview:

**Steps**

1. Activate the tool using the Route icon or Alt + Y
2. Select a start point
3. While holding Shift, click an end point on the same piece
4. Select one or more target points

The grading rules will be applied proportionally to all selected target points.

***

### Grading links (advanced)

Grading Links synchronize grading rules between pieces with matching internal points.

**Steps**

1. Select multiple points on the same piece.
2. Activate **Link pieces** (`Alt + L`).
3. Click the target piece in the preview.

Points are matched by name.

Links can be managed in **Grading Links**:

* Enable / disable
* Show linked points
* Delete links

***

### Navigation While Grading

While Grading mode is active, you can:

* Pan the pattern using Space + drag
* Zoom in and out using the mouse wheel

This helps improve precision when working on dense or highly detailed areas.

***

### Exporting grading data

When generating the .dxf pattern file:

* Enable **Enable grading** to include the `.rul` file in the download.
* A Size Chart must be assigned and a plan with `grading pack` is required.

***

{% hint style="info" %}

#### Important

If a **Size Chart Template** is assigned directly to a pattern, any changes made to the template will be applied to all patterns that use it.

If, instead, the template was assigned as a Local Copy, changes made to the original template will not be propagated to those patterns.

Before editing a Size Chart Template, always check how it has been assigned to avoid unintended changes across multiple patterns.
{% endhint %}
