Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hurstel
CGoGN
Commits
6c6cad56
Commit
6c6cad56
authored
Nov 15, 2013
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update import mesh to handle non-manifold edges with a pair number of faces
parent
7de130a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
14 deletions
+24
-14
include/Algo/Import/importMesh.hpp
include/Algo/Import/importMesh.hpp
+24
-14
No files found.
include/Algo/Import/importMesh.hpp
View file @
6c6cad56
...
...
@@ -92,6 +92,8 @@ bool importMesh(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts)
}
}
bool
needBijectiveCheck
=
false
;
// reconstruct neighbourhood
unsigned
int
nbBoundaryEdges
=
0
;
for
(
Dart
d
=
map
.
begin
();
d
!=
map
.
end
();
map
.
next
(
d
))
...
...
@@ -103,27 +105,31 @@ bool importMesh(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts)
unsigned
int
embd
=
map
.
template
getEmbedding
<
VERTEX
>(
d
);
Dart
good_dart
=
NIL
;
bool
firstOK
=
true
;
for
(
typename
std
::
vector
<
Dart
>::
iterator
it
=
vec
.
begin
();
it
!=
vec
.
end
()
&&
good_dart
==
NIL
;
++
it
)
{
if
(
map
.
template
getEmbedding
<
VERTEX
>(
map
.
phi1
(
*
it
))
==
embd
)
good_dart
=
*
it
;
}
if
(
good_dart
!=
NIL
)
{
if
(
good_dart
==
map
.
phi2
(
good_dart
))
{
map
.
sewFaces
(
d
,
good_dart
,
false
);
m
.
unmarkOrbit
<
EDGE
>
(
d
);
}
else
{
++
nbBoundaryEdges
;
good_dart
=
*
it
;
if
(
good_dart
==
map
.
phi2
(
good_dart
))
{
map
.
sewFaces
(
d
,
good_dart
,
false
);
m
.
unmarkOrbit
<
EDGE
>
(
d
);
}
else
{
good_dart
=
NIL
;
firstOK
=
false
;
}
}
}
else
if
(
!
firstOK
)
needBijectiveCheck
=
true
;
if
(
good_dart
==
NIL
)
{
m
.
unmark
(
d
);
m
.
unmark
Orbit
<
EDGE
>
(
d
);
++
nbBoundaryEdges
;
}
}
...
...
@@ -133,6 +139,10 @@ bool importMesh(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts)
{
unsigned
int
nbH
=
map
.
closeMap
();
CGoGNout
<<
"Map closed ("
<<
nbBoundaryEdges
<<
" boundary edges / "
<<
nbH
<<
" holes)"
<<
CGoGNendl
;
}
if
(
needBijectiveCheck
)
{
// ensure bijection between topo and embedding
map
.
template
bijectiveOrbitEmbedding
<
VERTEX
>();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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