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
156f13bd
Commit
156f13bd
authored
Dec 08, 2011
by
untereiner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Map3 / GMap3 : deleteVertex + deleteEdge
parent
6b963c6a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
74 additions
and
25 deletions
+74
-25
include/Topology/gmap/gmap3.h
include/Topology/gmap/gmap3.h
+9
-2
include/Topology/map/map3.h
include/Topology/map/map3.h
+6
-4
src/Topology/gmap/gmap3.cpp
src/Topology/gmap/gmap3.cpp
+44
-1
src/Topology/map/map3.cpp
src/Topology/map/map3.cpp
+15
-18
No files found.
include/Topology/gmap/gmap3.h
View file @
156f13bd
...
...
@@ -105,9 +105,9 @@ public:
//@{
//! Delete the vertex of d
/*! All the
faces around the vertex are merged into one fac
e
/*! All the
volumes around the vertex are merged into one volum
e
* @param d a dart of the vertex to delete
* @return
true if the deletion has been executed, false otherwis
e
* @return
a Dart of the resulting volum
e
*/
virtual
Dart
deleteVertex
(
Dart
d
);
...
...
@@ -122,6 +122,13 @@ public:
*/
virtual
bool
uncutEdge
(
Dart
d
);
//! Delete the edge of d
/*! All the volumes around the edge are merged into one volume
* @param d a dart of the edge to delete
* @return a Dart of the resulting volume
*/
virtual
Dart
deleteEdge
(
Dart
d
);
//! Split a face inserting an edge between two vertices
/*! \pre Dart d and e should belong to the same face and be distinct
* @param d dart of first vertex
...
...
include/Topology/map/map3.h
View file @
156f13bd
...
...
@@ -124,9 +124,9 @@ public:
//@{
//! Delete the vertex of d
/*! All the
faces around the vertex are merged into one fac
e
/*! All the
volumes around the vertex are merged into one volum
e
* @param d a dart of the vertex to delete
* @return
true if the deletion has been executed, false otherwis
e
* @return
a Dart of the resulting volum
e
*/
virtual
Dart
deleteVertex
(
Dart
d
);
...
...
@@ -141,8 +141,10 @@ public:
*/
virtual
bool
uncutEdge
(
Dart
d
);
//! Delete an edge and all the faces aroud this edge
/*! @param d a dart of the edge to delete
//! Delete the edge of d
/*! All the volumes around the edge are merged into one volume
* @param d a dart of the edge to delete
* @return a Dart of the resulting volume
*/
virtual
Dart
deleteEdge
(
Dart
d
);
...
...
src/Topology/gmap/gmap3.cpp
View file @
156f13bd
...
...
@@ -129,12 +129,14 @@ Dart GMap3::deleteVertex(Dart d)
beta2sew
(
beta0
(
d2
),
d32
)
;
beta2sew
(
fit
,
beta0
(
d3
))
;
beta2sew
(
beta0
(
fit
),
d3
)
;
fit
=
phi1
(
fit
)
;
}
}
GMap2
::
deleteCC
(
d
)
;
return
res
;
return
NIL
;
}
Dart
GMap3
::
cutEdge
(
Dart
d
)
...
...
@@ -182,6 +184,47 @@ bool GMap3::uncutEdge(Dart d)
return
false
;
}
Dart
GMap3
::
deleteEdge
(
Dart
d
)
{
if
(
isBoundaryEdge
(
d
))
return
NIL
;
Dart
res
=
NIL
;
Dart
dit
=
d
;
do
{
Dart
fit
=
dit
;
Dart
end
=
fit
;
fit
=
phi1
(
fit
)
;
while
(
fit
!=
end
)
{
Dart
d2
=
phi2
(
fit
)
;
Dart
d3
=
phi3
(
fit
)
;
Dart
d32
=
phi2
(
d3
)
;
if
(
res
==
NIL
)
res
=
d2
;
beta2unsew
(
d2
)
;
beta2unsew
(
beta0
(
d2
))
;
beta2unsew
(
d32
)
;
beta2unsew
(
beta0
(
d32
))
;
beta2sew
(
d2
,
beta0
(
d32
))
;
beta2sew
(
beta0
(
d2
),
d32
)
;
beta2sew
(
fit
,
beta0
(
d3
))
;
beta2sew
(
beta0
(
fit
),
d3
)
;
fit
=
phi1
(
fit
)
;
}
dit
=
alpha2
(
dit
)
;
}
while
(
dit
!=
d
)
;
GMap2
::
deleteCC
(
d
)
;
return
res
;
}
void
GMap3
::
splitFace
(
Dart
d
,
Dart
e
)
{
assert
(
d
!=
e
&&
GMap2
::
sameOrientedFace
(
d
,
e
))
;
...
...
src/Topology/map/map3.cpp
View file @
156f13bd
...
...
@@ -122,8 +122,11 @@ Dart Map3::deleteVertex(Dart d)
phi2unsew
(
d32
)
;
phi2sew
(
d2
,
d32
)
;
phi2sew
(
fit
,
d3
)
;
fit
=
phi1
(
fit
)
;
}
}
Map2
::
deleteCC
(
d
)
;
return
res
;
...
...
@@ -185,37 +188,32 @@ Dart Map3::deleteEdge(Dart d)
if
(
isBoundaryEdge
(
d
))
return
NIL
;
//Save the darts around the edge
//(one dart per face should be enough)
std
::
vector
<
Dart
>
fstore
;
fstore
.
reserve
(
128
);
Dart
dit
=
d
;
do
{
fstore
.
push_back
(
dit
);
dit
=
alpha2
(
dit
);
}
while
(
dit
!=
d
);
Dart
res
=
NIL
;
for
(
std
::
vector
<
Dart
>::
iterator
it
=
fstore
.
begin
()
;
it
!=
fstore
.
end
()
;
++
it
)
Dart
dit
=
d
;
do
{
Dart
fit
=
*
it
;
Dart
end
=
phi_1
(
fit
)
;
Dart
fit
=
d
it
;
Dart
end
=
fit
;
fit
=
phi1
(
fit
)
;
while
(
fit
!=
end
)
{
Dart
d2
=
phi2
(
fit
)
;
Dart
d3
=
phi3
(
fit
)
;
Dart
d32
=
phi2
(
d3
)
;
if
(
res
==
NIL
)
res
=
d2
;
phi2unsew
(
d2
)
;
phi2unsew
(
d32
)
;
phi2sew
(
d2
,
d32
)
;
phi2sew
(
fit
,
d3
)
;
fit
=
phi1
(
fit
)
;
}
}
dit
=
alpha2
(
dit
)
;
}
while
(
dit
!=
d
)
;
Map2
::
deleteCC
(
d
)
;
return
res
;
...
...
@@ -241,7 +239,7 @@ Dart Map3::collapseEdge(Dart d, bool delDegenerateVolumes)
{
//un brin d'une face adjacente a l'arrete contracte
Dart
d
=
phi2
(
phi_1
(
*
it
));
Map2
::
collapseEdge
(
*
it
,
false
);
Map2
::
collapseEdge
(
*
it
,
false
);
//test de la degeneresence
//impossible d'avoir un volume de moins de 4 faces sans avoir de phi2 en points fixe donc on les vire
...
...
@@ -275,7 +273,6 @@ Dart Map3::collapseEdge(Dart d, bool delDegenerateVolumes)
}
}
return
resV
;
}
...
...
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