Inspections & Diagnostics

Built-in diagnostic commands and observability for debugging.

Wrengler includes diagnostic commands and structured logging so you can inspect area results, method choices, and bridge behavior without leaving Rhino.

Diagnostic Commands

BalaDiagnosticArea

Command: BalaDiagnosticArea

  1. Select one or more objects in Rhino (or press Enter for all visible).
  2. Run the command.
  3. Output is written to logs/diagnostic.txt and typically opened in Notepad.

Output includes:

  • Object ID and geometry type
  • Area breakdown: Floor, Roof, Facade, Soffit, total, discrepancy
  • Face analysis: Per-face classification, normal Z, center Z, reason
  • Method tracking: Which coverage and stack methods were used (e.g. GeometricBBox, Graph)

Use this to verify classification, debug fallbacks, and confirm that area results match expectations.

Area calculation logs

When running area diagnostics over multiple objects, timestamped logs are written to logs/area-calculations/ (e.g. area-calc-YYYYMMDD-HHMMSS.txt). These include per-object breakdowns, classification details, method tracking (CoverageMethod, StackMethod), and performance metrics.

OptiX diagnostics

The plugin can run OptiX diagnostics (e.g. via the bridge command optixdiagnostics) to validate the GPU/OptiX environment and scene setup. Results help confirm that the ray tracing stack is available and configured correctly.

Other diagnostic commands

Additional commands (e.g. graph structure, clustering, plot division) may be available for specific features. Check the in-app documentation or command list in Rhino.

Method Tracking

Area results include CoverageMethod and StackMethod so you can see how each value was computed:

  • CoverageMethod: Roof coverage detection — e.g. "OptiX", "GeometricBBox", "None", "Failed".
  • StackMethod: Stack detection — e.g. "Graph", "OptiX", "None", "Failed".

This makes it easy to confirm when OptiX is used versus geometric fallbacks and to validate behavior during debugging.

Structured Logging

The plugin uses PanelLogger with levels:

  • LogInfo() — Informational
  • LogWarn() — Warnings (non-fatal)
  • LogError() — Errors (fatal)

Output format: [INFO], [WARN], or [ERROR] plus timestamp and message. In DEBUG builds, ConduitPerformanceLogger adds timing for conduit draw methods when they exceed the configured threshold (e.g. 2ms).

Correlation IDs

Bridge messages carry a requestId (UUID). Responses include the same ID so you can correlate requests and responses in logs and when debugging the bridge.

Log Files

  • logs/diagnostic.txt — Latest BalaDiagnosticArea output (overwritten each run).
  • logs/area-calculations/ — Timestamped area logs (preserved).
  • Console — Real-time logs when a debugger is attached.

Bridge Debugging

  • C#: System.Diagnostics.Debug.WriteLine("[Bridge] Sending: ...") for outgoing messages.
  • JavaScript: console.log("[Bridge] Received:", message) for incoming messages.

Common issues: “Bridge not ready” (WebView not initialized), “Timeout” (command >15s or handler crash), “Navigation cancelled” (expected for internal URLs).