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
Karsten Rink
ogs
Commits
2b19d191
Commit
2b19d191
authored
9 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
[MGTL] Omit projectMeshOntoPlane().
parent
cafd2e49
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
MeshGeoToolsLib/GeoMapper.cpp
+9
-4
9 additions, 4 deletions
MeshGeoToolsLib/GeoMapper.cpp
with
9 additions
and
4 deletions
MeshGeoToolsLib/GeoMapper.cpp
+
9
−
4
View file @
2b19d191
...
@@ -99,9 +99,13 @@ void GeoMapper::mapOnMesh(const MeshLib::Mesh* mesh)
...
@@ -99,9 +99,13 @@ void GeoMapper::mapOnMesh(const MeshLib::Mesh* mesh)
// init grid
// init grid
MathLib
::
Point3d
origin
(
std
::
array
<
double
,
3
>
{{
0
,
0
,
0
}});
MathLib
::
Point3d
origin
(
std
::
array
<
double
,
3
>
{{
0
,
0
,
0
}});
MathLib
::
Vector3
normal
(
0
,
0
,
-
1
);
MathLib
::
Vector3
normal
(
0
,
0
,
-
1
);
MeshLib
::
Mesh
const
*
const
flat_mesh
=
std
::
vector
<
MeshLib
::
Node
*>
flat_nodes
;
MeshLib
::
projectMeshOntoPlane
(
*
_surface_mesh
,
origin
,
normal
);
// copy nodes and project the copied nodes to the x-y-plane, i.e. set
std
::
vector
<
MeshLib
::
Node
*>
const
&
flat_nodes
(
flat_mesh
->
getNodes
());
// z-coordinate to zero
for
(
auto
n_ptr
:
_surface_mesh
->
getNodes
())
{
flat_nodes
.
push_back
(
new
MeshLib
::
Node
(
*
n_ptr
));
(
*
flat_nodes
.
back
())[
2
]
=
0.0
;
}
_grid
=
new
GeoLib
::
Grid
<
MeshLib
::
Node
>
(
flat_nodes
.
cbegin
(),
flat_nodes
.
cend
());
_grid
=
new
GeoLib
::
Grid
<
MeshLib
::
Node
>
(
flat_nodes
.
cbegin
(),
flat_nodes
.
cend
());
if
(
GeoLib
::
isStation
((
*
pnts
)[
0
]))
{
if
(
GeoLib
::
isStation
((
*
pnts
)[
0
]))
{
...
@@ -111,7 +115,8 @@ void GeoMapper::mapOnMesh(const MeshLib::Mesh* mesh)
...
@@ -111,7 +115,8 @@ void GeoMapper::mapOnMesh(const MeshLib::Mesh* mesh)
}
}
delete
_grid
;
delete
_grid
;
delete
flat_mesh
;
for
(
auto
n_ptr
:
flat_nodes
)
delete
n_ptr
;
}
}
void
GeoMapper
::
mapToConstantValue
(
double
value
)
void
GeoMapper
::
mapToConstantValue
(
double
value
)
...
...
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