# Apartment Configurator — focused Mini Studio example

Open `ApartmentConfigurator.gh` in Grasshopper inside Rhino 8 with Ontologic Mini Studio installed. The definition has no external model or media dependency. Its Panel contains two dimensions, a finish-rate dropdown, two result metrics, a footprint drawing and a Fit to Geometry action.

This example is a rectangular footprint and an illustrative finish allowance. Its area is width × depth; it does not calculate regulatory usable area, wall deductions, tax, project costs or a construction quotation. The three rates are example data in EUR/m².

## Exact defaults and structures

| Component | Configuration | Output used by the definition |
| --- | --- | --- |
| Number Input: Width (m) | Label `Width (m)`; Default `8`; Minimum `4`; Maximum `15`; Step `0.5`; Decimals `1` | Value: Number tree, one value at `{0}[0]` |
| Number Input: Depth (m) | Label `Depth (m)`; Default `10`; Minimum `4`; Maximum `15`; Step `0.5`; Decimals `1` | Value: Number tree, one value at `{0}[0]` |
| Dropdown Input: Finish rate (EUR/m2) | Values `{0}: [900, 1250, 1700]` as GH numbers; Labels `{0}: [Shell, Standard, Premium]`; Default index `1` | Value: numeric tree item `1250` at `{0}[0]`; Index: integer tree item `1` |
| Metric: Floor area | Data from first Multiplication; Reduction `None`; Unit `m²`; Format `F1` | Renderer; no GH output ports |
| Metric: Illustrative finish budget | Data from second Multiplication; Reduction `None`; Unit `EUR`; Format `N0` | Renderer; no GH output ports |
| SVG Drawing: Apartment footprint | Geometry from native Rectangle | Renderer; no GH output ports |
| Fit to Geometry | Geometry from the same Rectangle | Explicit camera-fit action; it does not bake or change the source geometry |

Number and Dropdown ports use tree access, including this single-control case. Each has one Label at `{0}[0]`; output paths and item positions remain explicit. Dropdown Labels and Values have equal lengths and matching order. Labels are display strings; Values remain numbers. Do not replace the numeric rates with formatted text such as `EUR 1,250`.

## Wiring

1. Width.Value → first Multiplication.A; Depth.Value → first Multiplication.B. Its result → Floor area.Data.
2. First Multiplication result → second Multiplication.A; Finish rate.Value → second Multiplication.B. Its result → Illustrative finish budget.Data.
3. Width.Value → first Construct Domain.B; Depth.Value → second Construct Domain.B. Both domain starts are `0`.
4. First domain → Rectangle.X; second domain → Rectangle.Y. Rectangle uses the default world-XY plane and explicit corner radius `0`.
5. Rectangle's curve output → SVG Drawing.Geometry and Fit to Geometry.Geometry.

Native component type GUIDs are pinned in the reproducible helper and verification record:

| Native component | Type GUID |
| --- | --- |
| Multiplication | `b8963bb1-aa57-476e-a20e-ed6cf635a49c` |
| Construct Domain | `d1a28e95-cf96-4936-bf34-8bf142d731bf` |
| Rectangle | `0ca0a214-396c-44ea-b22f-d3a1757c32d6` |

## Try the interaction

Start at width `8`, depth `10`, Standard finish. The results are `80.0 m²` and `100,000 EUR`. Change width to `9`: the definition recomputes `90.0 m²` and `112,500 EUR`, and the rectangular drawing updates from the same dimension outputs. Restore width to `8` before saving if you want the supplied starting configuration. Fit to Geometry frames the current footprint when explicitly activated.

The native fixture verifies changes through the installed Number component API, including downstream recomputation. It does not claim a physical mouse/keyboard session. Browser-only website demos are separate simulations.

## Adapt it

Change the bounds, steps, labels and numeric rate lists in Grasshopper. Replace the rectangular geometry calculation with your room/partition graph. Add room metrics or a Table when you have room-level data; in Table Series mode use one branch per column and equal row positions across branches. Furniture toggles and room tables are suggested extensions, not included in this focused file.

In Mini Studio, use Edit layout → Tool for your company Header logo, Tool name and Tool icon; use Style for accent/palette, light/dark theme, spacing, corners and text size. Apply, then save the `.gh` file. Include in start screen adds a local shortcut to the saved tool; Rhino and Grasshopper remain the execution host.

## Native verification and provenance

Verified 2026-10-15 in an isolated owned Rhino `8.35.26251.13001` process, `.NET 8.0.14`, against the installed `0.1.0-alpha.69` component assembly used for the Beta 8 documentation contract. No plugin runtime code was changed.

The fixture verified the initial values; width `8 → 9` producing area `80 → 90` and budget `100000 → 112500`; restored width `8`; one native footprint curve; no component errors or warnings; native GH save; native GH reopen; and the restored `80`/`100000` results after reopening. It also verified all seven widgets render in the actual installed WebView2 panel. The record is `docs/verification/apartment-native.json`; genuine captures are `images/beta8/apartment-canvas.png` and `images/beta8/apartment-panel.png` in the website repository. Panel capture has a separate explicit status in the record.

Original sample and fixture authored for these docs using installed native Grasshopper components and Mini Studio component APIs. No third-party sample, geometry or artwork was copied. Project licensing remains the owner's decision.

Reproduce from the website root: build `scripts/native-apartment/NativeApartment.csproj` with the local .NET SDK, then run `scripts/create-apartment-sample.py` through Rhino's native `-_RunPythonScript` in an isolated `/netcore-8 /nosplash` process. The Python file is only a bootstrap; all construction, solving and verification use the versioned C# helper. Retain the shell until the report is written and close only the owned process.
