Sunday, 28 June 2026

Marker Efficiency as an Applied 2D Irregular Nesting Optimization Problem




In garment manufacturing, fabric is one of the largest cost components. A small improvement in fabric utilisation can reduce cost, improve margin and reduce cutting-room waste. This is why marker planning is not merely a drafting activity. It is also an applied optimization problem.

Marker efficiency is usually taught as a simple percentage, but behind that percentage lies a difficult geometric problem. The cutting room has to arrange many garment pattern pieces on a fixed-width fabric surface so that the unused area is as low as possible. Since garment pieces are irregular in shape, the problem is closely related to the two-dimensional irregular nesting or irregular strip-packing problem.

In simple words, the question is:

How can all required garment pattern pieces be placed on a fabric marker of fixed width so that the total marker length and fabric waste are minimized?

Table of Contents


Visual 1: Marker efficiency as an optimization problem — pattern pieces, fixed fabric width, marker length and unused area.

1. What Is Marker Efficiency?

Marker efficiency measures how much of the marker area is actually occupied by garment pattern pieces. It is normally expressed as:

\[ \text{Marker Efficiency} = \frac{\text{Total area occupied by pattern pieces}}{\text{Total marker area}} \times 100 \]

If the total area of all pattern pieces is \(A\), the usable fabric width is \(W\), and the marker length is \(L\), then:

\[ \eta = \frac{A}{W \times L} \times 100 \]

where \(\eta\) is marker efficiency. The total pattern area may also be written as:

\[ A = \sum_{i=1}^{n} A_i \]

Here, \(A_i\) is the area of pattern piece \(i\), and \(n\) is the number of pattern pieces placed in the marker.

For a given garment, the total pattern area is mostly fixed. For a given fabric, the usable width is also mostly fixed. Therefore, improving marker efficiency usually means reducing marker length:

\[ \min L \]

This is the basic mathematical reason why marker planning can be treated as an optimization problem.

2. Why Marker Making Is an Optimization Problem

A marker is not only a drawing of pattern pieces. It is a placement plan. It decides where each front, back, sleeve, collar, cuff, pocket or waistband piece will lie on the fabric before cutting.

If garment pieces were simple rectangles, marker planning would be easier. But garment pieces are usually irregular shapes. They have curves, slopes, armholes, neck drops, sleeve caps, tapered sides and other non-rectangular boundaries. This makes the placement problem difficult.

A good marker tries to use the empty spaces between pieces intelligently. A small piece may fit into the hollow left by a larger piece. Two curved edges may be placed near each other to reduce waste. One arrangement may create long unused gaps, while another arrangement may reduce the marker length.

Thus, marker efficiency is not just about adding areas. It is about arranging shapes.

3. Marker Making as a 2D Irregular Nesting Problem

In operations research, this type of problem is close to the two-dimensional irregular nesting problem. In this problem, irregular shapes must be placed inside a rectangular strip. The strip has a fixed width and an adjustable length. The objective is to minimize the used length.

In garment terms, the strip is the marker. The fixed width is the usable fabric width. The irregular shapes are garment pattern pieces. The objective is to reduce marker length and improve marker efficiency.

The non-overlap condition can be written as:

\[ P_i \cap P_j = \varnothing \quad \forall i \neq j \]

This means that two pattern pieces should not overlap.

Each piece must also remain inside the marker boundary:

\[ P_i \subseteq [0,W] \times [0,L] \]

So the simplified optimization problem becomes:

\[ \min L \]

subject to:

\[ P_i \cap P_j = \varnothing \]

\[ P_i \subseteq [0,W] \times [0,L] \]

In words, place all pieces inside the usable fabric width without overlap, and make the marker as short as possible.

4. Real Garment Constraints

The simplified mathematical problem is useful for understanding the logic. However, real garment markers must obey additional textile and production constraints.

Constraint Meaning in Marker Planning Effect on Efficiency
Grainline Pieces must usually follow the warp direction or a specified angle. Reduces free rotation and may increase waste.
Nap direction Pile, brushed, shaded or directional fabrics may need one-way placement. Prevents reverse placement of pieces.
Print or check matching Stripes, checks, borders or engineered prints may need visual alignment. Can force additional spacing or special placement.
Size ratio The marker may need pieces for several sizes in a fixed ratio. Changes the mix and number of pieces in the marker.
Pairing Left and right components may need controlled flipping or pairing. Limits some placements that look efficient geometrically.
Cutting allowance Small gaps may be needed for cutting accuracy and blade movement. Prevents unrealistically tight packing.

