/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ /** * HeightStrategyPanel — sub-panel shown when the Generate dialog's Height * strategy is selected. Exposes slice-height + subgroup mode. Extracted so * the parent dialog file focuses on strategy selection, primary fields, * and the preview. */ import { Ruler } from 'lucide-react'; import { Label } from '@/components/ui/label'; import type { GenerateScheduleOptions } from './generate-schedule'; export interface HeightStrategyPanelProps { heightTolerance: number; elementZSubgroup: GenerateScheduleOptions['elementZSubgroup']; onHeightToleranceChange: (next: number) => void; onSubgroupChange: (next: GenerateScheduleOptions['elementZSubgroup']) => void; } export function HeightStrategyPanel({ heightTolerance, elementZSubgroup, onHeightToleranceChange, onSubgroupChange, }: HeightStrategyPanelProps) { return (
Elements whose geometry centroid Z falls inside the same band share a task. Typical storey heights are 3–4 m.
{elementZSubgroup === 'none' ? 'One task per slice — every element in the band goes to that task.' : elementZSubgroup === 'class' ? 'Split each slice by IFC class (IfcWall, IfcSlab, …).' : elementZSubgroup === 'type' ? 'Split each slice by the element’s type name (IfcRelDefinesByType target).' : 'Split each slice by each element’s Name attribute.'}