-
Notifications
You must be signed in to change notification settings - Fork 0
Edge Overlap Visualization
When two surfaces meet, the material applied to one may physically wrap or overhang onto the other β think of cladding at an outside corner, tiles at a wall/floor junction, or a worktop with a built-up edge. The planner captures this through edge rules and renders the overlap on the canvas with a clearly visible semi-transparent band so you can see exactly where the doubled coverage lies.
Feature line from the README:
βοΈ Physical edge overlap with semi-transparent visualization.
Every edge of every surface has an editable Edge Rule that controls how the placement engine treats that boundary. The rule type can be:
| Type | Behaviour |
|---|---|
| Hard stop | Material is clipped sharply at the edge. |
| Soft boundary | Material is clipped, but the edge is not enforced as a cut line. |
| Physical overlap | The donor surface's material is allowed to extend past the edge by maxOverlapMm β used for outside corners and overhangs. |
| Connected overlap | A connection-aware version of physical overlap; the partner edge (on the other surface) becomes the receiver. |
Additional fields:
-
maxOverlapMmβ maximum overhang in millimetres. -
overlapOpacityβ alpha used when rendering the overlap band on the canvas (typically0.3β0.5). -
connectedSurfaceId/connectedEdgeIndexβ links the rule to the receiver edge for connected overlap. -
applyThicknessCompensation+customThicknessAllowanceMmβ optional extra allowance for the material's thickness so a wrap of thick material still meets at a clean corner.
The ConnectionVisualizer and the material layout layer cooperate:
- Connections show coloured chevrons on the participating edges (one colour per connection type: outside corner, inside corner, flat continuation, butt joint, custom).
- For every edge rule with
physicalOverlaporconnectedOverlap, the layout layer extends the donor material's polygon past the edge. - That extension is drawn with the configured
overlapOpacity, so the doubled coverage looks visually distinct from the regular material. - The cut list records pieces that include an overlap in the Overlap
column (
Yes/β) and notes any thickness compensation.
Edge rules can be edited in two places:
- Surface Properties β selecting an edge of a surface (via the Cut tool or the Connection tool) exposes the rule for that edge.
- Connection Properties β when a connection is selected, the associated rule is editable inline together with the connection's type, wrap direction and visibility.
All edits go through edgeRuleCommands and participate fully in
undo/redo.
- For aesthetics, the chevron and overlap colours are designed to remain
legible at all zoom levels because Konva's
strokeScaleEnabledis disabled β they keep the same on-screen weight regardless of viewport scale. - If you want to inspect just the overlap regions, hide other shapes via the layer toggles or zoom in around the connection β the semi-transparent band makes the overlapping pieces glow even on a busy canvas.
- Schema β
src/types/edgeRule.ts - Commands β
src/domain/commands/builtin/edgeRuleCommands.ts - Connection visualisation β
src/features/surfaces/ConnectionVisualizer.tsx - Layout layer β
src/features/materialLayout/MaterialLayoutLayer.tsx - Computation β
src/domain/materialLayout/buildMaterialLayout.ts,optimizeMaterialLayout.ts
Documentation for the material-layout-planner project. Every feature in the application is documented here β see the contribution rules before opening a pull request.