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
Özgür Ozan Sen
ogs
Commits
c6533edf
Commit
c6533edf
authored
8 years ago
by
Karsten Rink
Browse files
Options
Downloads
Patches
Plain Diff
changed return value
parent
7dfef54a
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/Utils/MeshEdit/moveMeshNodes.cpp
+8
-8
8 additions, 8 deletions
Applications/Utils/MeshEdit/moveMeshNodes.cpp
with
8 additions
and
8 deletions
Applications/Utils/MeshEdit/moveMeshNodes.cpp
+
8
−
8
View file @
c6533edf
...
...
@@ -85,7 +85,7 @@ int main (int argc, char* argv[])
INFO
(
"
\t
-LOWPASS : applies a lowpass filter over node elevation using "
"directly connected nodes."
);
return
-
1
;
return
EXIT_FAILURE
;
}
const
std
::
string
msh_name
(
argv
[
1
]);
...
...
@@ -95,7 +95,7 @@ int main (int argc, char* argv[])
{
ERR
(
"Error: Parameter 1 must be a mesh-file (*.msh / *.vtu)."
);
INFO
(
"Usage: %s <msh-file.gml> <keyword> <value>"
,
argv
[
0
]);
return
-
1
;
return
EXIT_FAILURE
;
}
bool
is_keyword
(
false
);
...
...
@@ -111,7 +111,7 @@ int main (int argc, char* argv[])
ERR
(
"Keyword not recognised. Available keywords:"
);
for
(
auto
const
&
keyword
:
keywords
)
INFO
(
"
\t
%s"
,
keyword
.
c_str
());
return
-
1
;
return
EXIT_FAILURE
;
}
std
::
unique_ptr
<
MeshLib
::
Mesh
>
mesh
(
MeshLib
::
IO
::
readMeshFromFile
(
msh_name
));
...
...
@@ -129,7 +129,7 @@ int main (int argc, char* argv[])
if
(
argc
<
5
)
{
ERR
(
"Missing parameter..."
);
return
-
1
;
return
EXIT_FAILURE
;
}
const
std
::
string
dir
(
argv
[
3
]);
unsigned
idx
=
(
dir
.
compare
(
"x"
)
==
0
)
?
0
:
(
dir
.
compare
(
"y"
)
==
0
)
?
1
:
2
;
...
...
@@ -151,16 +151,16 @@ int main (int argc, char* argv[])
if
(
argc
<
5
)
{
ERR
(
"Missing parameter..."
);
return
-
1
;
return
EXIT_FAILURE
;
}
const
std
::
string
value
(
argv
[
3
]);
double
max_dist
(
pow
(
strtod
(
argv
[
4
],
0
),
2
));
double
offset
(
0.0
);
// additional offset for elevation (should be 0)
std
::
unique_ptr
<
MeshLib
::
Mesh
>
ground_truth
(
MeshLib
::
IO
::
readMeshFromFile
(
value
));
if
(
mes
h
==
nullptr
)
if
(
ground_trut
h
==
nullptr
)
{
ERR
(
"Error reading mesh file."
);
return
1
;
return
EXIT_FAILURE
;
}
const
std
::
vector
<
MeshLib
::
Node
*>&
ground_truth_nodes
(
ground_truth
->
getNodes
());
...
...
@@ -211,5 +211,5 @@ int main (int argc, char* argv[])
MeshLib
::
IO
::
VtuInterface
vtu
(
mesh
.
get
(),
0
,
false
);
vtu
.
writeToFile
(
msh_name
.
substr
(
0
,
msh_name
.
length
()
-
4
)
+
"_new.vtu"
);
return
1
;
return
EXIT_SUCCESS
;
}
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