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
081f00f6
Commit
081f00f6
authored
Feb 03, 2011
by
Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ajout d'un modele de subdivision Jundereiner
parent
92c07319
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
2 deletions
+70
-2
include/Algo/Modelisation/subdivision.hpp
include/Algo/Modelisation/subdivision.hpp
+68
-0
include/Topology/generic/embeddedMap2.hpp
include/Topology/generic/embeddedMap2.hpp
+2
-2
No files found.
include/Algo/Modelisation/subdivision.hpp
View file @
081f00f6
...
...
@@ -410,6 +410,74 @@ void LoopSubdivision(typename PFP::MAP& map, EMBV& attributs, const FunctorSelec
}
}
template
<
typename
PFP
,
typename
EMBV
,
typename
EMB
>
void
TwoNPlusOneSubdivision
(
typename
PFP
::
MAP
&
map
,
EMBV
&
attributs
,
const
FunctorSelect
&
selected
)
{
AutoAttributeHandler
<
Dart
>
tablePred
(
map
,
EDGE_ORBIT
);
CellMarker
m0
(
map
,
EDGE_CELL
);
std
::
vector
<
Dart
>
dOrig
;
std
::
vector
<
EMB
>
cOrig
;
//first pass cut edge
for
(
Dart
d
=
map
.
begin
();
d
!=
map
.
end
();
map
.
next
(
d
))
{
if
(
selected
(
d
))
{
if
(
!
m0
.
isMarked
(
d
))
{
dOrig
.
push_back
(
d
);
Dart
dd
=
d
;
do
{
if
(
!
m0
.
isMarked
(
dd
))
{
EMB
e1
=
attributs
[
dd
];
EMB
e2
=
attributs
[
map
.
phi1
(
dd
)];
map
.
cutEdge
(
dd
);
attributs
[
map
.
phi1
(
dd
)]
=
e1
*
2.0
f
/
3.0
f
+
e2
/
3.0
f
;
map
.
cutEdge
(
map
.
phi1
(
dd
));
attributs
[
map
.
phi1
(
map
.
phi1
(
dd
))]
=
e2
*
2.0
f
/
3.0
f
+
e1
/
3.0
f
;
m0
.
mark
(
dd
);
m0
.
mark
(
map
.
phi1
(
dd
));
m0
.
mark
(
map
.
template
phi
<
11
>(
dd
));
}
dd
=
map
.
template
phi
<
111
>(
dd
);
}
while
(
dd
!=
d
);
}
}
}
std
::
cout
<<
"nb orig : "
<<
dOrig
.
size
()
<<
std
::
endl
;
DartMarkerNoUnmark
mCorner
(
map
);
// //second pass create corner face
for
(
std
::
vector
<
Dart
>::
iterator
it
=
dOrig
.
begin
();
it
!=
dOrig
.
end
();
++
it
)
{
EMB
c
=
Algo
::
Geometry
::
faceCentroid
<
PFP
>
(
map
,
*
it
,
attributs
);
Dart
dd
=
*
it
;
do
{
map
.
splitFace
(
map
.
phi1
(
dd
),
map
.
phi_1
(
dd
));
map
.
cutEdge
(
map
.
phi1
(
dd
));
mCorner
.
mark
(
map
.
phi2
(
map
.
phi1
(
dd
)));
attributs
[
map
.
template
phi
<
11
>(
dd
)]
=
c
*
2.0
/
3.0
f
+
attributs
[
dd
]
/
3.0
f
;
dd
=
map
.
phi1
(
map
.
phi1
(
map
.
phi1
(
map
.
phi2
(
map
.
phi1
(
dd
)))));
}
while
(
!
mCorner
.
isMarked
(
dd
));
}
//third pass create center face
for
(
std
::
vector
<
Dart
>::
iterator
it
=
dOrig
.
begin
();
it
!=
dOrig
.
end
();
++
it
)
{
Dart
dd
=
map
.
phi2
(
map
.
phi1
(
*
it
));
do
{
mCorner
.
unmark
(
dd
);
Dart
dNext
=
map
.
phi1
(
map
.
phi1
(
map
.
phi1
(
dd
)));
map
.
splitFace
(
dd
,
dNext
);
dd
=
dNext
;
}
while
(
mCorner
.
isMarked
(
dd
));
}
}
template
<
typename
PFP
,
typename
EMBV
,
typename
EMB
>
void
computeDual
(
typename
PFP
::
MAP
&
map
,
EMBV
&
attributs
,
const
FunctorSelect
&
selected
)
{
...
...
include/Topology/generic/embeddedMap2.hpp
View file @
081f00f6
...
...
@@ -327,9 +327,9 @@ void EmbeddedMap2<MAP2>::unsewFaces(Dart d)
if
(
e
!=
d
)
{
MAP2
::
embedNewCell
(
VERTEX_ORBIT
,
e
)
;
MAP2
::
copyCell
(
VERTEX_ORBIT
,
e
,
MAP2
::
phi1
(
d
)
)
;
MAP2
::
copyCell
(
VERTEX_ORBIT
,
e
,
d
)
;
MAP2
::
embedNewCell
(
VERTEX_ORBIT
,
MAP2
::
phi1
(
e
))
;
MAP2
::
copyCell
(
VERTEX_ORBIT
,
MAP2
::
phi1
(
e
),
d
)
;
MAP2
::
copyCell
(
VERTEX_ORBIT
,
MAP2
::
phi1
(
e
),
MAP2
::
phi1
(
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