Initial commit SteelBase - Oficiais e Funcionando

This commit is contained in:
Marcos
2026-03-22 16:56:47 -03:00
commit f10278909b
194 changed files with 87242 additions and 0 deletions

24
.kiro/steering/product.md Normal file
View File

@@ -0,0 +1,24 @@
# Product Overview
**AÇO CALC PRO** is a professional structural steel engineering calculation platform designed for Brazilian engineers and construction professionals.
## Purpose
A comprehensive web-based tool for structural steel calculations, material selection, welding analysis, and cost estimation. The application provides technical calculations following Brazilian (NBR), American (ASTM/AWS), and European (EN) standards.
## Key Features
- **Materials Analysis**: CEV calculations, steel selection, international equivalencies, material comparisons
- **Connections**: Bolted connections, drilling layouts, bolt vs weld comparisons
- **Welding**: Preheat calculations, fillet weld design, heat input analysis, electrode consumption
- **Testing**: Hardness conversion, Charpy analysis, certificate checklists, ultrasound interpretation
- **Coating**: Paint area calculations, consumption estimates, galvanization analysis, cost estimation
- **Budgeting**: Detailed cost estimation, weight and rigging calculations, technical references
## Target Users
Structural engineers, welding engineers, construction managers, and technical professionals working with steel structures in Brazil.
## Language
Portuguese (pt-BR) - All UI, calculations, and documentation are in Brazilian Portuguese.

100
.kiro/steering/structure.md Normal file
View File

@@ -0,0 +1,100 @@
# Project Structure
## File Organization
```
/
├── index.html # Main application entry point
├── app.js # UI logic and navigation
├── calculations.js # Calculation engine
├── style.css # Complete design system
├── BD/ # Material database (CSV)
│ ├── perfis_w.csv
│ ├── perfis_i.csv
│ ├── cantoneiras.csv
│ ├── tubos_circulares.csv
│ ├── tubos_rhs.csv
│ ├── chapas.csv
│ ├── barras.csv
│ ├── eletrodos.csv
│ ├── parafusos.csv
│ └── tintas.csv
├── ORIGINAL/ # Backup of original files
└── aco-calc-pro-v7-5.zip # Archive
```
## Code Organization
### app.js
- Application state management (`appState`, `adminConfig`)
- Navigation and section switching
- Modal management (history, favorites, admin, help)
- Theme toggling (light/dark)
- Expert mode functionality
- CSV loading and parsing
- Material database (in-memory fallback)
- Content generation functions for each section
### calculations.js
- Calculation functions for all engineering tools
- Result formatting and display
- Chart generation (Charpy curves)
- History tracking
- Input validation
### style.css
- Design system with CSS variables
- Theme support (light/dark modes)
- Responsive layout
- Component styles (buttons, forms, cards, modals)
- Utility classes
## Key Patterns
### Section Loading
Each tool section has a content generator function (e.g., `getCEVContent()`, `getParafusosContent()`) that returns HTML strings dynamically injected into the main content area.
### State Management
Global objects store application state:
- `appState`: Current section, theme, mode, history, favorites, budget items
- `adminConfig`: Branding, tool visibility, preferences
### CSV Data Loading
Materials are loaded from CSV files with fallback to in-memory database:
1. Attempt to fetch CSV from `/BD/` directory
2. Parse CSV into JavaScript objects
3. Fall back to `materialsDatabase` if fetch fails
### Calculation Flow
1. User inputs values in form
2. Calculation function reads inputs
3. Performs calculations following engineering standards
4. Generates formatted result HTML
5. Adds entry to history
## Naming Conventions
- **Functions**: camelCase (e.g., `calcularPreaquecimento`, `showSection`)
- **Variables**: camelCase (e.g., `currentChart`, `appState`)
- **CSS Classes**: kebab-case (e.g., `sidebar-item`, `result-box`)
- **IDs**: kebab-case (e.g., `main-content`, `history-modal`)
- **Constants**: camelCase for objects (e.g., `steelDatabase`, `regionalPricing`)
## Modular Sections
The application is organized into 6 main categories:
1. **MATERIAIS** (Materials): CEV, steel selector, equivalencies, comparisons
2. **CONEXÕES** (Connections): Bolted connections, drilling layouts, bolt vs weld
3. **SOLDAGEM** (Welding): Preheat, fillet welds, heat input, electrode consumption
4. **ENSAIOS** (Testing): Hardness, Charpy, certificates, ultrasound
5. **PINTURA** (Coating): Area calculation, paint consumption, galvanization, costs
6. **ORÇAMENTO** (Budget): Detailed budgets, weight/rigging, technical references
## Extension Points
To add a new calculation tool:
1. Add sidebar item in `index.html`
2. Create content generator function in `app.js` (e.g., `getNewToolContent()`)
3. Add calculation function in `calculations.js`
4. Add section case to `loadSectionContent()` switch
5. Update `adminConfig.toolsVisibility` if needed

71
.kiro/steering/tech.md Normal file
View File

@@ -0,0 +1,71 @@
# Technical Stack
## Architecture
Single-page application (SPA) with vanilla JavaScript - no build system or framework dependencies.
## Core Technologies
- **HTML5**: Semantic markup, modern web standards
- **CSS3**: Custom design system with CSS variables, dark/light theme support
- **Vanilla JavaScript**: ES6+ features, no frameworks
- **Chart.js**: Data visualization (loaded via CDN)
## External Dependencies
```html
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
```
## Data Storage
- **In-memory state**: All application state stored in JavaScript objects (`appState`, `adminConfig`)
- **CSV files**: Material database stored in `/BD/*.csv` directory
- **No backend**: Pure client-side application, no server required
- **No localStorage**: Data is not persisted between sessions
## File Structure
```
/
├── index.html # Main HTML structure
├── app.js # UI logic, navigation, modals
├── calculations.js # Calculation functions
├── style.css # Complete styling with design system
└── BD/ # Material database (CSV files)
├── perfis_w.csv
├── perfis_i.csv
├── cantoneiras.csv
├── tubos_circulares.csv
├── tubos_rhs.csv
├── chapas.csv
├── barras.csv
├── eletrodos.csv
├── parafusos.csv
└── tintas.csv
```
## Running the Application
**Development**: Open `index.html` directly in a browser or use a local web server:
```bash
# Python 3
python -m http.server 8000
# Node.js (http-server)
npx http-server
# PHP
php -S localhost:8000
```
**Production**: Deploy to any static hosting service (GitHub Pages, Netlify, Vercel, etc.)
## Browser Compatibility
Modern browsers with ES6+ support required (Chrome 60+, Firefox 60+, Safari 12+, Edge 79+).
## No Build Process
The application runs directly in the browser without compilation, bundling, or transpilation.