Open core: don’t reinvent the wheel — build your fenestration software on ours.

Skip to main content

The sash size comes from Clearance rules at Level Sash: the gap on each side between the
opening and the sash. Which sash profile is used, and how long it is cut, comes from the sash profile rules
(Part or Profile Matrix at Level Sash, with Width / Height Adjust). Multi-slide doors also use the equal-glass fields on
the Open/Shape record (Series detail tabs).

How clearance rules work

  • Position picks the side(s): Top, Bottom, Left, Right, Top + Bottom, Left + Right, All Sides.
    Condition Inside / Outside limits it to sides that are inside or on the outside of the unit.
  • Value 1 is mm×100 (300 = 3.0 mm); the imperial value is 64ths (10 = 10/64″).
    An imperial series uses the imperial value.
  • If several clearance rules fit the same side, the last one with a value wins — order matters.
  • Clearance rules inside called sub-routines count too. The same rule type works at Frame, Glass and DLO level.
  • Positive values typically read as a gap (sash smaller than the opening), negative as an overlap (sash bigger).
    This is read from existing rule values and descriptions, not measured — measure before relying on it.

Examples

To size the 7100 casement sash, sub-routine 138 “7100 Csmnt Sash” rules 26 and 27 set a clearance of
3.0 mm / 10/64″ on Left + Right and Top + Bottom of the sash, at Level Sash, always (no test). The 3501 sash
(via sub-routine 256 “Shuco Sash”) has about 25 sash clearances, mostly −7.0 mm / −20/64″,
each with tests and Condition Inside or Outside. Sub-routine 138 also has “CLO Clear Opening” part rules
(part 10023) with large negative Width Adjusts — those measure the clear opening; they are not sash deductions.

Steps

  1. Find where the sash gap comes from: the clearance list and the sash profile rules (assistant recipes below).
  2. Open the series or sub-routine that holds the clearance → Rules → the rule → change Value 1
    → Save.
  3. Imperial company: the new Rules tab does not save the imperial value of a Clearance rule, so the change does
    not reach imperial items. Have the imperial value checked and ask OpenJanela support to set it.
  4. To change the sash profile or its cut length: edit the Level-Sash Part / Profile Matrix rule (Width Adjust for
    top/bottom pieces, Height Adjust for sides, end cuts).
  5. Glass and beads follow their own rules: glass size from the Glass-level clearances (7100 rules 442/443: 29.0 mm /
    74/64″ and 3.0 mm / 8/64″), beads from the bead rules.
  6. Build items with each opening style that uses that sash and measure.
Shared sub-routinesA clearance in a sub-routine changes every series
that calls it. A new rule placed after an old one silently overrides it on the same side.
For the AI assistant: rules to check

Use read_data on the company database, read-only. Replace :series with the id of the series the user names (find it with SELECT id, description FROM series WHERE description LIKE '%7100%'). One statement only, starting with SELECT or WITH, no semicolon, at most 200 rows. The guard rejects these words anywhere, even inside quoted text or aliases: INSERT, UPDATE, DELETE, REPLACE, MERGE, UPSERT, CALL, DO, SET, CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE, RENAME, LOCK, UNLOCK, HANDLER, LOAD, EXECUTE, EXEC — so run the recipes as written, with no extra labels. A product is the series plus every sub-routine it calls; the recipes walk that tree. They return numbers, because the company database has no rule-type name tables: translate them with the list below, and answer in shop words.

R3 — every clearance rule in the product (series and its sub-routines). Add AND r.level = 5
for sash only. On 7100 it returns 4 rows, on 3501 27. mm100 is metric, sixty_fourths is what an
imperial company uses; 0 there on an imperial series means the imperial value was never set:

WITH RECURSIVE tree(sid) AS (
SELECT :series
UNION
SELECT r.rulevalue FROM tree t
JOIN rules r ON r.series_id = t.sid AND r.ruletype = 9 AND r.active = 1
)
SELECT r.series_id, s.description AS in_series, r.id AS rule_no, r.ruletype, r.level, r.position,
r.rcondition, r.rulevalue AS mm100, r.rulevaluei AS sixty_fourths, r.rulevalue2,
r.test, LEFT(r.description, 40) AS description
FROM tree
JOIN rules r ON r.series_id = tree.sid
JOIN series s ON s.id = r.series_id
WHERE r.active = 1 AND r.ruletype IN (4, 5, 180)
ORDER BY r.level, r.series_id, r.id
LIMIT 200

R2 — sash profile rules: R2 with :level = 5:

WITH RECURSIVE tree(sid) AS (
SELECT :series
UNION
SELECT r.rulevalue FROM tree t
JOIN rules r ON r.series_id = t.sid AND r.ruletype = 9 AND r.active = 1
)
SELECT r.series_id, s.description AS in_series, r.id AS rule_no, r.ruletype, r.level, r.position,
r.rulevalue AS part_or_matrix, COALESCE(p.stockcode, m.description) AS what,
r.leftside AS cut_lt, r.rightside AS cut_rb, r.weldedl, r.weldedr,
r.sizeadjustwtype AS w_type, r.sizeadjustw AS w_mm100, r.sizeadjustwi AS w_64ths,
r.sizeadjusthtype AS h_type, r.sizeadjusth AS h_mm100, r.sizeadjusthi AS h_64ths,
r.test, LEFT(r.description, 40) AS description
FROM tree
JOIN rules r ON r.series_id = tree.sid
JOIN series s ON s.id = r.series_id
LEFT JOIN parts p ON p.id = r.rulevalue AND r.ruletype = 6
LEFT JOIN matrix_header m ON m.id = r.rulevalue AND r.ruletype IN (7, 8)
WHERE r.active = 1 AND r.level = :level AND r.ruletype IN (6, 7, 8)
AND (r.ruletype <> 6 OR p.part_type = 2)
ORDER BY r.series_id, r.id
LIMIT 200

Who calls a sub-routine (replace :sub with its id):

SELECT series_id, id FROM rules WHERE ruletype = 9 AND rulevalue = :sub AND active = 1

Numbers to names. Rule type: 1 Option Choice, 2 Option Auto, 3 Option sub-routine, 4 Clearance, 5 Clearance Matrix, 6 Part, 7 Part Matrix, 8 Profile Matrix, 9 Rule sub-routine (Rule Segment), 10 Comment, 14 production line, 15 station, 19 Warning, 20 Error, 21 glass supplier, 24 SU gas, 25 SU spacer, 43/44 SU thickness, 90 assembly, 92 parent assembly. Level: 1 Overall, 2 Facet, 3 Frame, 4 Sash Type, 5 Sash, 6 Glass, 7 Glazing Bead, 8 DLO, 29 Grids, 31 Coupler, 32 Mullion, 40 Opening. Position: 1 Top, 2 Bottom, 3 Left, 4 Right, 5 Top+Bottom, 6 Left+Right, 7 All Sides, 11 WxH/Area, 13 Perimeter, 26 Unit. End cut: 1 Mitered, 2 Straight, 3 Machined. Test type: 8 Global Option, 9 Shape/M Option, 10 UD Opening (Open/Shape id), 11 Open Class (1 Picture, 2 LH, 3 RH, 4 Top hinged, 5 Fixed sash), 15 SU Type, 17 SU Thick. Sizes: metric columns are mm×100, imperial columns (ending in i or _imp) are 64ths of an inch; an imperial company (series_uom 2) uses the imperial ones.