🚀 Auto-deploy: BrainWind atualizado em 26/08/2026 10:57:31
This commit is contained in:
@@ -8,13 +8,14 @@ import { Button } from '@/components/ui/button';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { useWindStore } from '@/store/appStore';
|
||||
import { calculatePiperack, type PipeDef } from '@/lib/modules/piperack';
|
||||
import { isResonantRisk } from '@/lib/dynamics';
|
||||
import { Piperack3D } from '@/components/three/Piperack3D';
|
||||
import SceneCapturePanel from '../components/SceneCapturePanel';
|
||||
import ExportMenu from '../components/ExportMenu';
|
||||
import { EducationalManual } from '@/components/EducationalManual';
|
||||
import { WindParametersSummary } from '@/components/WindParametersSummary';
|
||||
import { exportGenericToPDF, type GenericPDFSection } from '../lib/export-generic-pdf';
|
||||
import { Plus, Trash2, Info } from 'lucide-react';
|
||||
import { Plus, Trash2, Info, AlertTriangle } from 'lucide-react';
|
||||
import { Tooltip, TooltipContent, TooltipTrigger, TooltipProvider } from '@/components/ui/tooltip';
|
||||
import { Input } from '@/components/ui/input';
|
||||
|
||||
@@ -26,6 +27,7 @@ const PiperackModule: React.FC = () => {
|
||||
const [spacing, setSpacing] = useState(2);
|
||||
const [numFrames, setNumFrames] = useState(2);
|
||||
const [phiStruct, setPhiStruct] = useState(0.5);
|
||||
const [f1, setF1] = useState(1.5); // Frequência natural (Hz)
|
||||
const [pipes, setPipes] = useState<PipeDef[]>([]);
|
||||
|
||||
const pendingLoad = useHydrationStore((s) => s.pendingLoad);
|
||||
@@ -41,6 +43,7 @@ const PiperackModule: React.FC = () => {
|
||||
if (p.numFrames !== undefined) setNumFrames(p.numFrames);
|
||||
if (p.pipes !== undefined) setPipes(p.pipes);
|
||||
if (p.phiStruct !== undefined) setPhiStruct(p.phiStruct);
|
||||
if (p.f1 !== undefined) setF1(p.f1);
|
||||
clearPendingLoad();
|
||||
}
|
||||
}, [pendingLoad, clearPendingLoad]);
|
||||
@@ -157,7 +160,7 @@ const PiperackModule: React.FC = () => {
|
||||
</div>
|
||||
<SaveModuleDialog
|
||||
moduleType="piperack"
|
||||
inputs={{ elevation, width, height, spacing, numFrames, pipes, phiStruct }}
|
||||
inputs={{ elevation, width, height, spacing, numFrames, pipes, phiStruct, f1 }}
|
||||
/>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-6">
|
||||
@@ -219,6 +222,33 @@ const PiperackModule: React.FC = () => {
|
||||
</div>
|
||||
<Slider value={[phiStruct]} min={0.1} max={1.0} step={0.05} onValueChange={v => setPhiStruct(v[0])} />
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
<div className="flex justify-between items-center">
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="text-sm font-medium">Freq. Natural (f₁)</span>
|
||||
<TooltipProvider>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<Info className="w-4 h-4 text-muted-foreground cursor-help" />
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="top" className="max-w-xs">
|
||||
<p>Frequência fundamental no sentido do vento (Hz). Valores abaixo de 1 Hz indicam risco dinâmico elevado.</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
</div>
|
||||
<span className="text-sm text-muted-foreground">{f1.toFixed(1)} Hz</span>
|
||||
</div>
|
||||
<Slider value={[f1]} min={0.1} max={5.0} step={0.1} onValueChange={v => setF1(v[0])} />
|
||||
|
||||
{isResonantRisk(f1) && (
|
||||
<div className="mt-2 p-2 bg-destructive/10 border border-destructive/20 rounded text-xs text-destructive flex gap-2 items-start">
|
||||
<AlertTriangle className="w-4 h-4 shrink-0 mt-0.5" />
|
||||
<p>Estrutura flexível (f₁ < 1 Hz). O vento produzirá amplificação dinâmica (C.A.D) considerável. É exigida análise pela NBR 6123 Capítulo 9.</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user