Skip to content

Commit c75b644

Browse files
committedAug 15, 2021
initial commit
1 parent bef8059 commit c75b644

14 files changed

+230
-2
lines changed
 

‎README.md

+62-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,62 @@
1-
# scientific-app-framework-for-python
2-
Scientific Application Framework for Python [Prototype]
1+
Scientific Application Framework for Python
2+
===========================================
3+
4+
![Python Scientific App Example Screenshot](https://raw.githubusercontent.com/precise-simulation/scientific-app-framework-for-python/master/scientific-app-framework-screenshot.jpg)
5+
6+
About
7+
-----
8+
9+
This is prototype and redevelopment of the [FEATool
10+
Multiphysics](https://www.featool.com) MATLAB® framework for
11+
scientific applications, physics and CAE simulations in Python.
12+
13+
The main goal is to make scientific applications and simulations easy
14+
and accessible for users, as well as fast and easy to design and build
15+
for application developers.
16+
17+
Features
18+
--------
19+
20+
- Fast, easy, and definition and layout of dialogs and graphical user
21+
interface (GUI) by using [XML
22+
definitions](https://github.com/precise-simulation/scientific-app-framework-for-python/tree/master/gui
23+
layout examples).
24+
- Automatic creation and layout of dialogs for functions and
25+
objects. For example, the command `dlg(Block)` will read the
26+
signature of the Block class, automatically create a corresponding
27+
dialog box, and create the object with selected parameters when
28+
pressing _OK_.
29+
- Fully integrated Python scripting console.
30+
- Automatic GUI playback functionality. Play back models as automated
31+
tutorials.
32+
- 1-to-1 mapping between GUI and command line interface (CLI). Each
33+
GUI command and action has an equivalent CLI function call which is
34+
shown and logged in the console.
35+
- Different dedicated application modes such as geometry (CAD), mesh
36+
generation, physics, solvers, postprocessing.
37+
- Save and load models in equivalent binary formats and Python scripts.
38+
39+
Availability
40+
------------
41+
42+
A prototype (work in progress) binary executable of the framework,
43+
with a CAD Geometry mode is available for Windows in the [repository
44+
releases](https://github.com/precise-simulation/scientific-app-framework-for-python/releases/latest).
45+
46+
License
47+
-------
48+
49+
The binary is made available for personal evaluation and trial use
50+
only. Please get in touch with [_Precise
51+
Simulation_](https://www.precisesimulation.com#contact) if you would
52+
like a custom scientific application built, or is interested in
53+
licensing the framework.
54+
55+
56+
(C) Copyright 2021 by Precise Simulation Ltd. All Rights Reserved.
57+
58+
FEATool™ and FEATool Multiphysics™ are trademarks of Precise
59+
Simulation Limited. MATLAB® is a registered trademark of The
60+
MathWorks. All other trademarks are the property of their respective
61+
owners. Precise Simulation Limited and its products are not affiliated
62+
with, endorsed, sponsored, or supported by these trademark owners.

‎gui layout examples/00-test.xml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<vbox title="Block" flex="1">
2+
<grid rows="1 1 1 1 1 1 1 " cols="-1 1" padx="5 0">
3+
<label text="xmin"/>
4+
<label text="xmax"/>
5+
<label text="ymin"/>
6+
<label text="ymax"/>
7+
<label text="zmin"/>
8+
<label text="zmax"/>
9+
<label text="tag"/>
10+
<edit text="1" id="xmin"/>
11+
<edit text="2" id="xmax"/>
12+
<edit text="3" id="ymin"/>
13+
<edit text="4" id="ymax"/>
14+
<edit text="5" id="zmin"/>
15+
<edit text="6" id="zmax"/>
16+
<edit text="B2" id="tag"/>
17+
</grid>
18+
<hbox flex="0">
19+
<spacer flex="1"/>
20+
<button text="OK" flex="-1"/>
21+
<button text="Cancel" flex="-1"/>
22+
<!-- <sizegrip/> -->
23+
</hbox>
24+
</vbox>

‎gui layout examples/01-vbox.xml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<vbox title="vbox">
2+
<button text="btn 1" id="btn1"/>
3+
<button text="btn 2" id="btn2"/>
4+
<button text="btn 3" id="btn3"/>
5+
</vbox>

‎gui layout examples/02-hbox.xml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<hbox title="hbox">
2+
<button text="btn 1" id="btn1" flex="1"/>
3+
<button text="btn 2" id="btn2" flex="2"/>
4+
<button text="btn 3" id="btn3" flex="3"/>
5+
</hbox>

‎gui layout examples/03-grid.xml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<grid title="grid" style="box" rows="1 1 1" columns="1 3">
2+
<button text="btn 1" id="btn1"/>
3+
<check text="chk 2" id="chk2"/>
4+
<radio text="rad 3" id="rad3"/>
5+
6+
<label text="label 1" id="lab2"/>
7+
<edit text="edit 1" id="edi3"/>
8+
<popup text="popup 1" id="pop3">
9+
<item text="item 1"/>
10+
<item text="item 2"/>
11+
<item text="item 3"/>
12+
</popup>
13+
</grid>

‎gui layout examples/04-place.xml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<grid title="place" rows="1 1 1" columns="1 2 3">
2+
3+
<button text="btn 1" id="btn1" row="0" col="0"/>
4+
<button text="btn 2" id="btn2" row="1" col="0" colspan="3"/>
5+
<button text="b3" id="b3" row="0" col="1"/>
6+
<button text="btn 4" id="btn4" row="2" col="2"/>
7+
8+
</grid>

‎gui layout examples/05-space.xml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<grid title="space" padx="20">
2+
<grid title="space" rows="1 1 1" columns="1 1 1" padx="20" pady="2">
3+
4+
<button text="btn 1" padx="5" pady="5"/>
5+
<button text="btn 2"/>
6+
<button text="btn 3"/>
7+
8+
<button text="btn 4" ipady="22"/>
9+
<button text="btn 5" padx="10" pady="15"/>
10+
<button text="btn 6"/>
11+
12+
<button text="btn 7"/>
13+
<button text="btn 8"/>
14+
<button text="btn 9" padx="5" pady="5"/>
15+
16+
</grid>
17+
</grid>

‎gui layout examples/06-dialog.xml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<vbox title="dialog" flex="1">
2+
3+
<vbox flex="1">
4+
5+
<hbox title="Frame 1" flex="0" padx="2" pady="3">
6+
7+
<button text="button 1" id="btn1" ipadx="10" ipady="0"/>
8+
<combo flex="1" id="combo1">
9+
<item text="item 1"/>
10+
<item text="item 2"/>
11+
<item text="item 3"/>
12+
</combo>
13+
<radio text="radio 3"/>
14+
15+
</hbox>
16+
17+
18+
<hbox flex="1" title="Frame 2" padx="1" pady="1">
19+
20+
<list flex="2" id="combo1">
21+
<item text="item 1"/>
22+
<item text="item 2"/>
23+
<item text="item 3"/>
24+
</list>
25+
<textbox text="edit 1" flex="1"/>
26+
27+
</hbox>
28+
29+
30+
<hbox flex="0">
31+
32+
<spacer flex="1"/>
33+
<button text="OK" flex="-1"/>
34+
<button text="Cancel" flex="-1"/>
35+
<sizegrip/>
36+
37+
</hbox>
38+
39+
</vbox>
40+
41+
</vbox>

‎gui layout examples/07-menus.xml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<vbox title="menus" width="640" height="480">
2+
3+
<menu label="label1">
4+
<item label="1"/>
5+
<item label="2"/>
6+
</menu>
7+
8+
<menu label="label2">
9+
<item label="3"/>
10+
<item label="4"/>
11+
</menu>
12+
13+
</vbox>

‎gui layout examples/08-vpane.xml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<grid title="vpane" width="640" height="300" rows="1" cols="1">
2+
3+
<vpane>
4+
<button flex="10" text="btn 1"/>
5+
<button flex="2" text="btn 2"/>
6+
<button flex="1" text="btn 3"/>
7+
</vpane>
8+
9+
</grid>

‎gui layout examples/09-commands.xml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<vbox title="commands">
2+
<button text="cmd 1" id="cmd1" command="f_close_window"/>
3+
<button text="cmd 2" id="cmd2" command="lambda: print('cmd2')"/>
4+
<button text="cmd 3" id="cmd3"/>
5+
<!-- <button text="cmd 3" id="cmd3" command="error_fcn_not_found"/> -->
6+
</vbox>

‎gui layout examples/10-block.xml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<block type="dlg">
2+
<type text="type" default="block"/>
3+
<tag text="tag" default="B1"/>
4+
<xmin text="x_{min}" default="0"/>
5+
<xmax text="x_{max}" default="1"/>
6+
<!-- <ymin text="y_{min}" value="" default="0" type="double"/> -->
7+
<!-- <ymax text="y_{max}" value="" default="1" type="double"/> -->
8+
<!-- <ymin text="y_{min}" value="" default="0" type="double"/> -->
9+
<!-- <ymax text="y_{max}" value="" default="1" type="double"/> -->
10+
</block>

‎gui layout examples/11-applayout.xml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<hbox title="dialog" width="640" height="300" flex="1">
2+
3+
<vbox title="Tools">
4+
<button text="Block" id="btn1"/>
5+
<button text="Cylinder" id="btn2"/>
6+
<button text="Sphere" id="btn3"/>
7+
</vbox>
8+
9+
<vbox>
10+
<vbox title="View" id="view">
11+
<spacer/>
12+
</vbox>
13+
14+
<frame title="Terminal" id="term"/>
15+
</vbox>
16+
17+
</hbox>
160 KB
Loading

0 commit comments

Comments
 (0)
Failed to load comments.