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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
KennethVanhoey
CGoGN
Commits
4259b169
Commit
4259b169
authored
Jul 19, 2011
by
Maire Nicolas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug map3.
parent
17d94c30
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
87 deletions
+75
-87
src/Topology/map/map3.cpp
src/Topology/map/map3.cpp
+75
-87
No files found.
src/Topology/map/map3.cpp
View file @
4259b169
...
@@ -763,34 +763,31 @@ bool Map3::foreach_dart_of_vertex(Dart d, FunctorType& f, unsigned int thread)
...
@@ -763,34 +763,31 @@ bool Map3::foreach_dart_of_vertex(Dart d, FunctorType& f, unsigned int thread)
DartMarkerStore
mv
(
*
this
,
thread
);
// Lock a marker
DartMarkerStore
mv
(
*
this
,
thread
);
// Lock a marker
bool
found
=
false
;
// Last functor return value
bool
found
=
false
;
// Last functor return value
std
::
vector
<
Dart
>
darts_list
;
//Darts that are traversed
std
::
list
<
Dart
>
darts_list
;
//Darts that are traversed
darts_list
.
reserve
(
50
);
darts_list
.
push_back
(
d
);
//Start with the dart d
darts_list
.
push_back
(
d
);
//Start with the dart d
std
::
list
<
Dart
>::
iterator
darts
;
mv
.
mark
(
d
);
mv
.
mark
(
d
);
for
(
std
::
vector
<
Dart
>::
iterator
darts
=
darts_list
.
begin
();
!
found
&&
darts
!=
darts_list
.
end
()
;
++
darts
)
for
(
darts
=
darts_list
.
begin
();
!
found
&&
darts
!=
darts_list
.
end
()
;
++
darts
)
{
{
Dart
dc
=
*
darts
;
Dart
dc
=
*
darts
;
//add phi21 and phi23 successor if they are not marked yet
//add phi21 and phi23 successor if they are not marked yet
Dart
d2
=
phi2
(
dc
);
Dart
d2
=
phi2
(
dc
);
if
(
d2
!=
dc
)
Dart
d21
=
phi1
(
d2
);
// turn in volume
{
Dart
d23
=
phi3
(
d2
);
// change volume
Dart
d21
=
phi1
(
d2
);
// turn in volume
Dart
d23
=
phi3
(
d2
);
// change volume
if
(
!
mv
.
isMarked
(
d21
))
if
(
!
mv
.
isMarked
(
d21
))
{
{
darts_list
.
push_back
(
d21
);
darts_list
.
push_back
(
d21
);
mv
.
mark
(
d21
);
mv
.
mark
(
d21
);
}
}
if
((
d23
!=
d2
)
&&
!
mv
.
isMarked
(
d23
))
if
((
d23
!=
d2
)
&&
!
mv
.
isMarked
(
d23
))
{
{
darts_list
.
push_back
(
d23
);
darts_list
.
push_back
(
d23
);
mv
.
mark
(
d23
);
mv
.
mark
(
d23
);
}
}
}
found
=
f
(
dc
);
found
=
f
(
dc
);
...
@@ -1144,75 +1141,66 @@ void Map3::closeMap(DartMarker& marker)
...
@@ -1144,75 +1141,66 @@ void Map3::closeMap(DartMarker& marker)
// this->releaseMarker(DART,mf3);
// this->releaseMarker(DART,mf3);
//}
//}
//
//
bool
Map3
::
check
()
//bool Map3::check()
{
//{
CGoGNout
<<
"Check: topology begin"
<<
CGoGNendl
;
// CGoGNout << "Check: topology begin" << CGoGNendl;
DartMarker
m
(
*
this
);
// Marker m = this->getNewMarker();
m
.
unmarkAll
();
// for(Dart d = this->begin(); d != this->end(); this->next(d))
for
(
Dart
d
=
this
->
begin
();
d
!=
this
->
end
();
this
->
next
(
d
))
// {
{
// Dart d3 = phi3(d);
Dart
d3
=
phi3
(
d
);
// if (phi3(d3) != d) // phi3 involution ?
if
(
phi3
(
d3
)
!=
d
)
// phi3 involution ?
// {
{
// CGoGNout << "Check: phi3 is not an involution" << CGoGNendl;
CGoGNout
<<
"Check: phi3 is not an involution"
<<
CGoGNendl
;
// return false;
return
false
;
// }
}
//
// Dart d2 = phi2(d);
if
(
d3
!=
d
)
// if (phi2(d2) != d) // phi2 involution ?
{
// {
if
(
phi1
(
d3
)
!=
phi3
(
phi_1
(
d
)))
// CGoGNout << "Check: phi2 is not an involution" << CGoGNendl;
{
// return false;
CGoGNout
<<
"Check: phi3 , faces are not entirely sewn"
<<
CGoGNendl
;
// }
return
false
;
//
}
// Dart d1 = phi1(d);
}
// if (phi_1(d1) != d) // phi1 a une image correcte ?
// {
Dart
d2
=
phi2
(
d
);
// CGoGNout << "Check: unconsistent phi_1 link" << CGoGNendl;
if
(
phi2
(
d2
)
!=
d
)
// phi2 involution ?
// return false;
{
// }
CGoGNout
<<
"Check: phi2 is not an involution"
<<
CGoGNendl
;
//
return
false
;
// if (isMarkedDart(d1,m)) // phi1 a un seul antécédent ?
}
// {
// CGoGNout << "Check: dart with two phi1 predecessors" << CGoGNendl;
Dart
d1
=
phi1
(
d
);
// return false;
if
(
phi_1
(
d1
)
!=
d
)
// phi1 a une image correcte ?
// }
{
// markOrbit(DART,d1,m);
CGoGNout
<<
"Check: unconsistent phi_1 link"
<<
CGoGNendl
;
//
return
false
;
// if (d1 == d)
}
// CGoGNout << "Check: (warning) face loop (one edge)" << CGoGNendl;
//
if
(
m
.
isMarked
(
d1
))
// phi1 a un seul antécédent ?
// if (phi1(d1) == d)
{
// CGoGNout << "Check: (warning) face with only two edges" << CGoGNendl;
CGoGNout
<<
"Check: dart with two phi1 predecessors"
<<
CGoGNendl
;
//
return
false
;
// if (phi2(d1) == d)
}
// CGoGNout << "Check: (warning) dandling edge (phi2)" << CGoGNendl;
m
.
mark
(
d1
);
//
// if (phi3(d1) == d)
if
(
d1
==
d
)
// CGoGNout << "Check: (warning) dandling edge (phi3)" << CGoGNendl;
CGoGNout
<<
"Check: (warning) face loop (one edge)"
<<
CGoGNendl
;
// }
//
if
(
phi1
(
d1
)
==
d
)
// for(Dart d = this->begin(); d != this->end(); this->next(d))
CGoGNout
<<
"Check: (warning) face with only two edges"
<<
CGoGNendl
;
// {
// if (!isMarkedDart(d,m)) // phi1 a au moins un antécédent ?
if
(
phi2
(
d1
)
==
d
)
// {
CGoGNout
<<
"Check: (warning) dandling edge (phi2)"
<<
CGoGNendl
;
// CGoGNout << "Check: dart with no phi1 predecessor" << CGoGNendl;
// return false;
if
(
phi3
(
d1
)
==
d
)
// }
CGoGNout
<<
"Check: (warning) dandling edge (phi3)"
<<
CGoGNendl
;
// }
}
// this->unmarkAll(DART,m);
// this->releaseMarker(DART,m);
for
(
Dart
d
=
this
->
begin
();
d
!=
this
->
end
();
this
->
next
(
d
))
// CGoGNout << "Check: topology ok" << CGoGNendl;
{
// return true;
if
(
!
m
.
isMarked
(
d
))
// phi1 a au moins un antécédent ?
//}
{
CGoGNout
<<
"Check: dart with no phi1 predecessor"
<<
CGoGNendl
;
return
false
;
}
}
CGoGNout
<<
"Check: topology ok"
<<
CGoGNendl
;
return
true
;
}
...
...
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