Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ keywords = ["steel design", "civil engineering", "engineering"]

[project.gui-scripts]
osdag = "osdag.osdagMainPage:do_stuff"

[project.scripts]
osdag-cli = "osdag_cli:testing"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep osdag_cli under the osdag module (so it should read osdag.osdag_cli:testing). Also, change name of the method to something less temporary. Can main do the job?

2 changes: 2 additions & 0 deletions src/osdag/Common.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
from importlib.resources import files

PATH_TO_DATABASE = files("osdag.data.ResourceFiles.Database").joinpath("Intg_osdag.sqlite")
#PATH_TO_DATABASE = "D:/Internship/My Forked Clone for CLI/Osdag/src/osdag/data/ResourceFiles/Database/Intg_osdag.sqlite"


import sqlite3

Expand Down
26 changes: 26 additions & 0 deletions src/osdag/Example_1.1.1.1.2.osi
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Bolt.Bolt_Hole_Type: Standard
Bolt.Diameter:
- '20'
Bolt.Grade:
- '6.8'
Bolt.Slip_Factor: '0.3'
Bolt.TensionType: Non pre-tensioned
Bolt.Type: Bearing Bolt
Connectivity: Column Flange-Beam Web
Connector.Material: E 300 (Fe 440)
Connector.Plate.Thickness_List:
- '14'
Design.Design_Method: Limit State Design
Detailing.Corrosive_Influences: 'No'
Detailing.Edge_type: Sheared or hand flame cut
Detailing.Gap: '10'
Load.Axial: '35'
Load.Shear: '175'
Material: E 300 (Fe 440)
Member.Supported_Section.Designation: WB 300
Member.Supported_Section.Material: E 300 (Fe 440)
Member.Supporting_Section.Designation: PBP 320 X 88.48
Member.Supporting_Section.Material: E 300 (Fe 440)
Module: Fin Plate Connection
Weld.Fab: Shop Weld
Weld.Material_Grade_OverWrite: '440'
38 changes: 38 additions & 0 deletions src/osdag/Example_1.1.2.1.1.osi
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Bolt.Bolt_Hole_Type: Standard
Bolt.Diameter:
- '16'
- '20'
- '24'
- '30'
Bolt.Grade:
- '4.8'
- '5.6'
- '6.8'
- '9.8'
Bolt.Slip_Factor: '0.3'
Bolt.TensionType: Non pre-tensioned
Bolt.Type: Bearing Bolt
Connectivity: Column Flange-Beam Web
Connector.Material: E 250 (Fe 410 W)A
Connector.Plate.Thickness_List:
- '14'
- '16'
- '18'
- '20'
- '22'
- '25'
- '28'
Design.Design_Method: Limit State Design
Detailing.Corrosive_Influences: 'No'
Detailing.Edge_type: Rolled, machine-flame cut, sawn and planed
Detailing.Gap: '10'
Load.Axial: '125'
Load.Shear: '240'
Material: E 350 (Fe 490)
Member.Supported_Section.Designation: LB 400
Member.Supported_Section.Material: E 250 (Fe 410 W)A
Member.Supporting_Section.Designation: PBP 300 X 109.54
Member.Supporting_Section.Material: E 350 (Fe 490)
Module: End Plate Connection
Weld.Fab: Shop Weld
Weld.Material_Grade_OverWrite: '490'
26 changes: 26 additions & 0 deletions src/osdag/New folder/Example_1.1.1.1.2.osi
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Bolt.Bolt_Hole_Type: Standard
Bolt.Diameter:
- '20'
Bolt.Grade:
- '6.8'
Bolt.Slip_Factor: '0.3'
Bolt.TensionType: Non pre-tensioned
Bolt.Type: Bearing Bolt
Connectivity: Column Flange-Beam Web
Connector.Material: E 300 (Fe 440)
Connector.Plate.Thickness_List:
- '14'
Design.Design_Method: Limit State Design
Detailing.Corrosive_Influences: 'No'
Detailing.Edge_type: Sheared or hand flame cut
Detailing.Gap: '10'
Load.Axial: '35'
Load.Shear: '175'
Material: E 300 (Fe 440)
Member.Supported_Section.Designation: WB 300
Member.Supported_Section.Material: E 300 (Fe 440)
Member.Supporting_Section.Designation: PBP 320 X 88.48
Member.Supporting_Section.Material: E 300 (Fe 440)
Module: Fin Plate Connection
Weld.Fab: Shop Weld
Weld.Material_Grade_OverWrite: '440'
147 changes: 147 additions & 0 deletions src/osdag/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
# Osdag CLI Tool

A command-line interface for Osdag structural engineering design software.

## Installation

```bash
pip install -e .
```

## Usage

The Osdag CLI tool provides several commands for processing design files and generating reports:

### Process Design

Process an OSI file, run design calculations, show output values, and generate a design report:

```bash
osdag-cli process-design [-i input_file.osi] [-o output_directory] [-v]
```

Options:

- `-i, --input-file`: Path to the OSI input file (optional, will prompt if not provided)
- `-o, --output-dir`: Directory to save the design report (optional)
- `-v, --verbose`: Enable verbose output

### Show Design Output

Process an OSI file, run design calculations, and show output values without generating a report:

```bash
osdag-cli show-design-output [-i input_file.osi]
```

Options:

- `-i, --input-file`: Path to the OSI file (optional, will prompt if not provided)

### Custom Design

Run design calculations directly using a custom implementation (currently supports only Fin Plate Connection):

```bash
osdag-cli custom-design [-i input_file.osi]
```

Options:

- `-i, --input-file`: Path to the OSI file (optional, will prompt if not provided)

This command implements a more direct design calculation approach that may be more reliable for certain modules.

### Debug Module

Analyze a module, show its methods and inheritance hierarchy:

```bash
osdag-cli debug-module [-i input_file.osi]
```

Options:

- `-i, --input-file`: Path to the OSI input file (optional, will prompt if not provided)

### Show Content

Parse and display the content of an OSI file:

```bash
osdag-cli show-content [-i input_file.osi]
```

Options:

- `-i, --input-file`: Path to the OSI input file (optional, will prompt if not provided)

### List Modules

List all valid module names:

```bash
osdag-cli list-modules
```

### Interactive Shell

Start an interactive shell to run multiple commands:

```bash
osdag-cli shell
```

In shell mode, you can run any of the above commands without the `osdag-cli` prefix. Use `exit` or `quit` to exit the shell.

## Examples

1. Process a design file and generate a report in the specified directory:

```bash
osdag-cli process-design -i examples/fin_plate.osi -o ./reports
```

2. Process a design file with verbose output:

```bash
osdag-cli process-design -i examples/fin_plate.osi -o ./reports -v
```

3. Show design output values without generating a report:

```bash
osdag-cli show-design-output -i examples/fin_plate.osi
```

4. Debug a module to see its methods and attributes:

```bash
osdag-cli debug-module -i examples/fin_plate.osi
```

5. View all supported modules:

```bash
osdag-cli list-modules
```

6. Start an interactive shell:

```bash
osdag-cli shell
```

Then within the shell:

```
> process-design
> list-modules
> exit
```

7. Try the custom design implementation for a Fin Plate Connection:

```bash
osdag-cli custom-design -i examples/fin_plate.osi
```
Loading