Mm creation - #1
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR expands the concrete-section analysis UI and engine to support a moment-moment (Mx–My) interaction “slice” at a user-selected axial load, adds an export-to-Excel workflow, and improves the design ↔ analysis iteration experience (including safer listener teardown).
Changes:
- Introduces a shared
AnalyzableConcreteSectionbase class, plus a newMomentMomentAnalysissolver and MM plotting/export UI. - Adds a design/analysis workflow header and snapshot/restore logic to enable iterating on designs after running analysis.
- Updates bundling to include static image assets (disc texture) and reorganizes rebar size properties.
Reviewed changes
Copilot reviewed 15 out of 22 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| webpack.config.cjs | Switches to production bundling and adds asset/resource handling for imported images. |
| src/threeJSscenefunctions.js | Extracts/re-exports rebar diameters and adds idempotent results raycasting teardown. |
| src/style.css | Adds styles for new workflow header tabs/status. |
| src/rebarProperties.js | New module for rebar size → diameter mapping. |
| src/main.js | Adds design/analysis workspace snapshot + workflow mode switching; uses bundled disc asset; adds validation and try/catch for analysis. |
| src/concShape.js | Refactors ConcShape to extend the new AnalyzableConcreteSection base. |
| src/compositeShapeAnalysis.js | Refactors composite sections to extend the new base; adds stronger validation for composite material consistency. |
| src/analysis/MomentMomentAnalysis.js | New adaptive solver to generate MM curves at constant axial load (nominal + φ). |
| src/analysis/AnalyzableConcreteSection.js | New shared analysis/plotting/export orchestration (PMM + MM + Plotly UI + Excel export entrypoint). |
| src/analysis/AnalysisExcelExporter.js | New client-side XLSX generator (ZIP+OOXML) exporting section summary + PMM + MM results. |
| public/static/css/tailwind.css | Updates compiled Tailwind output to include workflow tab styles/utilities. |
| public/static/concgui/concgui.bundle.js.LICENSE.txt | Adds generated license file for bundled dependencies. |
| outputs/analysis-excel-export/build-sample.mjs | New Node script to generate a sample workbook (currently depends on undeclared tooling). |
| outputs/analysis-excel-export/inspect-sample.mjs | New Node script to inspect/render a workbook (currently depends on undeclared tooling). |
| index.html | Adds workflow header buttons and adjusts Analysis button layout. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+1
to
+5
| import { mkdir, writeFile } from 'node:fs/promises'; | ||
| import { fileURLToPath } from 'node:url'; | ||
| import { dirname, join } from 'node:path'; | ||
| import { buildAnalysisWorkbookBytes } from '../../src/analysis/AnalysisExcelExporter.js'; | ||
| import sharp from 'sharp'; |
Comment on lines
+1
to
+5
| import fs from 'node:fs/promises'; | ||
| import { FileBlob, SpreadsheetFile } from '@oai/artifact-tool'; | ||
|
|
||
| const input = await FileBlob.load('analysis-export-sample.xlsx'); | ||
| const workbook = await SpreadsheetFile.importXlsx(input); |
Comment on lines
+156
to
+162
| <nav id="workflowTabs" aria-label="Design workflow" role="tablist"> | ||
| <button id="designModeTab" class="workflow-tab" type="button" role="tab" aria-selected="true"> | ||
| Design Inputs | ||
| </button> | ||
| <button id="analysisModeTab" class="workflow-tab" type="button" role="tab" aria-selected="false" disabled> | ||
| Analysis Results | ||
| </button> |
Comment on lines
4
to
+7
| module.exports = { | ||
| mode: "development", | ||
| entry: "./src/main.js", // Main entry point | ||
| mode: "production", | ||
| entry: "./src/main.js", | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
adding mm plot, allow for back and forth designs