Technology

Pergola configurator rules: roof types, posts and louvres

How a pergola configurator derives pitch, posts, rafters, louvres, glass panels and modules per roof type, with the arithmetic for a 4.5 × 3.5 m pergola.

Short answer: in a pergola configurator nearly every derived value depends on the roof type. Switching from louvres to glass changes the pitch, the number of rafters, the infills and so the roof area. A second rule sets the post count from the width. Our example configurator shows both with example values for a fictional product; this guide sets out the rules and recalculates them.

Pergola with three roof types – preview of the example configurator
Example configurator · fictional product · example values. Loads only when you click. Open the demo page →

Which parameters and options are there?

ParameterValues in the exampleAffects
Width3.0 to 7.0 m, 0.5 m stepsPosts, rafters, modules, louvres, roof area
Depth2.5 to 5.0 m, 0.5 m stepsLouvres per bay, side glass panels, roof area
RoofGlass, louvres, solid panelPitch, rafter division, infills
Louvre angle0 to 90°, 1° stepsPicture and summary (louvres only)
Frame colourFour tones with RAL codePicture and summary
Side element (right)None, sliding glass, screenSide glass panels with sliding glass

Every numeric value is snapped to its step and clamped to its limits. All values are example values.

How is the post count set?

The demo uses a simple, fictional example rule: in the model, posts are at most 3.5 m apart.

  • Bays = width ÷ 3.5 m, rounded up.
  • Posts = bays + 1.

So a pergola 3.0 to 3.5 m wide has two posts, and one 4.0 to 7.0 m wide has three. The summary shows the count with "max. span 3.5 m". For your project, note that the 3.5 m is a fictional example value for the picture, not a structural design or a guide value. Which span a profile allows at a given site is set by the manufacturer and a structural engineer; the configurator applies your approved table, it does not recalculate it.

What changes with each roof type?

Roof typePitchDivisionInfill
Glass5°Each post bay divided so no glass panel is wider than 1.0 mPanels = rafters − 1
Louvres0°One field per post bayLouvres per field = usable depth ÷ 0.185 m, rounded down
Solid panel5°One field per post bayModules = width ÷ 1.0 m, rounded up

The usable depth for louvres is the depth minus the wall beam (0.12 m), the gutter (0.16 m) and 0.04 m clearance. Roof area is width × depth ÷ cos(pitch), so for the flat louvred roof simply width × depth.

Worked through for the default

Example values: 4.5 m wide, 3.5 m deep, louvres at 40°.

  • Posts: 4.5 ÷ 3.5 = 1.29 → 2 bays → 3 posts.
  • Louvre fields: 2 (one per post bay), so 3 rafters.
  • Usable depth: 3.5 − 0.12 − 0.16 − 0.04 = 3.18 m; 3.18 ÷ 0.185 = 17.2 → 17 per field → 34 louvres.
  • Roof area: 4.5 × 3.5 = 15.75 m².

Switch to glass at the same size and each of the two post bays (2.25 m) is divided into three panels: 7 rafters, 6 glass panels, and the 5° pitch lifts the roof area to 15.81 m². With the solid panel it is 4.5 ÷ 1.0 → 5 modules, also 15.81 m². The summary reads "Louvres · 34 blades at 40°", "Glass · 6 panels" or "Solid panel · 5 modules"; we recalculated all three by hand.

Sliding glass on the right-hand side at 3.5 m deep gives 3.5 ÷ 1.1 = 3.2 → 4 panels (at least 2). Clear height is fixed in the example: 2.50 m minus the 0.24 m gutter = 2,260 mm.

Which rules shape the controls?

The rules also shape the interface. The louvre-angle slider only appears when the louvred roof is chosen; with glass or panel it would be meaningless, so it is hidden. When the buyer changes the roof, side element, colour or a view, a hidden live region reads the new summary to screen readers. And if a device cannot run WebGL 2, every option and the summary still work; only the 3D picture is missing. For a manufacturer this means the rules and sizes are written in the product file and act the same everywhere: in the model, in the summary and in the controls. An option that does not apply to the chosen roof does not appear in the summary either.

What does the summary show, and what is missing?

Seven rows: size, clear height, posts with maximum span, roof area, roof with detail, frame colour with RAL code, side element. There are no prices, no parts list and no enquiry. The model and the summary use the same rules and sizes from the product file; that is where pricing rules or a parts list would plug in. Dimension lines, an exploded view, the drainage path and evening light can be switched on, and the view can be saved as an image.

Technically the pergola is its own product file used by a rendering engine for pergola-type parts. How that split works for several covered-structure systems is covered in implementing a configurator for outdoor structures.

What we need for your rules

For your product: size steps, approved post spacings per profile and roof type, pitches, maximum glass and module widths, louvre width and spacing, louvre rotation range, which side elements are possible on which sides, and your colour card.

Example configurator · fictional product

Pergola with three roof types

A pergola: width and depth, roof in glass, louvres or panels, louvre angle, frame colour and side elements.

Pergolas, patio roofs & glass rooms · Dimensions and sizes · Colours · Materials and finishes

Try the rules in the pergola with three roof types. Who a pergola configurator is for is covered in pergola configurator software for manufacturers; for hiring us, see custom 3D configurator development.

Frequently asked questions

Why is the louvred roof flat in the example?

That is how the example rule is set: 0° for louvres, 5° for glass and panel. In your configurator, your system's pitches apply.

What happens beyond 7 m wide?

The demo stops at 7 m. For wider or coupled installations we write the rule for further bays with you.

Are the counts already a bill of materials?

No, they are a start. With your part numbers and accessories they become a bill of materials in a project.

Sources

  1. Product definition of the demo: parameters, options, nominal sizes, rules, summary, read 14 November 2026: modelwright.de/demo/product-demo-pergola.js
  2. Modelwright library: pergola with three roof types, "Live in this demo" list, read 14 November 2026: modelwright.de/en/library/pergola-configurator/

Read next