A rug configurator that accepts only room width and room length can return a plausible size while missing the conditions that decide whether the rug works. A sofa foot may land on an edge bevel. A dining chair may leave the perimeter when pulled back. A door may have enough clearance when closed but meet the rug halfway through its swing.

A useful validator needs three inputs that are often absent from retail size tools: the furniture footprint, the moving paths of furniture and doors, and the assembled height of the rug plus pad. ADARUG's public specification guide and furniture sizing guide provide the selection context. The calculation model below is an illustrative implementation, not an ADARUG API or a published tolerance standard.

Represent the Room as Geometry

Store dimensions in millimetres and keep the room, furniture, rug, and pad as separate layers. A rectangle can be a polygon with four vertices. A round or octagonal rug needs its actual contour rather than a bounding rectangle, otherwise the validator may report a collision where no material exists or miss one where it does.

For each furniture piece, record the contact points that matter. A sofa needs its full base for an all-legs layout, but its front feet for a front-legs layout. A dining chair needs a swept path, not just its closed position. A round table should not be approximated by its centre point when chair positions determine the usable perimeter.

The rug record should carry width, length, orientation, shape, edge finish, and confirmed assembly thickness. Keep fringe as an edge attribute rather than adding it to the overall height. A tassel can snag without creating a large vertical obstruction.

Test Furniture Contact Before Room Margins

A first rule can check whether each required contact point lies inside the rug polygon. A second rule can measure the distance from that point to the nearest perimeter. The project team decides the minimum distance after testing the actual edge construction. Do not hard-code a generic centimetre value and present it as a brand requirement.

For dining furniture, construct a pull-back envelope from the chair paths recorded in the plan. Test the rear feet against the rug perimeter at the end of that movement. If the feet repeatedly cross a fringed or scalloped edge, return a warning even when the vertical height is acceptable.

This approach produces more useful output than a single “fits room” result. A configurator can distinguish a geometric pass, an edge-risk warning, and a requirement for physical sampling.

Model the Door as a Swept Sector

A swinging door occupies a circular sector as it moves. Store the hinge point, leaf width, start angle, end angle, and the measured floor-clearance samples. Intersect that sector with the rug polygon to find the portion of travel where the rug lies beneath the leaf.

At each sampled position, measure the smallest vertical gap between the moving bottom edge and the floor. Use the minimum of those readings, not the value beneath the closed door. The height test is.

clearanceMargin = minimumSweepClearance - rugAssemblyThickness - padThickness - projectAllowance

A negative result means the assembly does not fit the measured envelope. A small positive result should not automatically become approval. Floor variation, pad compression, and door movement can make a marginal digital result uncertain, so the interface can return a REQUIRES_PHYSICAL_CHECK status within a project-defined review band.

Keep Pad and Rug Height Separate

The rug assembly includes pile or weave height, backing, and any substantial edge construction. The pad is another layer. Combining them into one undocumented product field makes it impossible to see whether changing the pad could solve a tight doorway.

For a bound perimeter, the pad can be represented as an inset polygon. For fringe, store the fringe direction separately and keep the pad out of the fringe zone. The inset is a design input to verify on the sample, not a universal constant.

Use Explicit States Instead of Fake Checkout Data

ADARUG's five documented directions do not all publish the same specification depth. Paeonia, Lobelia, Carduus, and Hydrangea have readable material and size examples. Classic Kashan pages show size groups rather than live order-line SKUs. Contemporary Impressionist Art references rely on sampling to establish finished specification. Outdoor woven references require site-condition confirmation.

A configurator should therefore distinguish CATALOG_REFERENCE, SAMPLE_REQUIRED, and QUOTE_REQUIRED. A visually similar record does not imply the same stock status or order readiness. If a field is unknown, return null or a confirmation task rather than zero.

Example Input and Result

The following JSON is a hypothetical living-room check. All dimensions are illustrative project inputs, not measurements of an ADARUG rug.

{ "coordinateUnit": "mm", "dataStatus": "ILLUSTRATIVE_INPUT", "rug": { "shape": "RECTANGLE", "width": 2400, "length": 3200, "assemblyThickness": 12, "edgeFinish": "BOUND" }, "pad": { "thickness": 4, "perimeterInset": 30 }, "doorSweep": { "leafWidth": 900, "sampleAnglesDegrees": [0, 30, 60, 90], "minimumMeasuredClearance": 18, "projectAllowance": 3 }, "result": { "clearanceMargin": -1, "status": "FAIL_HEIGHT", "nextAction": "Change placement, confirmed pad, or rug construction" } } 

In this example, 18 mm of measured clearance is compared with a 12 mm rug assembly, a 4 mm pad, and a 3 mm project allowance. The result fails by 1 mm. The numbers demonstrate the calculation only. They do not establish a recommended rug thickness or a standard clearance.

Return a Reviewable Decision

The final response should explain why a candidate passed or failed. Show the limiting door angle, the furniture contact point nearest the perimeter, and the fields that still require confirmation. A buyer or designer can then change one variable deliberately instead of guessing from a red icon.

For a custom or sample-dependent design, carry the verified room record into the quotation. ADARUG's public process asks for room plans, furniture dimensions, door opening range, floor material, cleaning routine, lighting, complete rug dimensions, and delivery destination. Current stock, shipping price, production period, and order delivery are set with the quotation.

A configurator works best as a decision aid. It can remove obvious geometric conflicts and preserve the evidence behind a choice. It should not turn an illustrative layout into a manufacturing specification without the sample and quotation checks that follow.