Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenFlipper-Free
Plugin-MeshRepair
Commits
55ea6cbc
Commit
55ea6cbc
authored
Nov 06, 2022
by
Edwin Özdemir
Browse files
minor fix
parent
6dab54a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
MeshFixingT_impl.hh
View file @
55ea6cbc
/*===========================================================================*\
* *
* OpenMesh *
...
...
@@ -221,32 +220,33 @@ void MeshFixing<MeshT>::fix_topology()
// Possible relocation of vertices_ so we need to update the references!
std
::
vector
<
unsigned
int
>&
vfaces
=
vertices_
[
v
].
faces
;
std
::
vector
<
unsigned
int
>::
iterator
f_it
,
f_end
(
vfaces
.
end
());
// Update the face indices of the current component
bool
finished
=
false
;
while
(
!
finished
)
{
finished
=
true
;
for
(
auto
f_it
:
vfaces
)
{
for
(
f_it
=
vfaces
.
begin
(),
f_end
=
vfaces
.
end
();
f_it
!=
f_end
;
++
f_it
)
{
// If the face belongs to the current component
if
(
faces_
[
f_it
].
component
==
c
)
{
if
(
faces_
[
*
f_it
].
component
==
c
)
{
// Iterate over its vertices
for
(
unsigned
int
i
=
0
;
i
<
3
;
++
i
)
{
// Relink to the new vertex by updating the face and pushing it in as new
if
(
faces_
[
f_it
].
v
[
i
]
==
v
)
{
faces_
[
f_it
].
v
[
i
]
=
newVertex
;
vertices_
[
newVertex
].
faces
.
push_back
(
f_it
);
if
(
faces_
[
*
f_it
].
v
[
i
]
==
v
)
{
faces_
[
*
f_it
].
v
[
i
]
=
newVertex
;
vertices_
[
newVertex
].
faces
.
push_back
(
*
f_it
);
finished
=
false
;
}
}
// Erase the old one
vfaces
.
erase
(
std
::
remove
(
vfaces
.
begin
(),
vfaces
.
end
(),
f_it
),
vfaces
.
end
()
);
vfaces
.
erase
(
f_it
);
break
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment