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
766d3300
Commit
766d3300
authored
Nov 30, 2011
by
untereiner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug Map2::splitFace + debut no_boundary Map3
parent
3e3ee648
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
95 additions
and
49 deletions
+95
-49
include/Topology/map/map3.h
include/Topology/map/map3.h
+2
-1
src/Topology/map/map2.cpp
src/Topology/map/map2.cpp
+2
-1
src/Topology/map/map3.cpp
src/Topology/map/map3.cpp
+91
-47
No files found.
include/Topology/map/map3.h
View file @
766d3300
...
...
@@ -153,8 +153,9 @@ public:
/*! The oriented faces should not be phi3-linked and have the same length
* @param d a dart of the first volume
* @param e a dart of the second volume
* @param withBoundary: if false, volumes must have phi3 fixed points (only for construction: import/primitives)
*/
virtual
void
sewVolumes
(
Dart
d
,
Dart
e
);
virtual
void
sewVolumes
(
Dart
d
,
Dart
e
,
bool
withBoundary
=
true
);
//! Unsew two oriented volumes along their faces.
/*! @param d a dart of one volume
...
...
src/Topology/map/map2.cpp
View file @
766d3300
...
...
@@ -130,6 +130,7 @@ void Map2::deleteCC(Dart d)
DartMarkerStore
mark
(
*
this
);
std
::
vector
<
Dart
>
visited
;
visited
.
reserve
(
1024
)
;
visited
.
push_back
(
d
);
std
::
vector
<
Dart
>::
iterator
it
;
...
...
@@ -409,7 +410,7 @@ bool Map2::mergeFaces(Dart d)
Dart
e
=
phi2
(
d
)
;
phi2unsew
(
d
)
;
Map1
::
mergeCycles
(
d
,
phi1
(
e
))
;
Map1
::
mergeCycles
(
e
,
phi1
(
d
))
;
Map1
::
splitCycle
(
e
,
phi1
(
d
))
;
Map1
::
deleteCycle
(
d
)
;
return
true
;
}
...
...
src/Topology/map/map3.cpp
View file @
766d3300
...
...
@@ -64,22 +64,31 @@ void Map3::deleteVolume(Dart d)
Map2
::
deleteCC
(
dd
)
;
}
void
Map3
::
fillHole
(
Dart
d
)
{
assert
(
isBoundaryMarked
(
d
))
;
boundaryUnmarkOrbit
(
VOLUME
,
d
)
;
}
/*! @name Topological Operators
* Topological operations on 3-maps
*************************************************************************/
Dart
Map3
::
deleteVertex
(
Dart
d
)
{
if
(
isBoundaryVertex
(
d
))
return
NIL
;
//Save the darts around the vertex
//(one dart per face should be enough)
std
::
vector
<
Dart
>
fstoretmp
;
fstoretmp
.
reserve
(
1
00
);
fstoretmp
.
reserve
(
1
28
);
FunctorStore
fs
(
fstoretmp
);
foreach_dart_of_vertex
(
d
,
fs
);
//just one dart per face
std
::
vector
<
Dart
>
fstore
;
fstore
.
reserve
(
1
00
);
fstore
.
reserve
(
1
28
);
DartMarker
mf
(
*
this
);
for
(
std
::
vector
<
Dart
>::
iterator
it
=
fstoretmp
.
begin
()
;
it
!=
fstoretmp
.
end
()
;
++
it
)
{
...
...
@@ -90,73 +99,74 @@ Dart Map3::deleteVertex(Dart d)
}
}
Dart
res
=
NIL
;
for
(
std
::
vector
<
Dart
>::
iterator
it
=
fstore
.
begin
()
;
it
!=
fstore
.
end
()
;
++
it
)
{
if
(
!
mergeVolumes
(
*
it
))
return
NIL
;
Dart
fit
=
*
it
;
Dart
end
=
phi_1
(
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
)
;
}
}
Map2
::
deleteCC
(
d
)
;
return
NIL
;
return
res
;
}
void
Map3
::
cutEdge
(
Dart
d
)
{
if
(
isBoundaryFace
(
d
))
d
=
phi2
(
d
);
Dart
prev
=
d
;
Dart
dd
=
alpha2
(
d
);
Map2
::
cutEdge
(
d
);
while
(
dd
!=
d
)
while
(
dd
!=
d
)
{
prev
=
dd
;
dd
=
alpha2
(
dd
);
Map2
::
cutEdge
(
prev
);
if
(
phi3
(
prev
)
!=
prev
)
{
Dart
d3
=
phi3
(
prev
);
phi3unsew
(
prev
);
phi3sew
(
prev
,
phi1
(
d3
));
phi3sew
(
d3
,
phi1
(
prev
));
}
Dart
d3
=
phi3
(
prev
);
phi3unsew
(
prev
);
phi3sew
(
prev
,
phi1
(
d3
));
phi3sew
(
d3
,
phi1
(
prev
));
}
if
(
!
isBoundaryFace
(
d
))
{
Dart
d3
=
phi3
(
d
);
phi3unsew
(
d
);
phi3sew
(
d
,
phi1
(
d3
));
phi3sew
(
d3
,
phi1
(
d
));
}
Dart
d3
=
phi3
(
d
);
phi3unsew
(
d
);
phi3sew
(
d
,
phi1
(
d3
));
phi3sew
(
d3
,
phi1
(
d
));
}
bool
Map3
::
uncutEdge
(
Dart
d
)
{
if
(
vertexDegree
(
phi1
(
d
))
==
2
)
{
if
(
isBoundaryFace
(
d
))
d
=
phi_1
(
phi2
(
d
));
Dart
prev
=
d
;
Dart
dd
=
alpha2
(
d
);
Dart
prev
=
d
;
phi3unsew
(
phi1
(
prev
))
;
Map2
::
uncutEdge
(
prev
);
if
(
phi3
(
dd
)
!=
dd
)
phi3sew
(
dd
,
phi2
(
prev
));
while
(
dd
!=
d
)
Dart
dd
=
d
;
do
{
prev
=
dd
;
dd
=
alpha2
(
dd
);
phi3unsew
(
phi2
(
prev
))
;
phi3unsew
(
phi2
(
phi1
(
prev
)))
;
Map2
::
uncutEdge
(
prev
);
phi3sew
(
dd
,
phi2
(
prev
));
}
}
while
(
dd
!=
d
)
;
return
true
;
}
return
false
;
...
...
@@ -164,29 +174,63 @@ bool Map3::uncutEdge(Dart d)
void
Map3
::
splitFace
(
Dart
d
,
Dart
e
)
{
Map2
::
splitFace
(
d
,
e
);
assert
(
d
!=
e
&&
sameOrientedFace
(
d
,
e
))
;
Map2
::
splitFace
(
d
,
e
);
if
(
!
isBoundaryFace
(
d
))
{
Dart
dd
=
phi1
(
phi3
(
d
));
Dart
ee
=
phi1
(
phi3
(
e
));
Dart
dd
=
phi1
(
phi3
(
d
));
Dart
ee
=
phi1
(
phi3
(
e
));
Map2
::
splitFace
(
dd
,
ee
);
Map2
::
splitFace
(
dd
,
ee
);
phi3sew
(
phi_1
(
d
),
phi_1
(
ee
));
phi3sew
(
phi_1
(
e
),
phi_1
(
dd
));
}
phi3sew
(
phi_1
(
d
),
phi_1
(
ee
));
phi3sew
(
phi_1
(
e
),
phi_1
(
dd
));
}
void
Map3
::
sewVolumes
(
Dart
d
,
Dart
e
)
void
Map3
::
sewVolumes
(
Dart
d
,
Dart
e
,
bool
withBoundary
)
{
assert
(
faceDegree
(
d
)
==
faceDegree
(
e
));
// if sewing with fixed points
if
(
!
withBoundary
)
{
assert
(
phi3
(
d
)
==
d
&&
phi3
(
e
)
==
e
)
;
Dart
fitD
=
d
;
Dart
fitE
=
e
;
do
{
phi3sew
(
fitD
,
fitE
)
;
fitD
=
phi1
(
fitD
)
;
fitE
=
phi_1
(
fitE
)
;
}
while
(
fitD
!=
d
)
;
return
;
}
Dart
dd
=
phi3
(
d
)
;
Dart
ee
=
phi3
(
e
)
;
Dart
fitD
=
dd
;
Dart
fitE
=
ee
;
do
{
Dart
fitD2
=
phi2
(
fitD
)
;
Dart
fitE2
=
phi2
(
fitE
)
;
if
(
fitD2
!=
fitE
)
{
phi2unsew
(
fitD
)
;
phi2unsew
(
fitE
)
;
phi2sew
(
fitD2
,
fitE2
)
;
phi2sew
(
fitD
,
fitE
)
;
}
fitD
=
phi1
(
fitD
)
;
fitE
=
phi_1
(
fitE
)
;
}
while
(
fitD
!=
d
)
;
Map2
::
deleteCC
(
dd
)
;
Dart
fitD
=
d
;
Dart
fitE
=
e
;
do
{
phi3sew
(
fitD
,
fitE
)
;
phi3sew
(
fitD
,
fitE
)
;
fitD
=
phi1
(
fitD
)
;
fitE
=
phi_1
(
fitE
)
;
}
while
(
fitD
!=
d
)
;
...
...
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