-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from rpakishore/Dev240418
Dev240418
- Loading branch information
Showing
57 changed files
with
1,297 additions
and
1,028 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,3 +130,4 @@ dmypy.json | |
.vscode/settings.json | ||
WebDriver/chromedriver.exe | ||
nosync* | ||
uv.lock |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,17 +25,14 @@ | |
<!-- Table of Contents --> | ||
<h2>Table of Contents</h2> | ||
|
||
- [1. About the Project](#1-about-the-project) | ||
- [2. Getting Started](#2-getting-started) | ||
- [2.1. Prerequisites](#21-prerequisites) | ||
- [2.2. Installation](#22-installation) | ||
- [2.2.1. Production](#221-production) | ||
- [2.2.1.1. Install directly from repo](#2211-install-directly-from-repo) | ||
- [2.2.1.2. Install from Pypi release](#2212-install-from-pypi-release) | ||
- [2.2.2. Development](#222-development) | ||
- [3. Usage](#3-usage) | ||
- [3.1. GUI](#31-gui) | ||
- [3.2. Layout Documentation](#32-layout-documentation) | ||
- [Getting Started](#getting-started) | ||
- [Prerequisites](#prerequisites) | ||
- [Installation](#installation) | ||
- [Production](#production) | ||
- [Install directly from repo](#install-directly-from-repo) | ||
- [Usage](#usage) | ||
- [GUI](#gui) | ||
- [Layout Documentation](#layout-documentation) | ||
- [Layout Map](#layout-map) | ||
- [Initialize](#initialize) | ||
- [Parent Level](#parent-level) | ||
|
@@ -54,80 +51,42 @@ | |
- [Results](#results) | ||
- [Material](#material) | ||
- [Rebar](#rebar) | ||
- [4. Roadmap](#4-roadmap) | ||
- [5. License](#5-license) | ||
- [6. Contact](#6-contact) | ||
- [7. Acknowledgements](#7-acknowledgements) | ||
|
||
<!-- About the Project --> | ||
## 1. About the Project | ||
- [Roadmap](#roadmap) | ||
- [License](#license) | ||
- [Contact](#contact) | ||
|
||
<!-- Getting Started --> | ||
## 2. Getting Started | ||
## Getting Started | ||
|
||
<!-- Prerequisites --> | ||
### 2.1. Prerequisites | ||
### Prerequisites | ||
|
||
1. Python 3.11 or above | ||
1. Python 3.12 or above | ||
2. SAP2000 v24 or higher | ||
|
||
<!-- Installation --> | ||
### 2.2. Installation | ||
### Installation | ||
|
||
#### 2.2.1. Production | ||
#### Production | ||
|
||
##### 2.2.1.1. Install directly from repo | ||
##### Install directly from repo | ||
|
||
Clone repo and Install with flit | ||
|
||
```bash | ||
git clone https://github.com/rpakishore/ak_sap.git | ||
cd ak_sap | ||
pip install flit | ||
git clone https://github.com/rpakishore/ak_sap.git && cd ak_sap | ||
pip install uv | ||
uv venv && uv pip install -r pyproject.toml --extra gui | ||
``` | ||
|
||
- If you want just the base package: | ||
|
||
```bash | ||
flit install --deps production | ||
``` | ||
|
||
- Alternatively, if you also want to include the optional streamlit gui: | ||
- Alternatively, if you only want the base package, replace the last line above with following: | ||
|
||
```bash | ||
flit install --deps production --extras gui | ||
``` | ||
|
||
##### 2.2.1.2. Install from Pypi release | ||
|
||
```bash | ||
pip install ak_sap | ||
``` | ||
|
||
Note: The Pypi version does not ship with the optional streamlit gui | ||
|
||
#### 2.2.2. Development | ||
|
||
Download the git and install via flit | ||
|
||
```bash | ||
git clone https://github.com/rpakishore/ak_sap.git | ||
cd ak_sap | ||
pip install flit | ||
flit install --pth-file | ||
``` | ||
|
||
Updating Docs: | ||
|
||
- Update the [Usage.ipynb](./documentation/Usage.ipynb). | ||
- Open `cmd.exe` to run | ||
|
||
```bash | ||
update-doc | ||
uv venv && uv pip install -r pyproject.toml | ||
``` | ||
|
||
<!-- Usage --> | ||
## 3. Usage | ||
## Usage | ||
|
||
Initialize the module as below | ||
|
||
|
@@ -155,11 +114,11 @@ sap.api_version #Returns Sap0API version number | |
sap.save(r'\Path\to\save\file.sdb') | ||
``` | ||
|
||
### 3.1. GUI | ||
### GUI | ||
|
||
The repo has an optional streamlit GUI for the wrapper. Checkout [`GUI.md`](/documentation/Usage/GUI.md) for installation and usage instructions. | ||
|
||
### 3.2. Layout Documentation | ||
### Layout Documentation | ||
|
||
<!-- Layout START --> | ||
#### Layout Map | ||
|
@@ -409,7 +368,8 @@ cases.set_type(name='DEAD', casetype='LINEAR_STATIC') #Change the case type of | |
###### Modal | ||
`sap.Load.Modal` | ||
####### Eigen | ||
**Eigen** | ||
Usage Examples: | ||
|
@@ -436,7 +396,7 @@ eigen.set_number_modes(case_name='LCASE1', max=10, min=5) #set number of modes | |
eigen.get_number_modes(case_name='LCASE1') #get number of modes | ||
``` | ||
####### Ritz | ||
**Ritz** | ||
Usage Examples: | ||
|
@@ -535,7 +495,7 @@ rebar.get_prop(name='MyRebar2') #Get rebar property | |
<!-- Layout END --> | ||
<!-- Roadmap --> | ||
## 4. Roadmap | ||
## Roadmap | ||
- [x] Generate Load Patterns | ||
- [x] Generate Load Cases | ||
|
@@ -546,18 +506,13 @@ rebar.get_prop(name='MyRebar2') #Get rebar property | |
- [x] Export joint reactions to Hilti-Profis file | ||
<!-- License --> | ||
## 5. License | ||
## License | ||
See [LICENSE](https://github.com/rpakishore/ak_sap/blob/main/LICENSE) for more information. | ||
<!-- Contact --> | ||
## 6. Contact | ||
## Contact | ||
Arun Kishore - [@rpakishore](mailto:[email protected]) | ||
Project Link: [https://github.com/rpakishore/ak_sap](https://github.com/rpakishore/ak_sap) | ||
<!-- Acknowledgments --> | ||
## 7. Acknowledgements | ||
- [Shields.io](https://shields.io/) |
Binary file not shown.
Binary file not shown.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,24 @@ | ||
import streamlit as st | ||
from ak_sap.gui.streamlit import st_initialize | ||
|
||
from ak_sap import Sap2000Wrapper | ||
from ak_sap.gui.streamlit import st_initialize | ||
|
||
st.write('## Models') | ||
st.write("## Models") | ||
st_initialize() | ||
|
||
if not st.session_state.get('attached'): | ||
st.warning('[Attach to existing](/) SAP model first to use this tab') | ||
if not st.session_state.get("attached"): | ||
st.warning("[Attach to existing](/) SAP model first to use this tab") | ||
st.stop() | ||
|
||
sap:Sap2000Wrapper = st.session_state['SAP'] | ||
sap: Sap2000Wrapper = st.session_state["SAP"] | ||
st.divider() | ||
with st.expander('Model Info'): | ||
with st.expander("Model Info"): | ||
st.table( | ||
{'Current Model Units':sap.Model.units.replace('_', ' | '), | ||
'Current Database Units':sap.Model.units_database.replace('_', ' | '), | ||
'Merge Tolerance': sap.Model.merge_tol, | ||
'Is Locked': sap.Model.is_locked | ||
}) | ||
st.divider() | ||
{ | ||
"Current Model Units": sap.Model.units.replace("_", " | "), | ||
"Current Database Units": sap.Model.units_database.replace("_", " | "), | ||
"Merge Tolerance": sap.Model.merge_tol, | ||
"Is Locked": sap.Model.is_locked, | ||
} | ||
) | ||
st.divider() |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,34 @@ | ||
import streamlit as st | ||
|
||
import importlib.util | ||
import importlib.machinery | ||
import importlib.util | ||
from pathlib import Path | ||
|
||
import streamlit as st | ||
|
||
from ak_sap.gui.streamlit import st_initialize | ||
|
||
|
||
def load_module_main(filename: str): | ||
"""Specifying the python filename under the /pages/windows folder, loads the main() function from specified file. | ||
Args: | ||
filename (str): python filename to load the function from | ||
""" | ||
abs_path = Path(__file__).parent / "Export" / filename | ||
loader = importlib.machinery.SourceFileLoader( abs_path.stem, str(abs_path) ) | ||
loader = importlib.machinery.SourceFileLoader(abs_path.stem, str(abs_path)) | ||
spec = importlib.util.spec_from_loader(abs_path.stem, loader) | ||
mymodule = importlib.util.module_from_spec( spec ) # type: ignore | ||
loader.exec_module( mymodule ) | ||
mymodule = importlib.util.module_from_spec(spec) # type: ignore | ||
loader.exec_module(mymodule) | ||
mymodule.main() | ||
|
||
st.set_page_config(layout='wide') | ||
|
||
st.write('## Export') | ||
st.set_page_config(layout="wide") | ||
|
||
st.write("## Export") | ||
st_initialize() | ||
|
||
if not st.session_state.get('attached'): | ||
st.warning('[Attach to existing](/) SAP model first to use this tab') | ||
if not st.session_state.get("attached"): | ||
st.warning("[Attach to existing](/) SAP model first to use this tab") | ||
st.stop() | ||
|
||
with st.expander('Export to Hilti-Profis'): | ||
load_module_main('hilti_export.py') | ||
with st.expander("Export to Hilti-Profis"): | ||
load_module_main("hilti_export.py") |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from .main import Analyze | ||
from .main import Analyze |
Oops, something went wrong.