import_geometry
Import a Wavefront OBJ room into a Radiance scene, mapping materials per group and optionally deriving sensors for daylight and electric lighting analysis.
Instructions
Import a Wavefront .obj room into a per-channel Radiance scene (obj2rad -> xform).
material_map: {group_name: spec} keyed by OBJ usemtl (else g) names; unmapped groups hard-fail. spec is a library-name string (illustrative reflectance) or a dict {"type": "plastic"|"glass"|"ground"|"context"|"luminaire"|"floor", "refl"/"tvis": float, ...}: plastic=opaque diffuse; glass=transmitting; ground=opaque + drives ground_albedo; context=exterior shading (in oconv, excluded from sensor footprint/room-sanity); luminaire=marker + IES (-> electric_lights); floor=opaque + anchors the sensor footprint. units: mm|cm|m|ft. up_axis: Y|Z.
v2/v3 parameters:
north_angle_deg: clockwise azimuth (degrees) that post-remap +Y points toward; applied as -rz(-north) after up-axis correction.
dry_run=True: return a discovery payload (groups, bbox_m, mesh_quality, suggestions) without binding materials or running Radiance. material_map not required in dry_run mode.
sidecar: path to a JSON file supplying defaults (explicit kwargs always win over sidecar).
derive_sensors: derive a work-plane grid + eye-level observer_sets (at BOTH seated 1.2 m and standing 1.6 m by default) + DGP-view strings from the geometry.
eye_heights / workplane_h / spacing: tune the derived-sensor layout (defaults (1.2, 1.6) / 0.8 / 0.6).
annotate: build a colored-by-material falsecolor render (oconv -> rpict -> falsecolor; live-validated).
strict: raise GeometryHealthError when the embedded health report (result["health"]) holds error-severity findings (e.g. coincident surfaces), instead of returning a report that looks plausible but is built on defective geometry. strict has NO effect when dry_run=True: the dry_run path returns before materials are bound, so no health report is computed to raise on.
Returns geometry_set + material_sets (index-aligned per channel-set) to compose into
run_grid / run_annual scene_sets, plus discovered groups and warnings, an always-present
apertures report, and a provenance manifest (written as a manifest.json sidecar -> manifest_path,
and embedded as a #-comment header in each geometry .rad). Conditional keys appear only when their
feature is mapped/requested: ground_albedo/ground_albedo_kind (a 1-nm albedo from any type:"ground"
group -> feed to spectral_sky_from_epw(spectral_albedo=...)); electric_lights (drop-in luminaire
payload for run_grid/run_image, which run ies2rad + colorize); context_groups (type:"context"
exterior-shading groups); and grid_points/observer_sets/observer_points/glare_views (derive_sensors).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run | No | ||
| units | No | ||
| strict | No | ||
| dry_run | No | ||
| sidecar | No | ||
| spacing | No | ||
| up_axis | No | ||
| annotate | No | ||
| obj_path | Yes | ||
| work_dir | No | ||
| eye_heights | No | ||
| workplane_h | No | ||
| channel_type | No | ||
| material_map | No | ||
| derive_sensors | No | ||
| north_angle_deg | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||