Visual 2: 2D irregular nesting — irregular garment pieces placed inside a fixed-width marker without overlap.

5. A Simple Python Example

The following Python example explains marker efficiency as a simplified 2D nesting problem. Instead of using true CAD pattern pieces, it uses small binary grids. In these grids, the number 1 represents the occupied part of a garment piece, while 0 represents empty space inside the bounding box.

This is a simplified teaching model. It is not a replacement for professional marker-making CAD software. However, it clearly demonstrates the logic of placing irregular shapes inside a fixed-width marker.

from typing import List, Tuple


def rotate_mask(mask):
    """
    Rotate a binary pattern-piece mask by 90 degrees clockwise.
    """
    return [list(row) for row in zip(*mask[::-1])]


def mask_size(mask):
    """
    Return width and height of a binary mask.
    """
    return len(mask[0]), len(mask)


def mask_area(mask):
    """
    Count occupied cells in a binary mask.
    """
    return sum(sum(row) for row in mask)


def ensure_height(grid, height, fabric_width):
    """
    Extend the marker grid vertically when required.
    """
    while len(grid) < height:
        grid.append([0] * fabric_width)


def can_place(grid, mask, x, y, fabric_width):
    """
    Check whether a piece can be placed at position (x, y)
    without crossing fabric width or overlapping existing pieces.
    """
    piece_width, piece_height = mask_size(mask)

    if x + piece_width > fabric_width:
        return False

    ensure_height(grid, y + piece_height, fabric_width)

    for row in range(piece_height):
        for col in range(piece_width):
            if mask[row][col] == 1 and grid[y + row][x + col] != 0:
                return False

    return True


def place_piece(grid, mask, x, y, piece_id):
    """
    Place a piece on the marker grid.
    """
    piece_width, piece_height = mask_size(mask)

    for row in range(piece_height):
        for col in range(piece_width):
            if mask[row][col] == 1:
                grid[y + row][x + col] = piece_id


def used_marker_length(grid):
    """
    Find the used marker length.
    """
    last_used_row = -1

    for row_index, row in enumerate(grid):
        if any(cell != 0 for cell in row):
            last_used_row = row_index

    return last_used_row + 1


def render_marker(grid):
    """
    Print the marker layout.
    Dots represent unused fabric.
    Numbers represent different pattern pieces.
    """
    length = used_marker_length(grid)

    for row in grid[:length]:
        print("".join("." if cell == 0 else str(cell) for cell in row))


def bottom_left_marker(pieces, fabric_width, allow_rotation=True):
    """
    A simple bottom-left marker-making heuristic.

    Larger pieces are placed first.
    Each piece is placed at the lowest and leftmost feasible position.
    """

    pieces = sorted(
        pieces,
        key=lambda piece: mask_area(piece["mask"]),
        reverse=True
    )

    grid = []
    placements = []

    for piece_id, piece in enumerate(pieces, start=1):

        possible_orientations = [(piece["mask"], 0)]

        if allow_rotation:
            rotated = rotate_mask(piece["mask"])
            if rotated != piece["mask"]:
                possible_orientations.append((rotated, 90))

        best_position = None
        max_search_height = 100

        for y in range(max_search_height):
            for x in range(fabric_width):
                for oriented_mask, angle in possible_orientations:
                    if can_place(grid, oriented_mask, x, y, fabric_width):
                        best_position = (x, y, oriented_mask, angle)
                        break

                if best_position is not None:
                    break

            if best_position is not None:
                break

        if best_position is None:
            raise RuntimeError(f"Could not place piece: {piece['name']}")

        x, y, selected_mask, angle = best_position

        ensure_height(
            grid,
            y + mask_size(selected_mask)[1],
            fabric_width
        )

        place_piece(grid, selected_mask, x, y, piece_id)

        placements.append({
            "id": piece_id,
            "name": piece["name"],
            "x": x,
            "y": y,
            "rotation": angle,
            "area": mask_area(selected_mask),
            "size": mask_size(selected_mask)
        })

    total_piece_area = sum(item["area"] for item in placements)
    marker_length = used_marker_length(grid)
    marker_area = fabric_width * marker_length
    marker_efficiency = (total_piece_area / marker_area) * 100

    return grid, placements, marker_length, marker_efficiency

