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
d673743f
Commit
d673743f
authored
Sep 21, 2011
by
Thomas
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of cgogn.u-strasbg.fr:~untereiner/CGoGN
Conflicts: src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
parents
0b369ef6
d313283f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
239 additions
and
147 deletions
+239
-147
include/Algo/ImplicitHierarchicalMesh/ihm3.h
include/Algo/ImplicitHierarchicalMesh/ihm3.h
+5
-0
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
+125
-129
include/Topology/map/map2.h
include/Topology/map/map2.h
+14
-0
include/Topology/map/map3.h
include/Topology/map/map3.h
+0
-1
src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
+50
-6
src/Topology/map/map2.cpp
src/Topology/map/map2.cpp
+34
-0
src/Topology/map/map3.cpp
src/Topology/map/map3.cpp
+11
-11
No files found.
include/Algo/ImplicitHierarchicalMesh/ihm3.h
View file @
d673743f
...
...
@@ -254,6 +254,11 @@ public:
*/
bool
edgeCanBeCoarsened
(
Dart
d
);
/**
*
*/
bool
faceCanBeCoarsened
(
Dart
d
);
/**
*
*/
...
...
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
View file @
d673743f
...
...
@@ -527,119 +527,119 @@ Dart subdivideVolumeGen(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& pos
std
::
cout
<<
"2e etape finished"
<<
std
::
endl
;
//
{
//
//Third step : 3-sew internal faces
//
for (std::vector<std::pair<Dart,Dart> >::iterator it = subdividedfacesT.begin(); it != subdividedfacesT.end(); ++it)
//
{
//
Dart f1 = (*it).first;
//
Dart f2 = (*it).second;
//
//
//
//
if(map.phi3(map.phi2(f1)) == map.phi2(f1) && map.phi3(map.phi2(f2)) == map.phi2(f2))
//
{
//
if(map.getEmbedding(VERTEX, map.phi_1(map.phi2(f2))) == map.getEmbedding(VERTEX, map.phi_1(map.phi2(f1))))
//
{
//
map.Map3::sewVolumes(map.phi2(f2), map.phi2(f1));
//
}
//
else
//
{
//
//
//id pour toutes les faces interieures
//
map.sewVolumes(map.phi2(f2), map.phi2(f1));
//
//
//
}
//
//
//Fais a la couture !!!!!
//
unsigned int idface = map.getNewFaceId();
//
map.setFaceId(map.phi2(f1),idface, FACE);
//
}
//
//
//
//FAIS a la couture !!!!!!!
//
//id pour toutes les aretes exterieurs des faces quadrangulees
//
unsigned int idedge = map.getEdgeId(f1);
//
map.setEdgeId(map.phi2(f1), idedge, DART);
//
map.setEdgeId( map.phi2(f2), idedge, DART);
//
//
}
//
//
//LA copie de L'id est a gerer avec le sewVolumes normalement !!!!!!
//
//id pour les aretes interieurs : (i.e. 16 pour un octa)
//
DartMarker mne(map);
//
for(std::vector<Dart>::iterator it = newEdges.begin() ; it != newEdges.end() ; ++it)
//
{
//
if(!mne.isMarked(*it))
//
{
//
unsigned int idedge = map.getNewEdgeId();
//
map.setEdgeId(*it, idedge, EDGE);
//
mne.markOrbit(EDGE,*it);
//
}
//
}
//
}
//
//
{
//
//Third step : 3-sew internal faces
//
for (std::vector<std::pair<Dart,Dart> >::iterator it = subdividedfacesQ.begin(); it != subdividedfacesQ.end(); ++it)
//
{
//
Dart f1 = (*it).first;
//
Dart f2 = (*it).second;
//
//
if(map.phi3(map.phi2(f1)) == map.phi2(f1) && map.phi3(map.phi2(f2)) == map.phi2(f2))
//
{
//
//id pour toutes les faces interieures
//
map.sewVolumes(map.phi2(f2), map.phi2(f1));
//
//
//Fais a la couture !!!!!
//
unsigned int idface = map.getNewFaceId();
//
map.setFaceId(map.phi2(f1),idface, FACE);
//
}
//
//
//FAIS a la couture !!!!!!!
//
//id pour toutes les aretes exterieurs des faces quadrangulees
//
unsigned int idedge = map.getEdgeId(f1);
//
map.setEdgeId(map.phi2(f1), idedge, DART);
//
map.setEdgeId( map.phi2(f2), idedge, DART);
//
}
//
//LA copie de L'id est a gerer avec le sewVolumes normalement !!!!!!
//
//id pour les aretes interieurs : (i.e. 16 pour un octa)
//
DartMarker mne(map);
//
for(std::vector<Dart>::iterator it = newEdges.begin() ; it != newEdges.end() ; ++it)
//
{
//
if(!mne.isMarked(*it))
//
{
//
unsigned int idedge = map.getNewEdgeId();
//
map.setEdgeId(*it, idedge, EDGE);
//
mne.markOrbit(EDGE,*it);
//
}
//
}
//
}
//
//
//
//cas tordu pour le prisme
//
for (std::vector<std::pair<Dart,Dart> >::iterator it = subdividedfacesT.begin(); it != subdividedfacesT.end(); ++it)
//
{
//
Dart f1 = (*it).first;
//
Dart f2 = (*it).second;
//
//
if( !(map.Map2::faceDegree(f2) == 3 && map.Map2::faceDegree(map.phi2(f2)) == 3 &&
//
map.Map2::faceDegree(map.phi2(map.phi1(f2))) == 3 && map.Map2::faceDegree(map.phi2(map.phi_1(f2))) == 3))
//
{
//
//
//
if(map.phi2(map.phi1(map.phi1(map.phi2(f1)))) == map.phi3(map.phi2(map.phi1(map.phi1(map.phi2(f1))))) &&
//
map.phi2(map.phi3(map.phi2(map.phi3(map.phi2(map.phi3(map.phi2(map.phi2(map.phi1(map.phi1(map.phi2(f1))))))))))) ==
//
map.phi3(map.phi2(map.phi3(map.phi2(map.phi3(map.phi2(map.phi3(map.phi2(map.phi2(map.phi1(map.phi1(map.phi2(f1))))))))))))
//
)
//
{
//
map.sewVolumes(map.phi2(map.phi1(map.phi1(map.phi2(f1)))),
//
map.phi2(map.phi3(map.phi2(map.phi3(map.phi2(map.phi3(map.phi1(map.phi1(map.phi2(f1))))))))));
//
}
//
//
}
//
//
}
{
//Third step : 3-sew internal faces
for
(
std
::
vector
<
std
::
pair
<
Dart
,
Dart
>
>::
iterator
it
=
subdividedfacesT
.
begin
();
it
!=
subdividedfacesT
.
end
();
++
it
)
{
Dart
f1
=
(
*
it
).
first
;
Dart
f2
=
(
*
it
).
second
;
if
(
map
.
phi3
(
map
.
phi2
(
f1
))
==
map
.
phi2
(
f1
)
&&
map
.
phi3
(
map
.
phi2
(
f2
))
==
map
.
phi2
(
f2
))
{
if
(
map
.
getEmbedding
(
VERTEX
,
map
.
phi_1
(
map
.
phi2
(
f2
)))
==
map
.
getEmbedding
(
VERTEX
,
map
.
phi_1
(
map
.
phi2
(
f1
))))
{
map
.
Map3
::
sewVolumes
(
map
.
phi2
(
f2
),
map
.
phi2
(
f1
));
}
else
{
//id pour toutes les faces interieures
map
.
sewVolumes
(
map
.
phi2
(
f2
),
map
.
phi2
(
f1
));
}
//Fais a la couture !!!!!
unsigned
int
idface
=
map
.
getNewFaceId
();
map
.
setFaceId
(
map
.
phi2
(
f1
),
idface
,
FACE
);
}
//FAIS a la couture !!!!!!!
//id pour toutes les aretes exterieurs des faces quadrangulees
unsigned
int
idedge
=
map
.
getEdgeId
(
f1
);
map
.
setEdgeId
(
map
.
phi2
(
f1
),
idedge
,
DART
);
map
.
setEdgeId
(
map
.
phi2
(
f2
),
idedge
,
DART
);
}
//LA copie de L'id est a gerer avec le sewVolumes normalement !!!!!!
//id pour les aretes interieurs : (i.e. 16 pour un octa)
DartMarker
mne
(
map
);
for
(
std
::
vector
<
Dart
>::
iterator
it
=
newEdges
.
begin
()
;
it
!=
newEdges
.
end
()
;
++
it
)
{
if
(
!
mne
.
isMarked
(
*
it
))
{
unsigned
int
idedge
=
map
.
getNewEdgeId
();
map
.
setEdgeId
(
*
it
,
idedge
,
EDGE
);
mne
.
markOrbit
(
EDGE
,
*
it
);
}
}
}
{
//Third step : 3-sew internal faces
for
(
std
::
vector
<
std
::
pair
<
Dart
,
Dart
>
>::
iterator
it
=
subdividedfacesQ
.
begin
();
it
!=
subdividedfacesQ
.
end
();
++
it
)
{
Dart
f1
=
(
*
it
).
first
;
Dart
f2
=
(
*
it
).
second
;
if
(
map
.
phi3
(
map
.
phi2
(
f1
))
==
map
.
phi2
(
f1
)
&&
map
.
phi3
(
map
.
phi2
(
f2
))
==
map
.
phi2
(
f2
))
{
//id pour toutes les faces interieures
map
.
sewVolumes
(
map
.
phi2
(
f2
),
map
.
phi2
(
f1
));
//Fais a la couture !!!!!
unsigned
int
idface
=
map
.
getNewFaceId
();
map
.
setFaceId
(
map
.
phi2
(
f1
),
idface
,
FACE
);
}
//FAIS a la couture !!!!!!!
//id pour toutes les aretes exterieurs des faces quadrangulees
unsigned
int
idedge
=
map
.
getEdgeId
(
f1
);
map
.
setEdgeId
(
map
.
phi2
(
f1
),
idedge
,
DART
);
map
.
setEdgeId
(
map
.
phi2
(
f2
),
idedge
,
DART
);
}
//LA copie de L'id est a gerer avec le sewVolumes normalement !!!!!!
//id pour les aretes interieurs : (i.e. 16 pour un octa)
DartMarker
mne
(
map
);
for
(
std
::
vector
<
Dart
>::
iterator
it
=
newEdges
.
begin
()
;
it
!=
newEdges
.
end
()
;
++
it
)
{
if
(
!
mne
.
isMarked
(
*
it
))
{
unsigned
int
idedge
=
map
.
getNewEdgeId
();
map
.
setEdgeId
(
*
it
,
idedge
,
EDGE
);
mne
.
markOrbit
(
EDGE
,
*
it
);
}
}
}
//cas tordu pour le prisme
for
(
std
::
vector
<
std
::
pair
<
Dart
,
Dart
>
>::
iterator
it
=
subdividedfacesT
.
begin
();
it
!=
subdividedfacesT
.
end
();
++
it
)
{
Dart
f1
=
(
*
it
).
first
;
Dart
f2
=
(
*
it
).
second
;
if
(
!
(
map
.
Map2
::
faceDegree
(
f2
)
==
3
&&
map
.
Map2
::
faceDegree
(
map
.
phi2
(
f2
))
==
3
&&
map
.
Map2
::
faceDegree
(
map
.
phi2
(
map
.
phi1
(
f2
)))
==
3
&&
map
.
Map2
::
faceDegree
(
map
.
phi2
(
map
.
phi_1
(
f2
)))
==
3
))
{
if
(
map
.
phi2
(
map
.
phi1
(
map
.
phi1
(
map
.
phi2
(
f1
))))
==
map
.
phi3
(
map
.
phi2
(
map
.
phi1
(
map
.
phi1
(
map
.
phi2
(
f1
)))))
&&
map
.
phi2
(
map
.
phi3
(
map
.
phi2
(
map
.
phi3
(
map
.
phi2
(
map
.
phi3
(
map
.
phi2
(
map
.
phi2
(
map
.
phi1
(
map
.
phi1
(
map
.
phi2
(
f1
)))))))))))
==
map
.
phi3
(
map
.
phi2
(
map
.
phi3
(
map
.
phi2
(
map
.
phi3
(
map
.
phi2
(
map
.
phi3
(
map
.
phi2
(
map
.
phi2
(
map
.
phi1
(
map
.
phi1
(
map
.
phi2
(
f1
))))))))))))
)
{
map
.
sewVolumes
(
map
.
phi2
(
map
.
phi1
(
map
.
phi1
(
map
.
phi2
(
f1
)))),
map
.
phi2
(
map
.
phi3
(
map
.
phi2
(
map
.
phi3
(
map
.
phi2
(
map
.
phi3
(
map
.
phi1
(
map
.
phi1
(
map
.
phi2
(
f1
))))))))));
}
}
}
map
.
setCurrentLevel
(
cur
)
;
...
...
@@ -748,7 +748,7 @@ Dart subdivideVolume(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& positi
//test si la face est triangulaire ou non
if
(
map
.
phi1
(
map
.
phi1
(
map
.
phi1
(
d
)))
==
d
)
{
std
::
cout
<<
"trian"
<<
std
::
endl
;
//
std::cout << "trian" << std::endl;
Dart
cf
=
map
.
phi2
(
map
.
phi1
(
d
));
Dart
e
=
cf
;
do
...
...
@@ -759,7 +759,7 @@ Dart subdivideVolume(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& positi
}
else
{
std
::
cout
<<
"quad"
<<
std
::
endl
;
//
std::cout << "quad" << std::endl;
Dart
cf
=
map
.
phi1
(
d
);
Dart
e
=
cf
;
do
...
...
@@ -1457,11 +1457,13 @@ void coarsenFace(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& position)
map
.
setCurrentLevel
(
cur
)
;
}
// fit = d ;
// do
// {
// if(map.edgeCanBeCoarsened(fit))
// coarsenEdge<PFP>(map, fit, position) ;
//
// fit = map.phi1(fit) ;
// } while(fit != d) ;
}
...
...
@@ -1484,7 +1486,7 @@ void coarsenVolume(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& position
//Store faces that are traversed and start with the face of d
std
::
vector
<
Dart
>
visitedFaces
;
visitedFaces
.
reserve
(
20
);
visitedFaces
.
reserve
(
512
);
visitedFaces
.
push_back
(
d
);
mf
.
markOrbit
(
FACE
,
d
)
;
...
...
@@ -1519,16 +1521,15 @@ void coarsenVolume(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& position
*/
for
(
std
::
vector
<
Dart
>::
iterator
face
=
visitedFaces
.
begin
();
face
!=
visitedFaces
.
end
();
++
face
)
{
Dart
d
=
*
face
;
Dart
fit
=
*
face
;
if
(
map
.
face
IsSubdividedOnce
(
d
))
if
(
map
.
face
CanBeCoarsened
(
fit
))
{
std
::
cout
<<
"once : "
<<
d
<<
std
::
endl
;
coarsenFace
<
PFP
>
(
map
,
d
,
position
);
Algo
::
IHM
::
coarsenFace
<
PFP
>
(
map
,
fit
,
position
);
}
}
map
.
setCurrentLevel
(
cur
)
;
//
map.setCurrentLevel(cur) ;
/*
* simplifier les aretes
...
...
@@ -1539,18 +1540,13 @@ void coarsenVolume(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& position
do
{
if
(
map
.
edgeCanBeCoarsened
(
fit
))
{
std
::
cout
<<
"edge coarsened = "
<<
fit
<<
std
::
endl
;
}
//coarsenEdge<PFP>(map, fit, position) ;
std
::
cout
<<
"boucle = "
<<
fit
<<
std
::
endl
;
Algo
::
IHM
::
coarsenEdge
<
PFP
>
(
map
,
fit
,
position
)
;
fit
=
map
.
phi1
(
fit
)
;
}
while
(
fit
!=
*
face
)
;
}
std
::
cout
<<
"end"
<<
std
::
endl
;
map
.
setCurrentLevel
(
cur
)
;
// map.setCurrentLevel(cur) ;
}
/***********************************************************************************
...
...
include/Topology/map/map2.h
View file @
d673743f
...
...
@@ -236,6 +236,20 @@ public:
*/
void
insertTrianglePair
(
Dart
d
,
Dart
v1
,
Dart
v2
)
;
/**
* Unsew opposite edges from the faces around a vertex
* \warning Darts may have
* @param d a dart from the vertex
*/
void
unsewAroundVertex
(
Dart
d
)
;
/**
* Unsex the Umbrella aroud a vertex, close the hole and then
* create a symetric to construct a polyedron
* @param d a dart from the vertex
*/
void
explodPolyhedron
(
Dart
d
);
//! Merge two volumes along two faces.
/*! Works only if the two faces have the same number of edges.
* The faces adjacent to the two given faces are pairwise phi2-linked
...
...
include/Topology/map/map3.h
View file @
d673743f
...
...
@@ -230,7 +230,6 @@ public:
*/
virtual
Dart
cutSpike
(
Dart
d
);
//!
/*
*
...
...
src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
View file @
d673743f
...
...
@@ -172,7 +172,6 @@ unsigned int ImplicitHierarchicalMap3::volumeLevel(Dart d)
{
assert
(
m_dartLevel
[
d
]
<=
m_curLevel
||
!
"Access to a dart introduced after current level"
)
;
if
(
m_curLevel
==
0
)
return
0
;
...
...
@@ -182,7 +181,7 @@ unsigned int ImplicitHierarchicalMap3::volumeLevel(Dart d)
DartMarkerStore
mark
(
*
this
);
// Lock a marker
std
::
vector
<
Dart
>
visitedFaces
;
// Faces that are traversed
visitedFaces
.
reserve
(
16
);
visitedFaces
.
reserve
(
512
);
visitedFaces
.
push_back
(
d
);
// Start with the face of d
std
::
vector
<
Dart
>::
iterator
face
;
...
...
@@ -383,6 +382,7 @@ bool ImplicitHierarchicalMap3::faceIsSubdivided(Dart d)
if
(
m_dartLevel
[
phi1
(
d
)]
==
m_curLevel
&&
m_edgeId
[
phi1
(
d
)]
!=
m_edgeId
[
d
])
subd
=
true
;
--
m_curLevel
;
return
subd
;
}
...
...
@@ -403,7 +403,7 @@ bool ImplicitHierarchicalMap3::volumeIsSubdivided(Dart d)
Dart
old
=
d
;
bool
facesAreSubdivided
=
fa
lse
;
bool
facesAreSubdivided
=
fa
ceIsSubdivided
(
d
)
;
//parcours les faces du volume au niveau courant
//on cherche le brin de niveau le plus bas de la hierarchie
...
...
@@ -419,7 +419,6 @@ bool ImplicitHierarchicalMap3::volumeIsSubdivided(Dart d)
facesAreSubdivided
&=
faceIsSubdivided
(
e
)
;
do
// add all face neighbours to the table
{
Dart
ee
=
phi2
(
e
)
;
...
...
@@ -442,7 +441,7 @@ bool ImplicitHierarchicalMap3::volumeIsSubdivided(Dart d)
}
bool
ImplicitHierarchicalMap3
::
edgeCanBeCoarsened
(
Dart
d
)
bool
ImplicitHierarchicalMap3
::
edgeCanBeCoarsened
(
Dart
d
)
{
assert
(
m_dartLevel
[
d
]
<=
m_curLevel
||
!
"Access to a dart introduced after current level"
)
;
...
...
@@ -467,6 +466,49 @@ bool ImplicitHierarchicalMap3::edgeCanBeCoarsened(Dart d)
return
subd
&&
degree2
&&
subdOnce
;
}
bool
ImplicitHierarchicalMap3
::
faceCanBeCoarsened
(
Dart
d
)
{
assert
(
m_dartLevel
[
d
]
<=
m_curLevel
||
!
"Access to a dart introduced after current level"
)
;
bool
subd
=
false
;
bool
subdOnce
=
true
;
bool
subdNeighborhood
=
false
;
//deux volumes voisins de la face ne sont pas subdivise
if
(
faceIsSubdivided
(
d
))
{
subd
=
true
;
Dart
d3
=
phi3
(
d
);
std
::
cout
<<
"d3 = "
<<
d3
<<
std
::
endl
;
std
::
cout
<<
"d = "
<<
d
<<
std
::
endl
;
std
::
cout
<<
"curLevel = "
<<
m_curLevel
<<
std
::
endl
;
std
::
cout
<<
"volSubd(d3) = "
<<
volumeIsSubdivided
(
d3
)
<<
std
::
endl
;
//tester si le volume voisin est subdivise
if
(
d3
!=
d
&&
volumeIsSubdivided
(
d3
))
subdNeighborhood
=
true
;
++
m_curLevel
;
//tester si la face subdivise a des faces subdivise
Dart
cf
=
phi1
(
d
);
do
{
if
(
faceIsSubdivided
(
cf
))
subdOnce
=
false
;
cf
=
phi2
(
phi1
(
cf
));
}
while
(
subdOnce
&&
cf
!=
phi1
(
d
));
--
m_curLevel
;
}
std
::
cout
<<
"subdNeighborhood = "
<<
subdNeighborhood
<<
std
::
endl
;
return
subd
&&
!
subdNeighborhood
&&
subdOnce
;
}
bool
ImplicitHierarchicalMap3
::
faceIsSubdividedOnce
(
Dart
d
)
{
assert
(
m_dartLevel
[
d
]
<=
m_curLevel
||
!
"Access to a dart introduced after current level"
)
;
...
...
@@ -543,7 +585,9 @@ bool ImplicitHierarchicalMap3::neighborhoodLevelDiffersByOne(Dart d)
if
(
phi3
(
e
)
!=
e
&&
(
abs
(
int
(
volumeLevel
(
phi3
(
e
))
-
vLevel
))
>
1
))
{
found
=
true
;
Dart
old
=
volumeOldestDart
(
phi3
(
e
));
if
((
abs
(
volumeLevel
(
old
)
-
vLevel
)
>
1
))
found
=
true
;
}
Dart
ee
=
phi2
(
e
)
;
...
...
src/Topology/map/map2.cpp
View file @
d673743f
...
...
@@ -298,6 +298,40 @@ void Map2::insertTrianglePair(Dart d, Dart v1, Dart v2)
phi2sew
(
phi1
(
d
),
vv1
)
;
}
void
Map2
::
unsewAroundVertex
(
Dart
d
)
{
Dart
e
=
d
;
do
{
Dart
temp
=
phi1
(
e
);
Dart
e_1
=
phi_1
(
e
);
do
{
unsewFaces
(
temp
);
temp
=
phi1
(
temp
);
}
while
(
temp
!=
e_1
);
e
=
alpha1
(
e
);
}
while
(
e
!=
d
);
}
void
Map2
::
explodPolyhedron
(
Dart
d
)
{
unsewAroundVertex
(
d
);
closeHole
(
phi1
(
d
));
//Recherche du (ou un des) sommet oppose
//tourner autour du sommet
//si quad alors sommet oppose
//
//si pas de quad alors un sommet du trian
//
}
bool
Map2
::
mergeVolumes
(
Dart
d
,
Dart
e
)
{
// First traversal of both faces to check the face sizes
...
...
src/Topology/map/map3.cpp
View file @
d673743f
...
...
@@ -635,15 +635,15 @@ unsigned int Map3::vertexDegree(Dart d)
int
count
=
0
;
DartMarkerStore
mv
(
*
this
);
// Lock a marker
std
::
list
<
Dart
>
darts_list
;
//Darts that are traversed
darts
_list
.
push_back
(
d
);
//Start with the dart d
std
::
list
<
Dart
>::
iterator
darts
;
std
::
vector
<
Dart
>
darts
;
//Darts that are traversed
darts
.
reserve
(
512
);
darts
.
push_back
(
d
);
//Start with the dart d
mv
.
mark
(
d
);
for
(
darts
=
darts_list
.
begin
();
darts
!=
darts_list
.
end
()
;
++
darts
)
for
(
std
::
vector
<
Dart
>::
iterator
it
=
darts
.
begin
();
it
!=
darts
.
end
()
;
++
it
)
{
Dart
dc
=
*
darts
;
Dart
dc
=
*
it
;
//add phi21 and phi23 successor if they are not marked yet
Dart
d2
=
phi2
(
dc
);
...
...
@@ -652,27 +652,27 @@ unsigned int Map3::vertexDegree(Dart d)
if
(
!
mv
.
isMarked
(
d21
))
{
darts
_list
.
push_back
(
d21
);
darts
.
push_back
(
d21
);
mv
.
mark
(
d21
);
}
if
((
d23
!=
d2
)
&&
!
mv
.
isMarked
(
d23
))
{
darts
_list
.
push_back
(
d23
);
darts
.
push_back
(
d23
);
mv
.
mark
(
d23
);
}
}
std
::
cout
<<
"#darts = "
<<
darts
_list
.
size
()
<<
std
::
endl
;
std
::
cout
<<
"#darts = "
<<
darts
.
size
()
<<
std
::
endl
;
DartMarkerStore
me
(
*
this
);
for
(
darts
=
darts_list
.
begin
();
darts
!=
darts_list
.
end
()
;
++
darts
)
for
(
std
::
vector
<
Dart
>::
iterator
it
=
darts
.
begin
();
it
!=
darts
.
end
()
;
++
it
)
{
if
(
!
me
.
isMarked
(
*
darts
))
if
(
!
me
.
isMarked
(
*
it
))
{
++
count
;
me
.
markOrbit
(
EDGE
,
*
darts
);
me
.
markOrbit
(
EDGE
,
*
it
);
}
}
...
...
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