Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynamic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
MostafaMollaali
dynamic
Commits
0ca79a31
Commit
0ca79a31
authored
8 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
[MGTL] Deep copy of seg to avoid modifying orig. pnts.
parent
1092652b
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
+7
-4
7 additions, 4 deletions
MeshGeoToolsLib/GeoMapper.cpp
with
7 additions
and
4 deletions
MeshGeoToolsLib/GeoMapper.cpp
+
7
−
4
View file @
0ca79a31
...
@@ -413,14 +413,17 @@ static void mapPointOnSurfaceElement(MeshLib::Element const& elem,
...
@@ -413,14 +413,17 @@ static void mapPointOnSurfaceElement(MeshLib::Element const& elem,
static
std
::
vector
<
MeshLib
::
Element
const
*>
static
std
::
vector
<
MeshLib
::
Element
const
*>
getCandidateElementsForLineSegmentIntersection
(
getCandidateElementsForLineSegmentIntersection
(
MeshLib
::
MeshElementGrid
const
&
mesh_element_grid
,
MeshLib
::
MeshElementGrid
const
&
mesh_element_grid
,
GeoLib
::
LineSegment
segment
)
GeoLib
::
LineSegment
const
&
segment
)
{
{
GeoLib
::
LineSegment
seg_deep_copy
(
new
GeoLib
::
Point
(
segment
.
getBeginPoint
()),
new
GeoLib
::
Point
(
segment
.
getEndPoint
()),
true
);
// modify z coordinates such that all surface elements around the line
// modify z coordinates such that all surface elements around the line
// segment are found
// segment are found
seg
ment
.
getBeginPoint
()[
2
]
=
mesh_element_grid
.
getMinPoint
()[
2
];
seg
_deep_copy
.
getBeginPoint
()[
2
]
=
mesh_element_grid
.
getMinPoint
()[
2
];
seg
ment
.
getEndPoint
()[
2
]
=
mesh_element_grid
.
getMaxPoint
()[
2
];
seg
_deep_copy
.
getEndPoint
()[
2
]
=
mesh_element_grid
.
getMaxPoint
()[
2
];
std
::
array
<
MathLib
::
Point3d
,
2
>
const
pnts
{
std
::
array
<
MathLib
::
Point3d
,
2
>
const
pnts
{
{
seg
ment
.
getBeginPoint
(),
seg
ment
.
getEndPoint
()}};
{
seg
_deep_copy
.
getBeginPoint
(),
seg
_deep_copy
.
getEndPoint
()}};
GeoLib
::
AABB
aabb
(
pnts
.
cbegin
(),
pnts
.
cend
());
GeoLib
::
AABB
aabb
(
pnts
.
cbegin
(),
pnts
.
cend
());
auto
candidate_elements
=
mesh_element_grid
.
getElementsInVolume
(
auto
candidate_elements
=
mesh_element_grid
.
getElementsInVolume
(
...
...
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