-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated imports in visual tests and axis label in point plotter
Show cross-section figure in UI Return PMM data from main calculation function Revert relative import changes and rename visual test files Fix PMM field types
- Loading branch information
1 parent
78806ef
commit 0b6a927
Showing
14 changed files
with
62 additions
and
57 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
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
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,10 +1,13 @@ | ||
from ...pmm_search.load_combo import LoadCombination | ||
import dataclasses | ||
|
||
from numpy import ndarray | ||
|
||
from ...pmm_search.load_combo import LoadCombination | ||
|
||
|
||
@dataclasses.dataclass | ||
class PMM(): | ||
X: list[float] | ||
Y: list[float] | ||
Z: list[float] | ||
load_combos: list[LoadCombination] | ||
class PMM: | ||
X: ndarray | ||
Y: ndarray | ||
Z: ndarray | ||
load_combos: list[LoadCombination] |
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
4 changes: 3 additions & 1 deletion
4
examples/conc_col_pmm/calc_document/plotting/pmm_plotter_plotly.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
Binary file modified
BIN
-497 KB
(54%)
examples/conc_col_pmm/calc_report_examples/calc_report_example1.pdf
Binary file not shown.
Binary file modified
BIN
-694 KB
(60%)
examples/conc_col_pmm/calc_report_examples/calc_report_example2.pdf
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,20 +1,17 @@ | ||
from ..calc_document.calculation import calculation | ||
from ..calc_document.plotting import get_pmm_data, pmm_plotter_plotly | ||
from ..col import assign_max_min | ||
from ..pmm_search.load_combo import LoadCombination | ||
|
||
|
||
# This test checks for runtime errors | ||
def test_pmm_plotter_plotly(example_col, loads): | ||
axial_limits = assign_max_min.calculate_axial_load_limits(example_col) | ||
|
||
def test_pmm_plotter_plotly(example_col): | ||
# for each load case: P, Mx, My, and whether the calc should be shown | ||
load_data = [ | ||
[300, 100, 200, True], | ||
[-100, 50, -60, False], | ||
[1500, 300, -300, False], | ||
loads = [ | ||
[300, 100, 200, "yes"], | ||
[-100, 50, -60, "no"], | ||
[1500, 300, -300, "no"], | ||
] | ||
loads = [LoadCombination(i, *load) for i, load in enumerate(load_data)] | ||
|
||
pmm_data = get_pmm_data.get_pmm_data(example_col, 36, 12, loads, axial_limits) | ||
pmm_data = calculation(default_loads=loads, col=example_col) | ||
|
||
_ = pmm_plotter_plotly.plot(pmm_data) |
23 changes: 9 additions & 14 deletions
23
...ual_tests/visual_test_document_wrapper.py → ...l_tests/visual_test_calculation_report.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,24 @@ | ||
import os | ||
import sys | ||
|
||
# Now you can import from conc_col_pmm | ||
from ...calc_document.document_wrapper import run | ||
|
||
# "w", "h", "bar_size", "bar_cover", "bars_x", "bars_y", "fc", "fy", "cover_type", "transverse_type", | ||
col_data = [24, 18, "#6", 2, 5, 2, 8000, 60, "Edge", "Spiral"] | ||
# col_data = [18, 24, "#6", 2, 5, 2, 8000, 60, "Edge", "Tied"] | ||
|
||
# for each load case: P, Mx, My, and whether the calc should be shown | ||
# Note that these load cases currently do not override the defaults | ||
loads = [ | ||
[300, 100, 200, "yes"], | ||
[-100, 50, -60, "no"], | ||
[11500, 300, -300, "no"], | ||
[0, 200, 0, "yes"], | ||
[0, 0, 200, "yes"], | ||
] | ||
# loads = [ | ||
# [500, 200, 100, "yes"], | ||
# [-100, 50, -60, "no"], | ||
# [11500, 300, -300, "no"], | ||
# ] | ||
|
||
# calc_report_example1 | ||
# col_data = [24, 18, "#6", 1.5, 5, 4, 8000, 60, "Edge", "Tied"] | ||
# loads = [[1400, -300, 100, True]] | ||
# loads = [[1400, -300, 100, "yes"]] | ||
|
||
# calc_report_example2 | ||
# col_data = [24, 36, "#8", 2, 6, 8, 8000, 60, "Edge", "Tied"] | ||
# loads = [[3000, -200, 100, True]] | ||
col_data = [24, 36, "#8", 2, 6, 8, 8000, 60, "Edge", "Tied"] | ||
loads = [[3000, -200, 100, "yes"]] | ||
|
||
if __name__ == "__main__": | ||
run(True, col_data, loads) |
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