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
Sauvage
CGoGN
Commits
294531ab
Commit
294531ab
authored
Nov 04, 2011
by
Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
embeddedMap3 : unsewVolume, mauvais brin en param
parent
9aed1375
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
22 deletions
+31
-22
Apps/Examples/simpleGMap3.cpp
Apps/Examples/simpleGMap3.cpp
+25
-18
include/Topology/generic/embeddedMap3.hpp
include/Topology/generic/embeddedMap3.hpp
+6
-4
No files found.
Apps/Examples/simpleGMap3.cpp
View file @
294531ab
...
...
@@ -32,24 +32,31 @@ SimpleGMap3::SimpleGMap3()
{
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"position"
);
Algo
::
Modelisation
::
Primitive3D
<
PFP
>
prim
(
myMap
,
position
);
Dart
d
=
prim
.
hexaGrid_topo
(
2
,
2
,
1
);
prim
.
embedHexaGrid
(
1
,
1
,
1
);
Dart
d1
=
myMap
.
phi1
(
myMap
.
phi1
(
myMap
.
phi2
(
myMap
.
phi1
(
myMap
.
phi1
(
d
)))));
VEC3
mid0
=
(
position
[
d1
]
+
position
[
myMap
.
phi1
(
d1
)])
/
2.0
f
;
myMap
.
cutEdge
(
d1
);
position
[
myMap
.
phi1
(
d1
)]
=
mid0
;
VEC3
mid1
=
(
position
[
d
]
+
position
[
myMap
.
phi1
(
d
)])
/
2.0
f
;
myMap
.
cutEdge
(
d
);
position
[
myMap
.
phi1
(
d
)]
=
mid1
;
// d = myMap.phi1(myMap.phi1(d));
d
=
myMap
.
phi1
(
myMap
.
phi1
(
myMap
.
phi2
(
myMap
.
phi1
(
myMap
.
phi1
(
d
)))));
VEC3
mid
=
(
position
[
d
]
+
position
[
myMap
.
phi1
(
d
)])
/
2.0
f
;
myMap
.
cutEdge
(
d
);
position
[
myMap
.
phi1
(
d
)]
=
mid
;
// Algo::Modelisation::Primitive3D<PFP> prim(myMap,position);
// Dart d = prim.hexaGrid_topo(2,2,1);
// prim.embedHexaGrid(1,1,1);
//
// Dart d1 = myMap.phi1(myMap.phi1(myMap.phi2(myMap.phi1(myMap.phi1(d)))));
// VEC3 mid0 = (position[d1]+position[myMap.phi1(d1)])/2.0f;
// myMap.cutEdge(d1);
// position[myMap.phi1(d1)] = mid0;
//
// VEC3 mid1 = (position[d]+position[myMap.phi1(d)])/2.0f;
// myMap.cutEdge(d);
// position[myMap.phi1(d)] = mid1;
//
//// d = myMap.phi1(myMap.phi1(d));
// d = myMap.phi1(myMap.phi1(myMap.phi2(myMap.phi1(myMap.phi1(d)))));
// VEC3 mid = (position[d]+position[myMap.phi1(d)])/2.0f;
// myMap.cutEdge(d);
// position[myMap.phi1(d)] = mid;
Algo
::
Modelisation
::
Primitive3D
<
PFP
>
prim2
(
myMap
,
position
);
Dart
d
=
prim2
.
hexaGrid_topo
(
2
,
1
,
1
);
prim2
.
embedHexaGrid
(
1
,
1
,
1
);
d
=
myMap
.
phi2
(
myMap
.
phi1
(
myMap
.
phi1
(
myMap
.
phi2
(
d
))));
myMap
.
unsewVolumes
(
d
);
}
void
SimpleGMap3
::
initGUI
()
...
...
include/Topology/generic/embeddedMap3.hpp
View file @
294531ab
...
...
@@ -80,10 +80,10 @@ void EmbeddedMap3<MAP3>::unsewVolumes(Dart d)
{
if
(
MAP3
::
isOrbitEmbedded
(
VERTEX
))
{
if
(
!
MAP3
::
sameVertex
(
d
,
dd
))
if
(
!
MAP3
::
sameVertex
(
d
dd
,
dd
))
{
MAP3
::
embedNewCell
(
VERTEX
,
dd
);
MAP3
::
copyCell
(
VERTEX
,
dd
,
d
);
MAP3
::
copyCell
(
VERTEX
,
dd
,
d
dd
);
}
}
...
...
@@ -91,10 +91,10 @@ void EmbeddedMap3<MAP3>::unsewVolumes(Dart d)
if
(
MAP3
::
isOrbitEmbedded
(
EDGE
))
{
if
(
!
MAP3
::
sameEdge
(
d
,
dd
))
if
(
!
MAP3
::
sameEdge
(
d
dd
,
dd
))
{
MAP3
::
embedNewCell
(
EDGE
,
dd
);
MAP3
::
copyCell
(
VERTEX
,
dd
,
d
);
MAP3
::
copyCell
(
VERTEX
,
dd
,
d
dd
);
}
}
...
...
@@ -104,6 +104,8 @@ void EmbeddedMap3<MAP3>::unsewVolumes(Dart d)
if
(
MAP3
::
isOrbitEmbedded
(
FACE
))
{
std
::
cout
<<
"newCell f"
<<
std
::
endl
;
MAP3
::
embedNewCell
(
FACE
,
dd
);
MAP3
::
copyCell
(
FACE
,
dd
,
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