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
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
CGoGN
CGoGN
Commits
cbc777a1
Commit
cbc777a1
authored
Nov 03, 2011
by
Sylvain Thery
Committed by
Pierre Kraemer
Nov 04, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nouvelle version mergeFacewithBoundary
parent
7c1c5c11
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
78 additions
and
14 deletions
+78
-14
include/Topology/generic/dartmarker.h
include/Topology/generic/dartmarker.h
+2
-2
include/Topology/map/map1.h
include/Topology/map/map1.h
+1
-1
include/Topology/map/map2.h
include/Topology/map/map2.h
+7
-0
src/Topology/map/map2.cpp
src/Topology/map/map2.cpp
+68
-11
No files found.
include/Topology/generic/dartmarker.h
View file @
cbc777a1
...
...
@@ -69,7 +69,7 @@ public:
protected:
// protected copy constructor to forbid its usage
DartMarkerGen
(
const
DartMarkerGen
&
dm
)
:
m_map
(
dm
.
m_map
)
DartMarkerGen
(
const
DartMarkerGen
&
dm
)
:
m_map
(
dm
.
m_map
)
,
m_thread
(
0
),
m_mark
(
NIL
)
{}
public:
...
...
@@ -215,7 +215,7 @@ public:
}
protected:
DartMarkerStore
(
const
DartMarkerStore
&
dm
)
:
DartMarkerGen
(
dm
)
DartMarkerStore
(
const
DartMarkerStore
&
dm
)
:
DartMarkerGen
(
dm
)
,
m_markedDarts
(
dm
.
m_markedDarts
)
{}
public:
...
...
include/Topology/map/map1.h
View file @
cbc777a1
...
...
@@ -112,7 +112,7 @@ public:
/*! @param nbEdges the number of edges
* @return return a dart of the face
*/
Dart
newFace
(
unsigned
int
nbEdges
)
;
virtual
Dart
newFace
(
unsigned
int
nbEdges
)
;
//! Create an new face for boundary (marked)
/*! @param nbEdges the number of edges
...
...
include/Topology/map/map2.h
View file @
cbc777a1
...
...
@@ -117,6 +117,13 @@ protected:
void
deleteOrientedFace
(
Dart
d
)
;
// OK boundary
public:
//! Create an new face of nbEdges
/*! @param nbEdges the number of edges
* @return return a dart of the face
*/
virtual
Dart
newFace
(
unsigned
int
nbEdges
)
;
virtual
void
deleteFace
(
Dart
d
)
;
//@}
...
...
src/Topology/map/map2.cpp
View file @
cbc777a1
...
...
@@ -40,25 +40,66 @@ void Map2::mergeBoundaryFaces(Dart dd, Dart ee)
Map1
::
deleteOrientedFace
(
dd
)
;
}
//void Map2::mergeFacewithBoundary(Dart d)
//{
// Dart e = d ;
// do // foreach edge of face
// {
// Dart f = phi2(e);
// if (isBoundaryMarked(f)) // if sewed to boundary
// {
// phi2unsew(e);// ?? not necessary
// Dart ff = phi_1(f);
// if (e != ff)
// phi1sew(e, ff) ; // merge with it
// Dart ee = phi_1(e);
// if (f != ee)
// phi1sew(f, ee) ;
// Map1::deleteOrientedFace(e) ;
// }
// e = phi1(e) ;
// } while (e != d) ;
//}
void
Map2
::
mergeFacewithBoundary
(
Dart
d
)
{
std
::
vector
<
Dart
>
storeForLinkVertex
;
std
::
vector
<
Dart
>
storeForLinkFace
;
Dart
e
=
d
;
do
// foreach edge of face
do
// foreach
vertex/
edge of face
{
Dart
f
=
phi2
(
e
);
if
(
isBoundaryMarked
(
f
))
// if sewed to boundary
Dart
f
=
findBoundaryVertex
(
alpha1
(
e
));
// check if connexion by vertex
if
(
f
!=
e
)
{
storeForLinkVertex
.
push_back
(
phi_1
(
e
));
storeForLinkVertex
.
push_back
(
phi_1
(
f
));
}
Dart
g
=
phi2
(
f
);
if
(
isBoundaryMarked
(
g
))
// check if connextion by a face
{
phi2unsew
(
e
);
// ?? not necessary
Dart
ff
=
phi_1
(
f
);
if
(
e
!=
ff
)
phi1sew
(
e
,
ff
)
;
// merge with it
Dart
ee
=
phi_1
(
e
);
if
(
f
!=
ee
)
phi1sew
(
f
,
ee
)
;
Map1
::
deleteOrientedFace
(
e
)
;
storeForLinkFace
.
push_back
(
f
);
storeForLinkFace
.
push_back
(
g
);
}
e
=
phi1
(
e
)
;
}
while
(
e
!=
d
)
;
// merge by vertices
while
(
!
storeForLinkVertex
.
empty
())
{
Dart
a
=
storeForLinkVertex
.
pop_back
();
Dart
b
=
storeForLinkVertex
.
pop_back
();
phi1sew
(
a
,
b
);
}
//merge by faces
while
(
!
storeForLinkFace
.
empty
())
{
Dart
a
=
storeForLinkFace
.
pop_back
();
Dart
b
=
storeForLinkFace
.
pop_back
();
mergeBoundaryFaces
(
a
,
b
);
}
}
void
Map2
::
deleteOrientedFace
(
Dart
d
)
...
...
@@ -76,6 +117,22 @@ void Map2::sewOrientedFaces(Dart d, Dart e)
phi2sew
(
d
,
e
);
}
Dart
Map2
::
newFace
(
unsigned
int
nbEdges
)
{
Dart
d
=
Map1
::
newFace
(
nbEdges
);
Dart
e
=
Map1
::
newBoundaryFace
(
nbEdges
);
Dart
x
=
d
;
do
{
phi2sew
(
d
,
e
);
d
=
phi1
(
d
);
e
=
phi1
(
e
);
}
while
(
d
!=
x
);
return
x
;
}
/*! @name Topological Operators
* Topological operations on 2-maps
*************************************************************************/
...
...
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