🚀 Auto-deploy: BrainWind atualizado em 01/09/2026 15:08:48
This commit is contained in:
@@ -4,6 +4,7 @@ import { Slider } from '@/components/ui/slider';
|
|||||||
import { Badge } from '@/components/ui/badge';
|
import { Badge } from '@/components/ui/badge';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { useWindStore } from '@/store/appStore';
|
import { useWindStore } from '@/store/appStore';
|
||||||
|
import { useHydrationStore } from '@/store/hydrationStore';
|
||||||
import {
|
import {
|
||||||
calculateShelterWind,
|
calculateShelterWind,
|
||||||
calculateShelterWindAllAngles,
|
calculateShelterWindAllAngles,
|
||||||
@@ -45,6 +46,27 @@ const ShelterModule: React.FC = () => {
|
|||||||
const [surfaceMass, setSurfaceMass] = useState(15); // kg/m² para lona/telha leve
|
const [surfaceMass, setSurfaceMass] = useState(15); // kg/m² para lona/telha leve
|
||||||
const [viewMode, setViewMode] = useState<'3d' | 'elevation' | 'airflow'>('3d');
|
const [viewMode, setViewMode] = useState<'3d' | 'elevation' | 'airflow'>('3d');
|
||||||
|
|
||||||
|
const pendingLoad = useHydrationStore((s) => s.pendingLoad);
|
||||||
|
const clearPendingLoad = useHydrationStore((s) => s.clearPendingLoad);
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
if (pendingLoad && pendingLoad.module === 'shelter') {
|
||||||
|
const p = pendingLoad.inputs as any;
|
||||||
|
if (p.condition !== undefined) setCondition(p.condition);
|
||||||
|
if (p.windAngle !== undefined) setWindAngle(p.windAngle);
|
||||||
|
if (p.depth !== undefined) setDepth(p.depth);
|
||||||
|
if (p.width !== undefined) setWidth(p.width);
|
||||||
|
if (p.height !== undefined) setHeight(p.height);
|
||||||
|
if (p.theta !== undefined) setTheta(p.theta);
|
||||||
|
if (p.numColumns !== undefined) setNumColumns(p.numColumns);
|
||||||
|
if (p.backClosure !== undefined) setBackClosure(p.backClosure);
|
||||||
|
if (p.leftClosure !== undefined) setLeftClosure(p.leftClosure);
|
||||||
|
if (p.rightClosure !== undefined) setRightClosure(p.rightClosure);
|
||||||
|
if (p.surfaceMass !== undefined) setSurfaceMass(p.surfaceMass);
|
||||||
|
clearPendingLoad();
|
||||||
|
}
|
||||||
|
}, [pendingLoad, clearPendingLoad, setCondition, setWindAngle, setDepth, setWidth, setHeight, setTheta, setNumColumns, setBackClosure, setLeftClosure, setRightClosure, setSurfaceMass]);
|
||||||
|
|
||||||
// Determinação automática da posição da fresta/vão a partir dos cursores (base e topo)
|
// Determinação automática da posição da fresta/vão a partir dos cursores (base e topo)
|
||||||
const bottomGap = backRange[0];
|
const bottomGap = backRange[0];
|
||||||
const topGap = 100 - backRange[1];
|
const topGap = 100 - backRange[1];
|
||||||
|
|||||||
Reference in New Issue
Block a user