Skip to content

Commit 0da058f

Browse files
authored
Merge pull request #193 from hugtalbot/202506_update_runSofa
Clarify how to run SOFA, mention SofaPython3 and the new GLFW-ImGUI
2 parents 5dba9a7 + 6f67b79 commit 0da058f

5 files changed

Lines changed: 72 additions & 18 deletions

File tree

10_Getting_Started/15_Binaries/10_Binaries_instructions.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
SOFA provides pre-compiled binaries, eliminating the need to compile the software from its source code. This simplifies the process for users to get started with SOFA. Below are detailed instructions on how to download, install, and execute SOFA:
22

3+
34
## Download
45

56
To download SOFA, visit the official SOFA website at [https://www.sofa-framework.org/download/](https://www.sofa-framework.org/download/). On this page, you will find the latest version of SOFA. There are two types of files available, download one or the other:
@@ -11,14 +12,25 @@ If you choose the zip file option, extract its contents to access the SOFA appli
1112

1213
If you require a specific version of SOFA, you can also find previous releases on the official SOFA GitHub repository at [https://github.com/sofa-framework/sofa/releases](https://github.com/sofa-framework/sofa/releases).
1314

15+
1416
## Install
1517

1618
If you downloaded an installer file, simply run the file, and follow the installation process as you would for any other software application. This will ensure that SOFA is properly installed on your system.
1719

18-
## Execute
1920

21+
## Run SOFA
22+
23+
### with the SOFA GUI
2024
To run SOFA, locate and execute the application called `runSofa`. For more detailed information on how to use the application, you can refer to the [page dedicated to runsofa](../../../using-sofa/runsofa/). This documentation will provide you with further guidance on using SOFA effectively.
2125

26+
27+
### within a Python environment
28+
29+
To use the binary release of SOFA within a Python3 environment, the section "using Python3" details how to [set up your environment on various operating systems](https://sofapython3.readthedocs.io/en/latest/content/Installation.html#using-python3).
30+
31+
Note that the latest SOFA release has been compiled using Python3.12. Make sure to check your Python version before going any further.
32+
33+
2234
### Notes for macOS Users
2335

2436
Unfortunately, macOS binaries of SOFA are not code-signed. It means that macOS adds a quarantine flag to the binaries when a user downloads them. The result is a warning window with the message "runSofa cannot be opened because the developer cannot be verified.", preventing to open the application.

10_Getting_Started/20_Build/10_Linux.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ This list does not cover all available SOFA plugins, only the ones that are buil
175175
```
176176

177177

178-
# Building SOFA
178+
# Build SOFA
179179

180180

181181
## Setup your source and build directories
@@ -223,7 +223,7 @@ git clone -b master https://github.com/sofa-framework/sofa.git sofa/src
223223

224224
6. Run **Configure**.
225225

226-
7. Fix eventual dependency errors by following CMake messages (see Troubleshooting section below). Do not worry about warnings.
226+
7. Fix eventual dependency errors by following CMake messages (see Troubleshoot section below). Do not worry about warnings.
227227

228228
8. (optional) Customize SOFA via CMake variables
229229

@@ -250,7 +250,7 @@ Time for a coffee!
250250

251251

252252

253-
## Troubleshooting CMake errors
253+
## Troubleshoot CMake errors
254254

255255
### Qt detection error
256256
To solve Qt detection errors, click on **Add Entry** and add
@@ -282,6 +282,19 @@ See our page presenting [video tutorial for compilation on Linux](../../video-tu
282282

283283

284284

285+
# Run SOFA
286+
287+
## with the SOFA GUI
288+
To run SOFA, locate and execute the application called `runSofa`. For more detailed information on how to use the application, you can refer to the [page dedicated to runsofa](../../../using-sofa/runsofa/). This documentation will provide you with further guidance on using SOFA effectively.
289+
290+
291+
## within a Python environment
292+
293+
To use SOFA within a Python3 environment, the section "using Python3" details how to [set up your environment on various operating systems](https://sofapython3.readthedocs.io/en/latest/content/Installation.html#using-python3).
294+
295+
296+
297+
285298
# Alternative build methods
286299

287300

10_Getting_Started/20_Build/20_MacOS.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ This list does not cover all available SOFA plugins, only the ones that are buil
141141
```
142142
143143
144-
# Building SOFA
144+
# Build SOFA
145145
146146
147147
## Setup your source and build directories
@@ -184,7 +184,7 @@ git clone -b master https://github.com/sofa-framework/sofa.git sofa/src
184184
185185
4. Keep "Use default native compilers" and press "Done".
186186
187-
5. Fix eventual dependency errors by following CMake messages (see Troubleshooting section below). Do not worry about warnings.
187+
5. Fix eventual dependency errors by following CMake messages (see Troubleshoot section below). Do not worry about warnings.
188188
189189
6. Customize SOFA via CMake variables
190190
@@ -207,7 +207,7 @@ Time for a coffee!
207207
208208
209209
210-
## Troubleshooting CMake errors
210+
## Troubleshoot CMake errors
211211
212212
### Qt detection error
213213
To solve Qt detection errors, click on **Add Entry** and add
@@ -229,3 +229,16 @@ A further dev warning may appear:
229229
This is just a typo with Qt5CoreMacros.cmake file. It uses COPY\_ONLY
230230
instead of COPYONLY. Simply edit your Qt5CoreMacros.cmake, replace
231231
COPY\_ONLY with COPYONLY and **Configure** again.
232+
233+
234+
# Run SOFA
235+
236+
## with the SOFA GUI
237+
To run SOFA, locate and execute the application called `runSofa`. For more detailed information on how to use the application, you can refer to the [page dedicated to runsofa](../../../using-sofa/runsofa/). This documentation will provide you with further guidance on using SOFA effectively.
238+
239+
240+
## within a Python environment
241+
242+
To use SOFA within a Python3 environment, the section "using Python3" details how to [set up your environment on various operating systems](https://sofapython3.readthedocs.io/en/latest/content/Installation.html#using-python3).
243+
244+

10_Getting_Started/20_Build/30_Windows.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ You can add Boost and Qt to your PATH to ease their detection by CMake.
8787
**Qt**: add `your/Qt/path/msvcXXXX_XX/bin` and `your/Qt/path/msvcXXXX_XX/lib`
8888
8989
90-
# Building SOFA
90+
# Build SOFA
9191
9292
9393
## Setup your source and build directories
@@ -143,7 +143,7 @@ git clone -b master https://github.com/sofa-framework/sofa.git sofa/src
143143
- If you want to use **another IDE like QtCreator**, select "CodeBlocks - Ninja" (recommended, needs [Ninja](#optional-ninja-build-system)) or "CodeBlocks - NMake".
144144
Keep "Use default native compilers" and press "Finish".
145145

146-
7. Fix eventual dependency errors by following CMake messages (see Troubleshooting section below). Do not worry about warnings.
146+
7. Fix eventual dependency errors by following CMake messages (see Troubleshoot section below). Do not worry about warnings.
147147

148148
- e.g. define the `Eigen3_DIR` with the path where you installed Eigen
149149

@@ -175,7 +175,7 @@ Example with Ninja:
175175
Time for a coffee!
176176

177177

178-
## Troubleshooting CMake errors
178+
## Troubleshoot CMake errors
179179

180180
### Qt detection error
181181
To solve Qt detection errors, click on **Add Entry** and add
@@ -216,3 +216,17 @@ The two scripts `setup-windows_1.bat` and `setup-windows_2.bat` install the mini
216216
## Compilation tutorial
217217

218218
See our page presenting [video tutorial for compilation on Windows](../../video-tutorials/how-to-compile-sofa/#windows).
219+
220+
221+
222+
# Run SOFA
223+
224+
## with the SOFA GUI
225+
To run SOFA, locate and execute the application called `runSofa`. For more detailed information on how to use the application, you can refer to the [page dedicated to runsofa](../../../using-sofa/runsofa/). This documentation will provide you with further guidance on using SOFA effectively.
226+
227+
228+
## within a Python environment
229+
230+
To use SOFA within a Python3 environment, the section "using Python3" details how to [set up your environment on various operating systems](https://sofapython3.readthedocs.io/en/latest/content/Installation.html#using-python3).
231+
232+

15_Using_SOFA/10_runSofa.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
### runSOFA
2-
31
The default compilation of SOFA produces a binary file called **runSofa**, which can be
42
found in the folder *%{SOFA\_BUILD\_DIR}/bin*.
5-
The execution of the binary - either via the terminal or by double-clicking the executable -
6-
launches a default [XML scene](./../create-your-scene-in-xml) with the name caduceus.scn, using the Qt library.
3+
The execution of the binary (either via the terminal or by double-clicking the executable) launches a default simulation with the default GUI (using the [SofaGLFW plugin](https://github.com/sofa-framework/SofaGLFW/) since v25.06)
4+
75
![Execution of runSofa using the
8-
default scene caduceus](https://www.sofa-framework.org/wp-content/uploads/2014/11/Screenshot-from-2015-01-14-1839152.png)
6+
default scene in SofaGLFW-ImGUI](https://www.sofa-framework.org/wp-content/uploads/2025/06/Screenshot-SofaGLFW.png)
97

108
### Launch runSOFA
119

@@ -48,9 +46,8 @@ If using the shipped binaries of SOFA (or the default CMake options when compili
4846

4947
### Load and run a specific scene
5048

51-
The default scene loaded by **runSofa** is named “caduceus.scn”. This
52-
scene file can be found in *%{SOFA\_SOURCE\_DIR}/examples/Demos*, along
53-
with other demo scenes. Let us see now how to load one of these scenes:
49+
The default scene loaded by **runSofa** is named "*fallingSOFA.scn*". This [XML scene](./../create-your-scene-in-xml) file can be found in *%{SOFA\_SOURCE\_DIR}/examples/Demos*, along with other demo scenes.
50+
Let us see now how to load one of these scenes:
5451

5552
- From the **runSofa** interface, you can select a scene file through
5653
the “File->Open” Menu (Ctrl+O), and run it by simply pressing the
@@ -59,3 +56,8 @@ with other demo scenes. Let us see now how to load one of these scenes:
5956
specify the scene file to load as an argument.
6057

6158

59+
### Open a Python script
60+
61+
To open a Python script with runSofa, you need to make sure the SofaPython3 plugin is available. To do so, you can click on `Edit > PluginManager` and browse the plugin list. If the plugin SofaPython3 is not present, make sure to add the associated dynamic library using the button `Add`.
62+
63+
More about SOFA & Python can be found on the [SofaPython3 documentation](https://sofapython3.readthedocs.io/en/latest).

0 commit comments

Comments
 (0)