Now let us define a small example. Assume a simple garment has six pattern pieces: front panel, back panel, sleeve, collar, cuff and pocket. The usable fabric width is assumed to be 10 grid units.

pieces = [
    {
        "name": "front panel",
        "mask": [
            [1, 1, 1, 0],
            [1, 1, 1, 1],
            [1, 1, 1, 0],
        ]
    },
    {
        "name": "back panel",
        "mask": [
            [0, 1, 1, 1],
            [1, 1, 1, 1],
            [0, 1, 1, 1],
        ]
    },
    {
        "name": "sleeve",
        "mask": [
            [1, 1, 0],
            [1, 1, 1],
        ]
    },
    {
        "name": "collar",
        "mask": [
            [1, 1, 1],
        ]
    },
    {
        "name": "cuff",
        "mask": [
            [1, 1],
            [1, 0],
        ]
    },
    {
        "name": "pocket",
        "mask": [
            [1, 1],
            [1, 1],
        ]
    },
]

fabric_width = 10

grid, placements, marker_length, marker_efficiency = bottom_left_marker(
    pieces,
    fabric_width,
    allow_rotation=True
)

print("PLACEMENTS")
for item in placements:
    print(item)

print("\\nMARKER LAYOUT")
render_marker(grid)

print("\\nRESULT")
print("Marker length:", marker_length)
print("Marker efficiency:", round(marker_efficiency, 2), "%")

6. Example Solution and Interpretation

One possible output is:

PLACEMENTS
{'id': 1, 'name': 'front panel', 'x': 0, 'y': 0, 'rotation': 0, 'area': 10, 'size': (4, 3)}
{'id': 2, 'name': 'back panel', 'x': 4, 'y': 0, 'rotation': 0, 'area': 10, 'size': (4, 3)}
{'id': 3, 'name': 'sleeve', 'x': 8, 'y': 0, 'rotation': 90, 'area': 5, 'size': (2, 3)}
{'id': 4, 'name': 'pocket', 'x': 3, 'y': 2, 'rotation': 0, 'area': 4, 'size': (2, 2)}
{'id': 5, 'name': 'collar', 'x': 9, 'y': 2, 'rotation': 90, 'area': 3, 'size': (1, 3)}
{'id': 6, 'name': 'cuff', 'x': 0, 'y': 3, 'rotation': 0, 'area': 3, 'size': (2, 2)}

MARKER LAYOUT
111..22233
1111222233
1114422235
66.44....5
6........5

RESULT
Marker length: 5
Marker efficiency: 70.0 %

In this output, each number represents one garment pattern piece. The dots represent unused fabric. The fabric width is:

\[ W = 10 \]

The used marker length is:

\[ L = 5 \]

Therefore, the total marker area is:

\[ W \times L = 10 \times 5 = 50 \]

The occupied area of all pieces is:

\[ 10 + 10 + 5 + 4 + 3 + 3 = 35 \]

So:

\[ \text{Marker Efficiency} = \frac{35}{50} \times 100 = 70\% \]

This means that 70% of the marker area is occupied by pattern pieces, while 30% remains unused. The result also shows why shape arrangement matters. The efficiency is not decided only by the total area of the pieces. It also depends on how the shapes fit together inside the fixed marker width.


Visual 3: Simplified Python marker layout — occupied cells, unused cells, marker width and marker length.

7. Problems in This Simple Treatment

The simple Python example is useful for learning, but it has several limitations. These limitations are important because real marker making is more complex than the example suggests.

Problem Why It Matters
Rasterized shapes The code uses grid cells instead of true CAD pattern curves and polygons. Real garment pieces have smooth curves, not square blocks.
No seam allowance logic Industrial patterns include seam allowance, notches, drill marks, internal cut points and tolerances.
Rotation is too simple The code allows 90-degree rotation, but real pieces may be restricted by grainline, nap, print direction or stretch direction.
No cutting gap The example allows pieces to touch closely. In real cutting, a minimum gap may be needed depending on equipment and fabric behaviour.
Not globally optimal The bottom-left method is a heuristic. It gives a feasible solution, but not necessarily the best possible solution.
No size-ratio planning Real markers often contain multiple sizes in a ratio such as S:M:L:XL. This example uses one simplified piece set.
No fabric defects Actual cutting may require avoiding defects, shade variation or border-placement restrictions.

