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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ env

# Folder visual studio code
.vscode/
/venv


# Ignore files for local manifest
manifest/local_*_properties.json
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![](https://img.shields.io/badge/SDK-v13.0.0-blue) <Please check version is the same as specified in requirements.txt>
![](https://img.shields.io/badge/SDK-v14.0.0-blue) <Please check version is the same as specified in requirements.txt>

# Creating and analyzing a SCIA model
This sample app shows how a SCIA model can be created within VIKTOR, which can be used for analysis using an external coupling.
Expand Down
46 changes: 45 additions & 1 deletion app/foundation/controller.py → app.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,50 @@
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"""

from viktor import Color
from viktor.core import ViktorController
from viktor.external.scia import Model as SciaModel
from viktor.external.scia import Material as SciaMaterial
from viktor.external.scia import LineSupport, LoadCase, LoadCombination, LoadGroup, OutputFileParser, PointSupport, \
SciaAnalysis, SurfaceLoad
from viktor.geometry import CircularExtrusion, Extrusion, Line, Material, Point, Sphere
from viktor.result import DownloadResult
from viktor.views import GeometryResult, GeometryView, GeometryAndDataView, DataGroup, GeometryAndDataResult, \
DataItem
from viktor.parametrization import Parametrization as ParametrizationBaseClass
from viktor.parametrization import Tab, Section, NumberField, DownloadButton

import itertools
from io import BytesIO
from pathlib import Path

import numpy as np




class Parametrization(ParametrizationBaseClass):
geometry = Tab("Geometry")
geometry.slab = Section("Slab")
geometry.slab.width_x = NumberField("Width in x", suffix="mm", default=6000)
geometry.slab.width_y = NumberField("Width in y", suffix="mm", default=5000)
geometry.slab.thickness = NumberField("Thickness", suffix="mm", default=500)

geometry.piles = Section("Piles")
geometry.piles.diameter = NumberField("Diameter", suffix="mm", default=500)
geometry.piles.length = NumberField("Length", suffix="m", default=7)

loads = Tab("Loads")
loads.input = Section("Input")
loads.input.uniform_load = NumberField("Uniform load", suffix="kN/m2", default=1)

scia = Tab("SCIA")
scia.downloads = Section("Downloads")
scia.downloads.input_xml_btn = DownloadButton("Input .xml", method="download_scia_input_xml")
scia.downloads.input_def_btn = DownloadButton("Input .def", method="download_scia_input_def")
scia.downloads.input_esa_btn = DownloadButton("Input .esa", method="download_scia_input_esa")

import itertools
from io import BytesIO
from pathlib import Path
Expand All @@ -31,7 +75,7 @@
from viktor.views import GeometryResult, GeometryView, GeometryAndDataView, DataGroup, GeometryAndDataResult, \
DataItem

from .parametrization import Parametrization



class FoundationController(ViktorController):
Expand Down
18 changes: 0 additions & 18 deletions app/__init__.py

This file was deleted.

16 changes: 0 additions & 16 deletions app/foundation/__init__.py

This file was deleted.

40 changes: 0 additions & 40 deletions app/foundation/parametrization.py

This file was deleted.

Binary file removed app/foundation/scia/model.esa
Binary file not shown.
16 changes: 0 additions & 16 deletions app/foundation_folder/__init__.py

This file was deleted.

23 changes: 0 additions & 23 deletions app/foundation_folder/controller.py

This file was deleted.

16 changes: 0 additions & 16 deletions manifest/manifest.yml

This file was deleted.

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# viktor==13.0.0
viktor==14.0.0
1 change: 1 addition & 0 deletions viktor.config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
app_type = "editor"