Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
CGoGN
CGoGN
Commits
917105e2
Commit
917105e2
authored
Oct 27, 2011
by
untereiner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quelques modifs sur les plongements de 3-carte
parent
81c34b08
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
516 additions
and
443 deletions
+516
-443
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
+412
-391
include/Algo/Selection/collector.h
include/Algo/Selection/collector.h
+1
-1
include/Topology/generic/embeddedMap3.hpp
include/Topology/generic/embeddedMap3.hpp
+8
-0
src/Topology/map/map3.cpp
src/Topology/map/map3.cpp
+95
-51
No files found.
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
View file @
917105e2
This diff is collapsed.
Click to expand it.
include/Algo/Selection/collector.h
View file @
917105e2
...
...
@@ -117,7 +117,7 @@ public:
* insideVertices = centerDart
* insideEdges = star (edges incident to centerDart)
* insideFaces = triangles incident to centerDart
* border = vertices of 1-ring
* border = vertices of 1-ring
-> link (set of adjacent vertices)
* = edges of 1-ring
*/
template
<
typename
PFP
>
...
...
include/Topology/generic/embeddedMap3.hpp
View file @
917105e2
...
...
@@ -173,6 +173,13 @@ void EmbeddedMap3<MAP3>::cutEdge(Dart d)
{
MAP3
::
cutEdge
(
d
);
if
(
MAP3
::
isOrbitEmbedded
(
VERTEX
))
{
Dart
nd
=
MAP3
::
phi1
(
d
)
;
MAP3
::
embedNewCell
(
VERTEX
,
nd
)
;
}
if
(
MAP3
::
isOrbitEmbedded
(
EDGE
))
{
Dart
nd
=
MAP3
::
phi1
(
d
)
;
...
...
@@ -218,6 +225,7 @@ void EmbeddedMap3<MAP3>::cutEdge(Dart d)
f
=
MAP3
::
alpha2
(
f
);
}
while
(
f
!=
d
);
}
}
...
...
src/Topology/map/map3.cpp
View file @
917105e2
...
...
@@ -203,67 +203,111 @@ void Map3::uncutEdge(Dart d)
}
//besoin d'un iterator pour chaque face autour d'un sommet
bool
Map3
::
deleteVertex
(
Dart
d
)
{
DartMarkerStore
mv
(
*
this
);
// Lock a marker
std
::
vector
<
Dart
>
darts_list
;
//Darts that are traversed
darts_list
.
reserve
(
512
);
darts_list
.
push_back
(
d
);
//Start with the dart d
std
::
vector
<
Dart
>::
iterator
darts
;
mv
.
mark
(
d
);
std
::
vector
<
Dart
>
unique_darts_list
;
unique_darts_list
.
reserve
(
512
);
unique_darts_list
.
push_back
(
d
);
bool
boundary
=
false
;
if
(
isBoundaryVertex
(
d
))
boundary
=
true
;
for
(
darts
=
darts_list
.
begin
();
darts
!=
darts_list
.
end
()
;
++
darts
)
//is boundary
if
(
phi3
(
d
)
!=
d
)
{
Dart
dc
=
*
darts
;
//add phi21 and phi23 successor if they are not marked yet
Dart
d2
=
phi2
(
dc
);
Dart
d21
=
phi1
(
d2
);
// turn in volume
Dart
d23
=
phi3
(
d2
);
// change volume
if
(
!
mv
.
isMarked
(
d21
))
{
darts_list
.
push_back
(
d21
);
mv
.
mark
(
d21
);
}
Dart
e
=
d
;
Dart
d3
=
phi2
(
phi3
(
d
));
if
((
d23
!=
d2
)
&&
!
mv
.
isMarked
(
d23
))
do
{
darts_list
.
push_back
(
d23
);
unique_darts_list
.
push_back
(
d23
);
mv
.
mark
(
d23
);
}
}
unsewVolumes
(
e
);
e
=
phi2
(
phi_1
(
e
));
}
while
(
e
!=
d
);
for
(
darts
=
unique_darts_list
.
begin
();
darts
!=
unique_darts_list
.
end
()
;
++
darts
)
{
mergeVolumes
(
*
darts
);
Map2
::
deleteVertex
(
d3
);
}
if
(
boundary
)
{
Dart
vit
=
d
;
do
{
Dart
f
=
phi_1
(
phi2
(
vit
))
;
phi1sew
(
vit
,
f
)
;
vit
=
phi2
(
phi_1
((
vit
)))
;
}
while
(
vit
!=
d
)
;
Map1
::
deleteFace
(
d
)
;
}
Map2
::
deleteVertex
(
d
);
return
true
;
// std::cout << "map3::deleteVertex" << std::endl;
//
// DartMarkerStore mv(*this); // Lock a marker
//
// std::vector<Dart> darts_list; //Darts that are traversed
// darts_list.reserve(512);
// darts_list.push_back(d); //Start with the dart d
// std::vector<Dart>::iterator darts;
//
// mv.mark(d);
//
// std::vector<Dart> unique_darts_list;
// unique_darts_list.reserve(512);
// unique_darts_list.push_back(d);
//
//
// bool boundary = false;
// if(isBoundaryVertex(d))
// boundary = true;
//
// std::cout << "isBoundary ? " << boundary << std::endl;
//
// CellMarker mvolume(*this, VOLUME);
//
// for(darts = darts_list.begin(); darts != darts_list.end() ; ++darts)
// {
// Dart dc = *darts;
//
// //add phi21 and phi23 successor if they are not marked yet
// Dart d2 = phi2(dc);
// Dart d21 = phi1(d2); // turn in volume
// Dart d23 = phi3(d2); // change volume
//
// if(!mv.isMarked(d21))
// {
// darts_list.push_back(d21);
// mv.mark(d21);
// }
//
// if((d23!=d2) && !mv.isMarked(d23))
// {
// darts_list.push_back(d23);
// //if(!mvolume.isMarked(d23))
// //{
// unique_darts_list.push_back(d23);
// // mvolume.mark(d23);
// //}
// mv.mark(d23);
// }
//
// std::cout << "save a dart" << std::endl;
// }
//
// std::cout << "unique_darts_list size = " << unique_darts_list.size() << std::endl;
//
// for(darts = unique_darts_list.begin(); darts != unique_darts_list.end() ; ++darts)
// {
// //std::cout << "merged ? " << mergeVolumes(*darts) << std::endl;
//
// //if(!mergeVolumes(*darts))
// // return false;
//
// std::cout << "mergevolumes" << std::endl;
// }
//
// std::cout << "end merging" << std::endl;
//
// if(boundary)
// {
// std::cout << "is Boundary " << std::endl;
// Dart vit = d ;
// do
// {
// Dart f = phi_1(phi2(vit)) ;
// phi1sew(vit, f) ;
// vit = phi2(phi_1((vit))) ;
// } while(vit != d) ;
// Map1::deleteFace(d) ;
// }
//
// std::cout << "return" << std::endl;
//
// return true;
}
//TODO
...
...
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