From ffbde79b6fc0c633cb3c66090ba2e2503fa7716c Mon Sep 17 00:00:00 2001 From: Marcos Date: Tue, 21 Jul 2026 15:36:29 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20Auto-deploy:=20BrainWind=20atual?= =?UTF-8?q?izado=20em=2021/07/2026=2015:36:29?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/components/LinearLoadsTable.tsx | 3 +-- app/src/lib/export-ftool.ts | 11 +++++------ app/src/store/appStore.ts | 7 +++++++ 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/app/src/components/LinearLoadsTable.tsx b/app/src/components/LinearLoadsTable.tsx index 37799cc..c34077f 100644 --- a/app/src/components/LinearLoadsTable.tsx +++ b/app/src/components/LinearLoadsTable.tsx @@ -21,9 +21,8 @@ const LinearLoadsTable: React.FC = () => { const wind = useWindStore(); const { t } = useI18n(); const { width: b, length: a, height: h, roofPitch, wallCpe, roofCpe } = galpao; - const { q, cpi, windAngle } = wind; + const { q, cpi, windAngle, frameSpacing, setFrameSpacing } = wind; - const [frameSpacing, setFrameSpacing] = useState(6.0); const [purlinSpacing, setPurlinSpacing] = useState(1.5); const columnLoads = useMemo( diff --git a/app/src/lib/export-ftool.ts b/app/src/lib/export-ftool.ts index da68b71..7e6c48c 100644 --- a/app/src/lib/export-ftool.ts +++ b/app/src/lib/export-ftool.ts @@ -84,13 +84,12 @@ export function buildFtoolModel(): FtoolModel { const galpao = useGalpaoStore.getState(); const wind = useWindStore.getState(); const { width: b, height: h, roofPitch, wallCpe, roofCpe } = galpao; - const { q, cpi, windAngle } = wind; + const { q, cpi, windAngle, frameSpacing } = wind; - const FRAME_SPACING = 6.0; - const PURLIN_SPACING = 1.5; - - const columnLoads = getColumnLinearLoads(cpi, q, wallCpe, FRAME_SPACING, windAngle); - const roofLoads = getRoofLinearLoads(cpi, q, roofCpe, PURLIN_SPACING, roofPitch); + const columnLoads = getColumnLinearLoads(cpi, q, wallCpe, frameSpacing, windAngle); + // Para Ftool (análise 2D de pórtico principal), a viga de cobertura (rafter) + // também recebe a carga baseada no espaçamento entre pórticos. + const roofLoads = getRoofLinearLoads(cpi, q, roofCpe, frameSpacing, roofPitch); const rise = (b / 2) * Math.tan((roofPitch * Math.PI) / 180); diff --git a/app/src/store/appStore.ts b/app/src/store/appStore.ts index 5ad3266..c5b53b8 100644 --- a/app/src/store/appStore.ts +++ b/app/src/store/appStore.ts @@ -51,6 +51,10 @@ export interface GlobalWindState { authorName: string; projectRev: string; setProjectMetadata: (data: Partial<{projectName: string, clientName: string, authorName: string, projectRev: string}>) => void; + + // Cargas Lineares (M9.2) + frameSpacing: number; // Espaçamento entre pórticos em metros + setFrameSpacing: (spacing: number) => void; } function calcCpi(permeabilityCase: PermeabilityCase, ratio: number, windAngle: 0 | 90): number { @@ -118,6 +122,9 @@ export const useWindStore = create((set, get) => { projectRev: 'R0', setProjectMetadata: (data) => set((state) => ({ ...state, ...data })), + frameSpacing: 5.0, + setFrameSpacing: (val) => set({ frameSpacing: val }), + updateCalculations: () => set((state) => recalc(state)), setV0: (val) => {