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
Thomas Pitiot
CGoGN
Commits
a8449583
Commit
a8449583
authored
Sep 05, 2011
by
Sylvain Thery
Browse files
bug mergeCloseVertices (pb possible avec petit maillage)
parent
69cbf02a
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/Algo/Import/import2tablesSurface.hpp
View file @
a8449583
...
...
@@ -1195,24 +1195,24 @@ bool MeshTablesSurface<PFP>::mergeCloseVertices()
newIndices
[
i
]
=
0xffffffff
;
}
// compute EPSILON: average length of 50 of 100 first edges of
first
faces divide by 10000
int
nb
=
100
;
if
(
m_nbEdges
.
size
()
<
100
)
nb
=
m_nb
Edges
.
size
()
;
// compute EPSILON: average length of 50 of 100 first edges of faces divide by 10000
(very very closed)
unsigned
int
nb
f
=
100
;
if
(
nbf
>
m_nbFaces
)
nb
f
=
m_nb
Faces
;
int
k
=
0
;
typename
PFP
::
REAL
d
=
0
;
for
(
int
i
=
0
;
i
<
nb
;
i
+=
2
)
double
d
=
0
;
for
(
unsigned
int
i
=
0
;
i
<
nb
f
;
++
i
)
{
typename
PFP
::
VEC3
e1
=
positions
[
m_emb
[
k
+
1
]]
-
positions
[
m_emb
[
k
]];
d
+=
e1
.
norm
();
d
+=
double
(
e1
.
norm
()
)
;
k
+=
m_nbEdges
[
i
];
}
d
/=
float
(
nb
/
2
);
typename
PFP
::
REAL
EPSILON
=
d
/
10000.0
f
;
d
/=
double
(
nbf
);
typename
PFP
::
REAL
EPSILON
=
d
/
10000.0
;
// traverse vertices
for
(
unsigned
int
i
=
positions
.
begin
();
i
!=
positions
.
end
();
positions
.
next
(
i
))
{
...
...
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