You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mmg is an open source software for bidimensional and tridimensional surface and volume remeshing.
4
17
5
18
It provides 3 applications and 4 libraries:
6
-
* the **mmg2d** application and library: adaptation and optimization of a bidimensionnal triangulation;
19
+
* the **mmg2d** application and library: mesh generation from a set of edges, adaptation and optimization of a bidimensionnal triangulation and isovalue discretization;
7
20
* the **mmgs** application and library: adaptation and optimization of a surface triangulation and isovalue discretization;
8
-
* the **mmg3d** application and library: adaptation and optimization of a tetrahedral mesh and implicit domain meshing;
21
+
* the **mmg3d** application and library: adaptation and optimization of a tetrahedral mesh, isovalue discretization and lagrangian movement;
9
22
* the **mmg** library gathering the **mmg2d**, **mmgs** and **mmg3d** libraries.
10
23
11
24
[//]: #( comment )
12
25
13
26
## Get and compile the mmg project
27
+
### Needed tools
28
+
To get and build Mmg, you will need:
29
+
***Git**: to download the code you will have to use a git manager. You can install a git manager from the link below but there are many other git clients that you can use:
30
+
*[Official Git client](https://git-scm.com/download) (command line program)
31
+
*[GitKraken](https://www.gitkraken.com/)
32
+
*[SourceTree](https://www.sourcetreeapp.com/)
33
+
34
+
Note that if you uses Microsoft Visual Studio (Windows OS), you can simply activate the Git Module of the application.
35
+
36
+
***CMake** : Mmg uses the CMake building system that can be downloaded on the
37
+
following web page:
38
+
[https://cmake.org/download/](https://cmake.org/download/). On Windows OS,
39
+
once CMake is installed, please <spanstyle="color:red"> do not forget to
@@ -27,19 +62,71 @@ It provides 3 applications and 4 libraries:
27
62
* **_src/common/_** for files related to the both.
28
63
29
64
2. Fast compilation (build both **mmg2d**, **mmgs**, **mmg3d**, the mmg2d static library (**libmmg3d.a**), the mmgs static library (**libmmgs.a**), the mmg3d static library (**libmmg3d.a**) and the mmg static library (**libmmg.a**)):
30
-
```Shell
65
+
```Shell
31
66
cd mmg
32
67
mkdir build
33
68
cd build
34
69
cmake ..
35
70
make
36
71
make install
37
-
```
72
+
```
73
+
38
74
If the `make install` command fail, try to run the `sudo make install` command.
39
-
If you don't have root access, please refers to the [Installation] section(https://github.com/MmgTools/Mmg/wiki/Setup-guide#iii-installation) of the [setup guide](https://github.com/MmgTools/Mmg/wiki/Setup-guide#setup-guide).
75
+
If you don't have root access, please refers to the [Installation section](https://github.com/MmgTools/Mmg/wiki/Setup-guide#iii-installation) of the [setup guide](https://github.com/MmgTools/Mmg/wiki/Setup-guide#setup-guide).
40
76
41
77
The **mmg2d**, **mmgs** and **mmg3d** applications are available under the `mmg2d_O3`, `mmgs_O3` and `mmg3d_O3` commands.
42
78
79
+
Note that if you use some specific options and want to set it easily, you can use a shell script to execute the previous commands. An example is provided [here](https://github.com/MmgTools/mmg/wiki/Configure-script-for-CMake-(UNIX-like-OS)).
80
+
81
+
#### Windows OS
82
+
The following compilation can be performed in any modern version of *Windows*
83
+
(AKA 7, 8, 8.1 and 10). A basic knowledge of Windows is assumed (execute
84
+
commands in cmd, create directories, etc...).
85
+
86
+
##### Compile with VisualStudio
87
+
88
+
Universal windows platform development
89
+
1. Get the **Visual Studio** software: it can be downloaded [here](https://www.visualstudio.com/downloads/);
90
+
91
+
2. if not done during the previous step, download **C/C++** compilers: in the Visual Studio searching zone, search **C compiler** and install the **"Visual C++ compilers and libraries"** (individual componant) and the MSBuild componant;
92
+
93
+
3. in the Visual Studio searching zone, search the **git** word and select the installation of the **"GitHub extension for VisualStudio"**;
94
+
95
+
4. stay in VisualStudio and clone the Mmg repository from the following url: https://github.com/MmgTools/mmg.git;
96
+
97
+
5. Use **CMake** to configure and generate your project. It can be done either with the graphic mode of CMake (you have to select the "VisualStudio" generator) or with a command line. In this case, it is highly recommended to specify that you intent to build a VisualStudio project.
98
+
For example, if you are using VisualStudio 2017:
99
+
```Shell
100
+
cmake -G "Visual Studio 15 2017 Win64" ^
101
+
configure
102
+
```
103
+
104
+
Note that you can use a script to make this step easier (an example of script is provided [here](https://github.com/MmgTools/mmg/wiki/Configure-script-for-CMake-(Windows-OS))).
105
+
106
+
Once the configuration script has finished without errors a `mmg.sln` file will be generated in the cmake_build directory.
107
+
108
+
6. Double click this file and the visual studio project will open. Then choose the project configuration (Release, Debug...).
109
+
Please, make sure that the project is set to Win32 or x64 and change it if is not.
110
+
Finally, in order to compile Mmg, right click the `INSTALL` project and select the option `BUILD`.
111
+
112
+
##### Compile with MinGW
113
+
114
+
1. Get a **C Compiler**:
115
+
***MinGW** can be downloaded [here](http://mingw.org/). We recommand to install the *mingw-developer-tools*, *mingw32-base*, *mingw32-gcc-fortran*, *mingw32-gcc-g++* and *msys-base* packages;
116
+
* Edit the environment variables and add MinGW in your **PATH** variable. It can be done in the **advanced system settings** panel. (note that you must modify the **PATH** variable, not the **Path** one);
117
+
***MinGW** binaries are probably in **C:\MinGW\bin**
118
+
* the MinGW terminal is in **C:\MinGW\msys\1.0\msys**
119
+
120
+
2. Clone the Mmg repository from the following url: https://github.com/MmgTools/mmg.git;
121
+
122
+
3. Quit and restart the *CMake* application to take the PATH modification into account then use CMake to configure and generate your project (select the MinGW Makefiles generator of CMake). If you have installed the scotch libraries, you will need to set explicitely the libraries paths;
123
+
4. Build the Mmg applications: in the minGW prompt (**C:\MinGW\msys\1.0\msys**) run:
124
+
```Shell
125
+
mingw32-make
126
+
```
127
+
128
+
Again, if you use some specific options and want to make the CMake configuration step easier, you can use a batch script. An example of script is provided [here](https://github.com/MmgTools/mmg/wiki/Configure-script-for-CMake-(Windows-OS)).
129
+
43
130
## Documentation
44
131
### Project's web page
45
132
Project's actualities and software tutorials can be found on the [mmgtools](http://www.mmgtools.org) web page.
0 commit comments