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
4f08fa9d
Commit
4f08fa9d
authored
Feb 07, 2012
by
untereiner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
supp UnsewAroundVertex de map2
parent
1129550d
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
133 additions
and
77 deletions
+133
-77
Apps/Tuto/tuto5.h
Apps/Tuto/tuto5.h
+1
-1
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
+52
-49
include/Algo/Modelisation/subdivision3.hpp
include/Algo/Modelisation/subdivision3.hpp
+35
-23
include/Topology/gmap/gmap2.h
include/Topology/gmap/gmap2.h
+7
-0
include/Topology/map/map2.h
include/Topology/map/map2.h
+7
-0
src/Topology/gmap/gmap2.cpp
src/Topology/gmap/gmap2.cpp
+5
-0
src/Topology/map/map2.cpp
src/Topology/map/map2.cpp
+10
-2
src/Topology/map/map3.cpp
src/Topology/map/map3.cpp
+16
-2
No files found.
Apps/Tuto/tuto5.h
View file @
4f08fa9d
...
...
@@ -27,7 +27,7 @@
#include <iostream>
#define WITH_GMAP 0
//
#define WITH_GMAP 0
#include "Topology/generic/parameters.h"
#ifdef WITH_GMAP
...
...
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
View file @
4f08fa9d
...
...
@@ -450,67 +450,70 @@ Dart subdivideVolumeClassic2(typename PFP::MAP& map, Dart d, typename PFP::TVEC3
map
.
splitVolume
(
v
)
;
// Dart old = map.phi2(map.phi1(dit));
// Dart dd = map.phi1(map.phi1(old)) ;
// map.splitFace(old,dd) ;
//
// unsigned int idface = map.getNewFaceId();
// map.setFaceId(dd,idface, FACE);
//
// Dart ne = map.phi1(map.phi1(old)) ;
//
// map.cutEdge(ne);
// centralDart = map.phi1(ne);
// newEdges.push_back(ne);
// newEdges.push_back(map.phi1(ne));
//
// unsigned int id = map.getNewEdgeId() ;
// map.setEdgeId(ne, id, EDGE) ;
//
// Dart stop = map.phi2(map.phi1(ne));
// ne = map.phi2(ne);
// do
// {
// dd = map.phi1(map.phi1(map.phi1(ne)));
//
// map.splitFace(ne, dd) ;
// unsigned int idface = map.getNewFaceId();
// map.setFaceId(dd,idface, FACE);
//
// newEdges.push_back(map.phi1(dd));
//
// ne = map.phi2(map.phi_1(ne));
// dd = map.phi1(map.phi1(dd));
// }
// while(dd != stop);
Dart
old
=
map
.
phi2
(
map
.
phi1
(
dit
));
Dart
dd
=
map
.
phi1
(
map
.
phi1
(
old
))
;
map
.
splitFace
(
old
,
dd
)
;
unsigned
int
idface
=
map
.
getNewFaceId
();
map
.
setFaceId
(
dd
,
idface
,
FACE
);
Dart
ne
=
map
.
phi1
(
map
.
phi1
(
old
))
;
map
.
cutEdge
(
ne
);
centralDart
=
map
.
phi1
(
ne
);
newEdges
.
push_back
(
ne
);
newEdges
.
push_back
(
map
.
phi1
(
ne
));
position
[
centralDart
]
=
volCenter
;
unsigned
int
id
=
map
.
getNewEdgeId
()
;
map
.
setEdgeId
(
ne
,
id
,
EDGE
)
;
Dart
stop
=
map
.
phi2
(
map
.
phi1
(
ne
));
ne
=
map
.
phi2
(
ne
);
do
{
dd
=
map
.
phi1
(
map
.
phi1
(
map
.
phi1
(
ne
)));
map
.
splitFace
(
ne
,
dd
)
;
unsigned
int
idface
=
map
.
getNewFaceId
();
map
.
setFaceId
(
dd
,
idface
,
FACE
);
newEdges
.
push_back
(
map
.
phi1
(
dd
));
ne
=
map
.
phi2
(
map
.
phi_1
(
ne
));
dd
=
map
.
phi1
(
map
.
phi1
(
dd
));
}
while
(
dd
!=
stop
);
}
// map.deleteVolume(map.phi3(map.phi2(map.phi1(traV.begin()))));
//
// //Third step : 3-sew internal faces
// for (std::vector<std::pair<Dart,Dart> >::iterator it = subdividedfaces.begin(); it != subdividedfaces.end(); ++it)
// {
// Dart f1 = (*it).first;
// Dart f2 = (*it).second;
//
//
// if(map.isBoundaryFace(map.phi2(f1)) && map.isBoundaryFace(map.phi2(f2)))
// {
// std::cout << "boundary" << std::endl;
// //id pour toutes les faces interieures
// map.sewVolumes(map.phi2(f1), map.phi2(f2));
//
// //Fais a la couture !!!!!
// unsigned int idface = map.getNewFaceId();
// map.setFaceId(map.phi2(f1),idface, FACE);
// break;
////
//// //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);
//
//
//
//
//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. 6 pour un hexa)
// DartMarker mne(map);
...
...
@@ -523,9 +526,9 @@ Dart subdivideVolumeClassic2(typename PFP::MAP& map, Dart d, typename PFP::TVEC3
// mne.markOrbit(EDGE, newEdges[i]);
// }
// }
//
//
// position[centralDart] = volCenter;
//plonger a la fin de la boucle ????
//plonger a la fin de la boucle ????
map
.
setCurrentLevel
(
cur
)
;
...
...
include/Algo/Modelisation/subdivision3.hpp
View file @
4f08fa9d
...
...
@@ -184,26 +184,38 @@ void catmullClarkVol(typename PFP::MAP& map, EMBV& attributs, const FunctorSelec
std
::
vector
<
Dart
>
v
;
do
{
Dart
dN
=
map
.
phi1
(
map
.
phi2
(
d
));
v
.
push_back
(
map
.
phi1
(
map
.
phi1
(
d
)));
v
.
push_back
(
map
.
phi1
(
d
));
Dart
dRing
=
map
.
phi1
(
d
);
if
(
map
.
phi2
(
dRing
)
!=
dRing
)
{
toSew
.
insert
(
std
::
pair
<
Dart
,
Dart
>
(
dRing
,
map
.
phi2
(
dRing
)));
v
.
push_back
(
dRing
);
}
dRing
=
map
.
phi1
(
dRing
);
if
(
map
.
phi2
(
dRing
)
!=
dRing
)
{
toSew
.
insert
(
std
::
pair
<
Dart
,
Dart
>
(
dRing
,
map
.
phi2
(
dRing
)));
v
.
push_back
(
dRing
);
}
d
=
map
.
phi2
(
map
.
phi_1
(
d
));
}
while
(
d
!=
*
it
);
d
=
dN
;
}
while
(
d
!=
*
it
);
// do
// {
// Dart dN = map.phi1(map.phi2(d));
//
// Dart dRing = map.phi1(d);
//
// if(map.phi2(dRing)!=dRing)
// {
// toSew.insert(std::pair<Dart,Dart>(dRing,map.phi2(dRing)));
// v.push_back(dRing);
// }
//
// dRing = map.phi1(dRing);
//
// if(map.phi2(dRing)!=dRing)
// {
// toSew.insert(std::pair<Dart,Dart>(dRing,map.phi2(dRing)));
// v.push_back(dRing);
// }
//
// d = dN;
// } while (d != *it);
map
.
splitCC
(
v
);
map
.
fillHole
(
v
.
front
());
// //close the generated hole and create the central vertex
// //unsigned int degree = map.closeHole(map.phi1(d));
...
...
@@ -211,12 +223,12 @@ void catmullClarkVol(typename PFP::MAP& map, EMBV& attributs, const FunctorSelec
//TODO : pb de face en trop avec splitVolume
//map.splitVolume(v);
Dart
e
=
v
.
front
();
for
(
std
::
vector
<
Dart
>::
iterator
it
=
v
.
begin
()
;
it
!=
v
.
end
()
;
++
it
)
if
(
map
.
Map2
::
isBoundaryEdge
(
*
it
))
map
.
unsewFaces
(
*
it
);
//
map
.
fillHole
(
e
)
;
// Dart e = v.front();
// for(std::vector<Dart>::iterator it = v.begin() ; it != v.end() ; ++it)
// if(map.Map2::isBoundaryEdge(*it))
// map.unsewFaces(*it);
// Dart dd = map.phi1(map.phi2(map.phi1(d)));
// map.splitFace(map.phi_1(dd),map.phi1(dd));
...
...
include/Topology/gmap/gmap2.h
View file @
4f08fa9d
...
...
@@ -252,6 +252,13 @@ public:
* @return true if the merge has been executed, false otherwise
*/
virtual
bool
mergeVolumes
(
Dart
d
,
Dart
e
);
//!
/*!
*
*/
virtual
void
splitCC
(
std
::
vector
<
Dart
>&
vd
);
//@}
/*! @name Topological Queries
...
...
include/Topology/map/map2.h
View file @
4f08fa9d
...
...
@@ -274,6 +274,13 @@ public:
* @return true if the merge has been executed, false otherwise
*/
virtual
bool
mergeVolumes
(
Dart
d
,
Dart
e
);
//!
/*!
*
*/
virtual
void
splitCC
(
std
::
vector
<
Dart
>&
vd
);
//@}
/*! @name Topological Queries
...
...
src/Topology/gmap/gmap2.cpp
View file @
4f08fa9d
...
...
@@ -584,6 +584,11 @@ bool GMap2::mergeVolumes(Dart d, Dart e)
return
true
;
}
void
GMap2
::
splitCC
(
std
::
vector
<
Dart
>&
vd
)
{
//assert(checkSimpleOrientedPath(vd)) ;
}
/*! @name Topological Queries
* Return or set various topological information
*************************************************************************/
...
...
src/Topology/map/map2.cpp
View file @
4f08fa9d
...
...
@@ -359,7 +359,7 @@ void Map2::sewFaces(Dart d, Dart e, bool withBoundary)
void
Map2
::
unsewFaces
(
Dart
d
)
{
assert
(
!
isBoundaryEdge
(
d
))
;
assert
(
!
Map2
::
isBoundaryEdge
(
d
))
;
Dart
dd
=
phi2
(
d
)
;
...
...
@@ -407,7 +407,7 @@ bool Map2::collapseDegeneratedFace(Dart d)
void
Map2
::
splitFace
(
Dart
d
,
Dart
e
)
{
assert
(
d
!=
e
&&
sameFace
(
d
,
e
))
;
assert
(
d
!=
e
&&
Map2
::
sameFace
(
d
,
e
))
;
Dart
dd
=
Map1
::
cutEdge
(
phi_1
(
d
))
;
Dart
ee
=
Map1
::
cutEdge
(
phi_1
(
e
))
;
Map1
::
splitCycle
(
dd
,
ee
)
;
...
...
@@ -515,6 +515,14 @@ bool Map2::mergeVolumes(Dart d, Dart e)
return
true
;
}
void
Map2
::
splitCC
(
std
::
vector
<
Dart
>&
vd
)
{
//assert(checkSimpleOrientedPath(vd)) ;
for
(
std
::
vector
<
Dart
>::
iterator
it
=
vd
.
begin
()
;
it
!=
vd
.
end
()
;
++
it
)
Map2
::
unsewFaces
(
*
it
);
}
/*! @name Topological Queries
* Return or set various topological information
*************************************************************************/
...
...
src/Topology/map/map3.cpp
View file @
4f08fa9d
...
...
@@ -490,11 +490,25 @@ void Map3::splitVolume(std::vector<Dart>& vd)
Map2
::
fillHole
(
e
)
;
Dart
b
=
Map1
::
newBoundaryCycle
(
vd
.
size
());
Dart
fit1
=
phi2
(
e
)
;
Dart
fit2
=
b
;
do
{
phi3sew
(
fit1
,
fit2
)
;
fit1
=
phi1
(
fit1
)
;
fit2
=
phi_1
(
fit2
)
;
}
while
(
fit2
!=
b
)
;
// if(isBoundaryMarked(e2))
Map2
::
fillHole
(
e2
)
;
//
Map2::fillHole(e2) ;
//sew the two connected components
Map3
::
sewVolumes
(
phi2
(
e
),
phi2
(
e2
),
false
);
//
Map3::sewVolumes(phi2(e), phi2(e2), false);
}
/*! @name Topological Queries
...
...
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