Therefore, this example should be understood as a conceptual model, not as a production-grade marker-making system. Its purpose is to show why marker efficiency is an optimization problem and how an algorithm can begin to solve it.

8. Business Meaning of Marker Efficiency

Marker efficiency directly affects fabric consumption. If two markers produce the same garment output but one uses less fabric length, the more efficient marker reduces fabric cost.

For example, assume two markers contain the same total pattern area. If one marker gives 80% efficiency and another gives 85% efficiency, the second marker uses less fabric for the same garment output. In high-volume production, even a small improvement in marker efficiency can become commercially meaningful.

Marker efficiency affects:

  • fabric cost,
  • cutting-room waste,
  • garment costing,
  • production planning,
  • vendor negotiation, and
  • sustainability reporting.

However, marker efficiency should not be judged blindly. A lower marker efficiency may be justified when the garment has complex shapes, directional fabric, check matching, border placement or strict grainline requirements. The best marker is not always the one with the highest mathematical efficiency. It is the one that gives good fabric utilisation while remaining correct for production.

Summary Table

Level Optimization Question Practical Objective
Pattern layout level How should the pieces be arranged? Reduce unused marker area.
Marker length level What is the shortest feasible marker? Reduce fabric consumption.
Cut-order level Which markers and lays should be used? Meet size demand at minimum cost.
Business level How does marker efficiency affect cost? Improve margin and reduce waste.

Conclusion

Marker efficiency may appear to be a simple percentage, but it represents a complex placement problem. Garment pattern pieces are irregular, the fabric width is fixed, and the marker planner must reduce unused area while satisfying production constraints.

Mathematically, the problem can be understood as an applied 2D irregular nesting or strip-packing problem. The objective is to minimize marker length or unused fabric area while ensuring that all pattern pieces remain inside the marker and do not overlap.

The Python example in this article demonstrates the basic principle using simplified rasterized pattern pieces. It shows that marker efficiency depends not only on the total area of the garment pieces, but also on their arrangement.

In real factories, professional CAD systems, experienced marker planners and optimization algorithms handle this problem at a much larger scale. Still, the core idea remains the same:

\[ \text{Use the least fabric while producing correct garment parts.} \]

Sources and Further Reading

  1. Lastra-Díaz, J. J., and Ortuño, M. T. “A New Mixed-Integer Programming Model for Irregular Strip Packing Based on Vertical Slices with a Reproducible Survey.” arXiv, 2022.
  2. Guo, B. et al. “Two-dimensional irregular packing problems: A review.” Frontiers in Mechanical Engineering, 2022.
  3. Shang, X., Shen, D., Wang, F.-Y., and Nyberg, T. R. “A Heuristic Algorithm for the Fabric Spreading and Cutting Problem in Apparel Factories.” IEEE/CAA Journal of Automatica Sinica, 2019.
  4. Amaral, C., Bernardo, J., and Jorge, J. “Marker-making using automatic placement of irregular shapes for the garment industry.” Computers & Graphics, 1990.
  5. Wong, W. K. et al. “Genetic optimization of fabric utilization in apparel manufacturing.” International Journal of Production Economics, 2008.

General Disclaimer

This article is intended for educational and informational purposes. The Python example is a simplified teaching model and should not be treated as a substitute for professional garment CAD software, production-approved marker planning or factory-specific cutting-room procedures. Actual marker efficiency depends on fabric type, garment design, pattern engineering, fabric width, grainline, nap direction, print matching, cutting equipment, lay height, buyer requirements and factory standards. Readers should validate all calculations and marker plans according to their own production context before applying them commercially.



```
How to cite this article:
Goyal, P. Marker Efficiency as an Applied 2D Irregular Nesting Optimization Problem. My Textile Notes. Available at: http://mytextilenotes.blogspot.com/2026/06/marker-efficiency-as-applied-2d.html
Have a textile question?

If you have a question related to this topic, you are welcome to ask it in the My Textile Notes Discussion Forum.

Students, merchandisers, designers, researchers and textile professionals are welcome to participate.

No comments:

Post a Comment

Total Pageviews