Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dmitri Naumov
ogs
Commits
4792e6c5
Commit
4792e6c5
authored
4 years ago
by
Karsten Rink
Browse files
Options
Downloads
Patches
Plain Diff
switching to gmsh vtk output when creating geometry surfaces
parent
84367096
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Applications/FileIO/Legacy/createSurface.cpp
+5
-7
5 additions, 7 deletions
Applications/FileIO/Legacy/createSurface.cpp
with
5 additions
and
7 deletions
Applications/FileIO/Legacy/createSurface.cpp
+
5
−
7
View file @
4792e6c5
...
...
@@ -18,7 +18,6 @@
#include
"filesystem.h"
#include
"Applications/FileIO/Gmsh/GMSHInterface.h"
#include
"Applications/FileIO/Gmsh/GmshReader.h"
#include
"BaseLib/StringTools.h"
...
...
@@ -28,6 +27,7 @@
#include
"GeoLib/Polyline.h"
#include
"GeoLib/Surface.h"
#include
"MeshLib/IO/readMeshFromFile.h"
#include
"MeshLib/convertMeshToGeo.h"
#include
"MeshLib/Mesh.h"
...
...
@@ -83,11 +83,10 @@ bool createSurface(GeoLib::Polyline const& ply,
auto
msh_file
=
fs
::
temp_directory_path
()
/=
BaseLib
::
randomString
(
32
);
gmsh_io
.
writeToFile
(
geo_file
.
string
());
// Newer gmsh versions write a newer file format for meshes per default. At
// the moment we can't read this new format. This is a switch for gmsh to
// write the 'old' file format.
// Using GMSH's vtk output here so we don't have to deal with GMSH and it's
// various file format versions here
std
::
string
gmsh_command
=
"
\"
"
+
gmsh_binary
+
"
\"
-2 -algo meshadapt -format
msh22
-o "
"
\"
"
+
gmsh_binary
+
"
\"
-2 -algo meshadapt -format
vtk
-o "
+
msh_file
.
string
()
+
" "
+
geo_file
.
string
();
int
const
gmsh_return_value
=
std
::
system
(
gmsh_command
.
c_str
());
...
...
@@ -96,8 +95,7 @@ bool createSurface(GeoLib::Polyline const& ply,
WARN
(
"Call to '{:s}' returned non-zero value {:d}."
,
gmsh_command
,
gmsh_return_value
);
}
auto
surface_mesh
=
FileIO
::
GMSH
::
readGMSHMesh
(
msh_file
.
string
());
auto
surface_mesh
=
MeshLib
::
IO
::
readMeshFromFile
(
msh_file
.
string
());
if
(
!
surface_mesh
)
{
WARN
(
"The surface mesh could not be created."
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment