Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
David Cazier
CGoGN
Commits
9d09fe01
Commit
9d09fe01
authored
Nov 17, 2011
by
Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
suppression notation Oriented dans polyhedron.h et correction importTet compatible gmap
parent
5fb39d13
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
67 additions
and
81 deletions
+67
-81
Apps/Examples/decimationVolumique.cpp
Apps/Examples/decimationVolumique.cpp
+2
-2
Apps/Examples/simpleGMap2.cpp
Apps/Examples/simpleGMap2.cpp
+1
-1
Apps/Examples/squelette3carte.cpp
Apps/Examples/squelette3carte.cpp
+2
-2
include/Algo/Import/importObjEle.hpp
include/Algo/Import/importObjEle.hpp
+2
-2
include/Algo/Import/importTet.hpp
include/Algo/Import/importTet.hpp
+25
-39
include/Algo/Import/importTs.hpp
include/Algo/Import/importTs.hpp
+2
-2
include/Algo/Modelisation/polyhedron.h
include/Algo/Modelisation/polyhedron.h
+5
-5
include/Algo/Modelisation/polyhedron.hpp
include/Algo/Modelisation/polyhedron.hpp
+24
-24
include/Algo/Modelisation/primitives3d.h
include/Algo/Modelisation/primitives3d.h
+1
-1
include/Algo/Modelisation/primitives3d.hpp
include/Algo/Modelisation/primitives3d.hpp
+3
-3
No files found.
Apps/Examples/decimationVolumique.cpp
View file @
9d09fe01
...
@@ -321,8 +321,8 @@ void MyGlutWin::initGUI()
...
@@ -321,8 +321,8 @@ void MyGlutWin::initGUI()
void
maillageTest
()
void
maillageTest
()
{
{
/// on creer une carte
/// on creer une carte
Dart
dd
=
Algo
::
Modelisation
::
Polyhedron
<
PFP
>::
create
Oriented
Polyhedron
(
myMap
,
4
);
Dart
dd
=
Algo
::
Modelisation
::
Polyhedron
<
PFP
>::
createPolyhedron
(
myMap
,
4
);
Dart
ee
=
Algo
::
Modelisation
::
Polyhedron
<
PFP
>::
create
Oriented
Polyhedron
(
myMap
,
4
);
Dart
ee
=
Algo
::
Modelisation
::
Polyhedron
<
PFP
>::
createPolyhedron
(
myMap
,
4
);
myMap
.
sewVolumes
(
dd
,
ee
);
myMap
.
sewVolumes
(
dd
,
ee
);
// plongement
// plongement
...
...
Apps/Examples/simpleGMap2.cpp
View file @
9d09fe01
...
@@ -31,7 +31,7 @@ SimpleGMap2::SimpleGMap2()
...
@@ -31,7 +31,7 @@ SimpleGMap2::SimpleGMap2()
{
{
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"position"
);
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"position"
);
Dart
d
=
Algo
::
Modelisation
::
Polyhedron
<
PFP
>::
create
Oriented
Tetra
(
myMap
);
Dart
d
=
Algo
::
Modelisation
::
Polyhedron
<
PFP
>::
createTetra
(
myMap
);
position
[
d
]
=
VEC3
(
0
,
0
,
0
);
position
[
d
]
=
VEC3
(
0
,
0
,
0
);
position
[
myMap
.
phi1
(
d
)]
=
VEC3
(
10
,
0
,
15
);
position
[
myMap
.
phi1
(
d
)]
=
VEC3
(
10
,
0
,
15
);
position
[
myMap
.
phi_1
(
d
)]
=
VEC3
(
10
,
20
,
15
);
position
[
myMap
.
phi_1
(
d
)]
=
VEC3
(
10
,
20
,
15
);
...
...
Apps/Examples/squelette3carte.cpp
View file @
9d09fe01
...
@@ -269,8 +269,8 @@ void MyGlutWin::initGUI()
...
@@ -269,8 +269,8 @@ void MyGlutWin::initGUI()
void
maillageTest
()
void
maillageTest
()
{
{
/// on creer une carte
/// on creer une carte
Dart
dd
=
Algo
::
Modelisation
::
Polyhedron
<
PFP
>::
create
Oriented
Polyhedron
(
myMap
,
4
);
Dart
dd
=
Algo
::
Modelisation
::
Polyhedron
<
PFP
>::
createPolyhedron
(
myMap
,
4
);
Dart
ee
=
Algo
::
Modelisation
::
Polyhedron
<
PFP
>::
create
Oriented
Polyhedron
(
myMap
,
4
);
Dart
ee
=
Algo
::
Modelisation
::
Polyhedron
<
PFP
>::
createPolyhedron
(
myMap
,
4
);
myMap
.
sewVolumes
(
dd
,
ee
);
myMap
.
sewVolumes
(
dd
,
ee
);
// plongement
// plongement
...
...
include/Algo/Import/importObjEle.hpp
View file @
9d09fe01
...
@@ -146,8 +146,8 @@ bool importOFFWithELERegions(typename PFP::MAP& map, const std::string& filename
...
@@ -146,8 +146,8 @@ bool importOFFWithELERegions(typename PFP::MAP& map, const std::string& filename
oss
>>
nbe
;
oss
>>
nbe
;
// CGoGNout << "tetra number : " << nbe << CGoGNendl;
// CGoGNout << "tetra number : " << nbe << CGoGNendl;
//Algo::Modelisation::Polyhedron<PFP>::create
Oriented
Tetra(map);
//Algo::Modelisation::Polyhedron<PFP>::createTetra(map);
Dart
d
=
Algo
::
Modelisation
::
Polyhedron
<
PFP
>::
create
Oriented
Polyhedron
(
map
,
4
);
Dart
d
=
Algo
::
Modelisation
::
Polyhedron
<
PFP
>::
createPolyhedron
(
map
,
4
);
Geom
::
Vec4ui
pt
;
Geom
::
Vec4ui
pt
;
oss
>>
pt
[
0
];
oss
>>
pt
[
0
];
oss
>>
pt
[
1
];
oss
>>
pt
[
1
];
...
...
include/Algo/Import/importTet.hpp
View file @
9d09fe01
...
@@ -43,10 +43,10 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector<
...
@@ -43,10 +43,10 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector<
AttributeContainer
&
container
=
map
.
getAttributeContainer
(
VERTEX
)
;
AttributeContainer
&
container
=
map
.
getAttributeContainer
(
VERTEX
)
;
unsigned
int
m_nbVertices
=
0
,
m_nbFaces
=
0
,
m_nbEdges
=
0
,
m_nbVolumes
=
0
;
unsigned
int
m_nbVertices
=
0
,
m_nbVolumes
=
0
;
AutoAttributeHandler
<
NoMathIONameAttribute
<
std
::
vector
<
Dart
>
>
>
vecDartsPerVertex
(
map
,
VERTEX
,
"incidents"
);
AutoAttributeHandler
<
NoMathIONameAttribute
<
std
::
vector
<
Dart
>
>
>
vecDartsPerVertex
(
map
,
VERTEX
,
"incidents"
);
//
open file
//open file
std
::
ifstream
fp
(
filename
.
c_str
(),
std
::
ios
::
in
);
std
::
ifstream
fp
(
filename
.
c_str
(),
std
::
ios
::
in
);
if
(
!
fp
.
good
())
if
(
!
fp
.
good
())
{
{
...
@@ -56,20 +56,17 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector<
...
@@ -56,20 +56,17 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector<
std
::
string
ligne
;
std
::
string
ligne
;
unsigned
int
nbv
,
nbt
;
unsigned
int
nbv
,
nbt
;
//
lecture des
n
o
mb
res de sommets/tetra
//
reading
n
u
mb
er of vertices
std
::
getline
(
fp
,
ligne
);
std
::
getline
(
fp
,
ligne
);
std
::
stringstream
oss
(
ligne
);
std
::
stringstream
oss
(
ligne
);
oss
>>
nbv
;
oss
>>
nbv
;
//CGoGNout << "nbV = " << nbv << CGoGNendl;
// reading number of tetrahedra
std
::
getline
(
fp
,
ligne
);
std
::
getline
(
fp
,
ligne
);
std
::
stringstream
oss2
(
ligne
);
std
::
stringstream
oss2
(
ligne
);
oss2
>>
nbt
;
oss2
>>
nbt
;
//CGoGNout << "nbT = " << nbt << CGoGNendl;
//reading vertices
//lecture sommets
std
::
vector
<
unsigned
int
>
verticesID
;
std
::
vector
<
unsigned
int
>
verticesID
;
verticesID
.
reserve
(
nbv
);
verticesID
.
reserve
(
nbv
);
for
(
unsigned
int
i
=
0
;
i
<
nbv
;
++
i
)
for
(
unsigned
int
i
=
0
;
i
<
nbv
;
++
i
)
...
@@ -85,32 +82,27 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector<
...
@@ -85,32 +82,27 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector<
oss
>>
x
;
oss
>>
x
;
oss
>>
y
;
oss
>>
y
;
oss
>>
z
;
oss
>>
z
;
//
on peut ajouter ici la lecture de couleur si elle exist
e
//
TODO : if required read other vertices attributes her
e
VEC3
pos
(
x
*
scaleFactor
,
y
*
scaleFactor
,
z
*
scaleFactor
);
VEC3
pos
(
x
*
scaleFactor
,
y
*
scaleFactor
,
z
*
scaleFactor
);
//CGoGNout << "VEC3 = " << pos << CGoGNendl;
//
CGoGNout << "VEC3 = " << pos << CGoGNendl;
unsigned
int
id
=
container
.
insertLine
();
unsigned
int
id
=
container
.
insertLine
();
position
[
id
]
=
pos
;
position
[
id
]
=
pos
;
verticesID
.
push_back
(
id
);
verticesID
.
push_back
(
id
);
}
}
m_nbVertices
=
verticesID
.
size
()
;
m_nbVertices
=
nbv
;
//CGoGNout << "nbVertices = " << m_nbVertices << CGoGNendl;
m_nbVolumes
=
nbt
;
m_nbVolumes
=
nbt
;
//CGoGNout << "nbVolumes = " << m_nbVolumes << CGoGNendl;
// lecture tetra
// normalement m_nbVolumes*12 (car on ne charge que des tetra)
m_nbFaces
=
nbt
*
4
;
CGoGNout
<<
"nb points = "
<<
m_nbVertices
<<
" / nb faces = "
<<
m_nbFaces
<<
" / nb edges = "
<<
m_nbEdges
<<
" / nb tet = "
<<
m_nbVolumes
<<
CGoGNendl
;
CGoGNout
<<
"nb points = "
<<
m_nbVertices
<<
" / nb tet = "
<<
m_nbVolumes
<<
CGoGNendl
;
//Read and embed tetrahedr
a TODO
//Read and embed
all
tetrahedr
ons
for
(
unsigned
int
i
=
0
;
i
<
m_nbVolumes
;
++
i
)
for
(
unsigned
int
i
=
0
;
i
<
m_nbVolumes
;
++
i
)
{
{
//start one tetra
int
nbe
;
int
nbe
;
do
do
{
{
...
@@ -118,59 +110,53 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector<
...
@@ -118,59 +110,53 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector<
}
while
(
ligne
.
size
()
==
0
);
}
while
(
ligne
.
size
()
==
0
);
std
::
stringstream
oss
(
ligne
);
std
::
stringstream
oss
(
ligne
);
oss
>>
nbe
;
oss
>>
nbe
;
//number of vertices =4
// CGoGNout << "tetra number : " << nbe << CGoGNendl
;
assert
(
nbe
==
4
)
;
//Algo::Modelisation::Polyhedron<PFP>::createOrientedTetra(map);
Dart
d
=
Algo
::
Modelisation
::
Polyhedron
<
PFP
>::
createPolyhedron
(
map
,
4
);
Dart
d
=
Algo
::
Modelisation
::
Polyhedron
<
PFP
>::
createOrientedPolyhedron
(
map
,
4
);
Geom
::
Vec4ui
pt
;
Geom
::
Vec4ui
pt
;
oss
>>
pt
[
0
];
oss
>>
pt
[
0
];
oss
>>
pt
[
1
];
oss
>>
pt
[
1
];
oss
>>
pt
[
2
];
oss
>>
pt
[
2
];
oss
>>
pt
[
3
];
oss
>>
pt
[
3
];
//regions
?
//
if
regions
are defined use this number
oss
>>
nbe
;
oss
>>
nbe
;
//ignored here
// CGoGNout << "\t embedding number : " << pt[0] << " " << pt[1] << " " << pt[2] << " " << pt[3] << CGoGNendl;
// CGoGNout << "\t embedding number : " << pt[0] << " " << pt[1] << " " << pt[2] << " " << pt[3] << CGoGNendl;
// Embed three vertices
// Embed three
"base"
vertices
for
(
unsigned
int
j
=
0
;
j
<
3
;
++
j
)
for
(
unsigned
int
j
=
0
;
j
<
3
;
++
j
)
{
{
// CGoGNout << "\t embedding number : " << pt[j];
FunctorSetEmb
<
typename
PFP
::
MAP
>
femb
(
map
,
VERTEX
,
verticesID
[
pt
[
j
]]);
FunctorSetEmb
<
typename
PFP
::
MAP
>
femb
(
map
,
VERTEX
,
verticesID
[
pt
[
j
]]);
map
.
foreach_dart_of_vertex
(
d
,
femb
);
//apply foreach for gmaps : cannot be included in the following loop
//store darts per vertices to optimize reconstruction
Dart
dd
=
d
;
Dart
dd
=
d
;
do
do
{
{
femb
(
dd
);
//vecDartPtrEmb[pt[j]].push_back(dd);
vecDartsPerVertex
[
pt
[
j
]].
push_back
(
dd
);
vecDartsPerVertex
[
pt
[
j
]].
push_back
(
dd
);
dd
=
map
.
phi1
(
map
.
phi2
(
dd
));
dd
=
map
.
phi1
(
map
.
phi2
(
dd
));
}
while
(
dd
!=
d
);
}
while
(
dd
!=
d
);
d
=
map
.
phi1
(
d
);
d
=
map
.
phi1
(
d
);
// CGoGNout << " done" << CGoGNendl;
}
}
//Embed the last vertex
//Embed the last "top" vertex
// CGoGNout << "\t embedding number : " << pt[3] << CGoGNendl;
d
=
map
.
phi_1
(
map
.
phi2
(
d
));
d
=
map
.
phi_1
(
map
.
phi2
(
d
));
FunctorSetEmb
<
typename
PFP
::
MAP
>
femb
(
map
,
VERTEX
,
verticesID
[
pt
[
3
]]);
FunctorSetEmb
<
typename
PFP
::
MAP
>
femb
(
map
,
VERTEX
,
verticesID
[
pt
[
3
]]);
map
.
foreach_dart_of_vertex
(
d
,
femb
);
//apply foreach for gmaps : cannot be included in the following loop
//store darts per vertices to optimize reconstruction
Dart
dd
=
d
;
Dart
dd
=
d
;
do
do
{
{
femb
(
dd
);
// CGoGNout << "embed" << CGoGNendl;
//vecDartPtrEmb[pt[3]].push_back(dd);
vecDartsPerVertex
[
pt
[
3
]].
push_back
(
dd
);
vecDartsPerVertex
[
pt
[
3
]].
push_back
(
dd
);
dd
=
map
.
phi1
(
map
.
phi2
(
dd
));
dd
=
map
.
phi1
(
map
.
phi2
(
dd
));
}
while
(
dd
!=
d
);
}
while
(
dd
!=
d
);
//
CGoGNout << "
end tetra
" << CGoGNendl;
//end
of
tetra
}
}
// CGoGNout << "end 1/2" << CGoGNendl;
// CGoGNout << "end 1/2" << CGoGNendl;
...
...
include/Algo/Import/importTs.hpp
View file @
9d09fe01
...
@@ -131,8 +131,8 @@ bool importTs(typename PFP::MAP& map, const std::string& filename, std::vector<s
...
@@ -131,8 +131,8 @@ bool importTs(typename PFP::MAP& map, const std::string& filename, std::vector<s
std
::
stringstream
oss
(
ligne
);
std
::
stringstream
oss
(
ligne
);
// CGoGNout << "tetra number : " << nbe << CGoGNendl;
// CGoGNout << "tetra number : " << nbe << CGoGNendl;
//Algo::Modelisation::Polyhedron<PFP>::create
Oriented
Tetra(map);
//Algo::Modelisation::Polyhedron<PFP>::createTetra(map);
Dart
d
=
Algo
::
Modelisation
::
Polyhedron
<
PFP
>::
create
Oriented
Polyhedron
(
map
,
4
);
Dart
d
=
Algo
::
Modelisation
::
Polyhedron
<
PFP
>::
createPolyhedron
(
map
,
4
);
Geom
::
Vec4ui
pt
;
Geom
::
Vec4ui
pt
;
oss
>>
pt
[
0
];
oss
>>
pt
[
0
];
oss
>>
pt
[
1
];
oss
>>
pt
[
1
];
...
...
include/Algo/Modelisation/polyhedron.h
View file @
9d09fe01
...
@@ -170,27 +170,27 @@ public:
...
@@ -170,27 +170,27 @@ public:
/**
/**
* create simple simple polyhedron (not handled by Polyhedron object)
* create simple simple polyhedron (not handled by Polyhedron object)
*/
*/
static
Dart
create
Oriented
Polyhedron
(
typename
PFP
::
MAP
&
the_map
,
int
nbFaces
);
static
Dart
createPolyhedron
(
typename
PFP
::
MAP
&
the_map
,
int
nbFaces
);
/**
/**
* create simple simple tetrahedron (not handled by Polyhedron object)
* create simple simple tetrahedron (not handled by Polyhedron object)
*/
*/
static
Dart
create
Oriented
Tetra
(
typename
PFP
::
MAP
&
the_map
);
static
Dart
createTetra
(
typename
PFP
::
MAP
&
the_map
);
/**
/**
* create simple simple pyramid (not handled by Polyhedron object)
* create simple simple pyramid (not handled by Polyhedron object)
*/
*/
static
Dart
create
Oriented
Pyra
(
typename
PFP
::
MAP
&
the_map
);
static
Dart
createPyra
(
typename
PFP
::
MAP
&
the_map
);
/**
/**
* create simple simple hexaedron (not handled by Polyhedron object)
* create simple simple hexaedron (not handled by Polyhedron object)
*/
*/
static
Dart
create
Oriented
Hexa
(
typename
PFP
::
MAP
&
the_map
);
static
Dart
createHexa
(
typename
PFP
::
MAP
&
the_map
);
/**
/**
* create simple simple prism (not handled by Polyhedron object)
* create simple simple prism (not handled by Polyhedron object)
*/
*/
static
Dart
create
Oriented
Prism
(
typename
PFP
::
MAP
&
the_map
);
static
Dart
createPrism
(
typename
PFP
::
MAP
&
the_map
);
/*
/*
* get the reference dart
* get the reference dart
...
...
include/Algo/Modelisation/polyhedron.hpp
View file @
9d09fe01
...
@@ -167,7 +167,7 @@ m_positions(p1.m_positions)
...
@@ -167,7 +167,7 @@ m_positions(p1.m_positions)
}
}
template
<
typename
PFP
>
template
<
typename
PFP
>
Dart
Polyhedron
<
PFP
>::
create
Oriented
Tetra
(
typename
PFP
::
MAP
&
the_map
)
Dart
Polyhedron
<
PFP
>::
createTetra
(
typename
PFP
::
MAP
&
the_map
)
{
{
Dart
base
=
the_map
.
newFace
(
3
);
Dart
base
=
the_map
.
newFace
(
3
);
...
@@ -188,22 +188,22 @@ Dart Polyhedron<PFP>::createOrientedTetra(typename PFP::MAP& the_map)
...
@@ -188,22 +188,22 @@ Dart Polyhedron<PFP>::createOrientedTetra(typename PFP::MAP& the_map)
}
}
template
<
typename
PFP
>
template
<
typename
PFP
>
Dart
Polyhedron
<
PFP
>::
create
Oriented
Pyra
(
typename
PFP
::
MAP
&
the_map
)
Dart
Polyhedron
<
PFP
>::
createPyra
(
typename
PFP
::
MAP
&
the_map
)
{
{
Dart
base
=
the_map
.
new
Oriented
Face
(
4
);
Dart
base
=
the_map
.
newFace
(
4
);
Dart
side1
=
the_map
.
new
Oriented
Face
(
3
);
Dart
side1
=
the_map
.
newFace
(
3
);
the_map
.
sewFaces
(
base
,
side1
);
the_map
.
sewFaces
(
base
,
side1
);
Dart
side2
=
the_map
.
new
Oriented
Face
(
3
);
Dart
side2
=
the_map
.
newFace
(
3
);
the_map
.
sewFaces
(
the_map
.
phi1
(
base
),
side2
);
the_map
.
sewFaces
(
the_map
.
phi1
(
base
),
side2
);
the_map
.
sewFaces
(
the_map
.
phi_1
(
side1
),
the_map
.
phi1
(
side2
));
the_map
.
sewFaces
(
the_map
.
phi_1
(
side1
),
the_map
.
phi1
(
side2
));
Dart
side3
=
the_map
.
new
Oriented
Face
(
3
);
Dart
side3
=
the_map
.
newFace
(
3
);
the_map
.
sewFaces
(
the_map
.
phi1
(
the_map
.
phi1
(
base
)),
side3
);
the_map
.
sewFaces
(
the_map
.
phi1
(
the_map
.
phi1
(
base
)),
side3
);
the_map
.
sewFaces
(
the_map
.
phi_1
(
side2
),
the_map
.
phi1
(
side3
));
the_map
.
sewFaces
(
the_map
.
phi_1
(
side2
),
the_map
.
phi1
(
side3
));
Dart
side4
=
the_map
.
new
Oriented
Face
(
3
);
Dart
side4
=
the_map
.
newFace
(
3
);
the_map
.
sewFaces
(
the_map
.
phi_1
(
base
),
side4
);
the_map
.
sewFaces
(
the_map
.
phi_1
(
base
),
side4
);
the_map
.
sewFaces
(
the_map
.
phi_1
(
side3
),
the_map
.
phi1
(
side4
));
the_map
.
sewFaces
(
the_map
.
phi_1
(
side3
),
the_map
.
phi1
(
side4
));
...
@@ -213,28 +213,28 @@ Dart Polyhedron<PFP>::createOrientedPyra(typename PFP::MAP& the_map)
...
@@ -213,28 +213,28 @@ Dart Polyhedron<PFP>::createOrientedPyra(typename PFP::MAP& the_map)
}
}
template
<
typename
PFP
>
template
<
typename
PFP
>
Dart
Polyhedron
<
PFP
>::
create
Oriented
Hexa
(
typename
PFP
::
MAP
&
the_map
)
Dart
Polyhedron
<
PFP
>::
createHexa
(
typename
PFP
::
MAP
&
the_map
)
{
{
Dart
base
=
the_map
.
new
Oriented
Face
(
4
);
Dart
base
=
the_map
.
newFace
(
4
);
Dart
side1
=
the_map
.
new
Oriented
Face
(
4
);
Dart
side1
=
the_map
.
newFace
(
4
);
the_map
.
sewFaces
(
base
,
side1
);
the_map
.
sewFaces
(
base
,
side1
);
Dart
side2
=
the_map
.
new
Oriented
Face
(
4
);
Dart
side2
=
the_map
.
newFace
(
4
);
the_map
.
sewFaces
(
the_map
.
phi1
(
base
),
side2
);
the_map
.
sewFaces
(
the_map
.
phi1
(
base
),
side2
);
the_map
.
sewFaces
(
the_map
.
phi_1
(
side1
),
the_map
.
phi1
(
side2
));
the_map
.
sewFaces
(
the_map
.
phi_1
(
side1
),
the_map
.
phi1
(
side2
));
Dart
side3
=
the_map
.
new
Oriented
Face
(
4
);
Dart
side3
=
the_map
.
newFace
(
4
);
the_map
.
sewFaces
(
the_map
.
phi1
(
the_map
.
phi1
(
base
)),
side3
);
the_map
.
sewFaces
(
the_map
.
phi1
(
the_map
.
phi1
(
base
)),
side3
);
the_map
.
sewFaces
(
the_map
.
phi_1
(
side2
),
the_map
.
phi1
(
side3
));
the_map
.
sewFaces
(
the_map
.
phi_1
(
side2
),
the_map
.
phi1
(
side3
));
Dart
side4
=
the_map
.
new
Oriented
Face
(
4
);
Dart
side4
=
the_map
.
newFace
(
4
);
the_map
.
sewFaces
(
the_map
.
phi_1
(
base
),
side4
);
the_map
.
sewFaces
(
the_map
.
phi_1
(
base
),
side4
);
the_map
.
sewFaces
(
the_map
.
phi_1
(
side3
),
the_map
.
phi1
(
side4
));
the_map
.
sewFaces
(
the_map
.
phi_1
(
side3
),
the_map
.
phi1
(
side4
));
the_map
.
sewFaces
(
the_map
.
phi_1
(
side4
),
the_map
.
phi1
(
side1
));
the_map
.
sewFaces
(
the_map
.
phi_1
(
side4
),
the_map
.
phi1
(
side1
));
Dart
top
=
the_map
.
new
Oriented
Face
(
4
);
Dart
top
=
the_map
.
newFace
(
4
);
the_map
.
sewFaces
(
top
,
the_map
.
phi1
(
the_map
.
phi1
(
side1
)));
the_map
.
sewFaces
(
top
,
the_map
.
phi1
(
the_map
.
phi1
(
side1
)));
the_map
.
sewFaces
(
the_map
.
phi_1
(
top
),
the_map
.
phi1
(
the_map
.
phi1
(
side2
)));
the_map
.
sewFaces
(
the_map
.
phi_1
(
top
),
the_map
.
phi1
(
the_map
.
phi1
(
side2
)));
the_map
.
sewFaces
(
the_map
.
phi1
(
the_map
.
phi1
(
top
)),
the_map
.
phi1
(
the_map
.
phi1
(
side3
)));
the_map
.
sewFaces
(
the_map
.
phi1
(
the_map
.
phi1
(
top
)),
the_map
.
phi1
(
the_map
.
phi1
(
side3
)));
...
@@ -244,24 +244,24 @@ Dart Polyhedron<PFP>::createOrientedHexa(typename PFP::MAP& the_map)
...
@@ -244,24 +244,24 @@ Dart Polyhedron<PFP>::createOrientedHexa(typename PFP::MAP& the_map)
}
}
template
<
typename
PFP
>
template
<
typename
PFP
>
Dart
Polyhedron
<
PFP
>::
create
Oriented
Prism
(
typename
PFP
::
MAP
&
the_map
)
Dart
Polyhedron
<
PFP
>::
createPrism
(
typename
PFP
::
MAP
&
the_map
)
{
{
Dart
base
=
the_map
.
new
Oriented
Face
(
3
);
Dart
base
=
the_map
.
newFace
(
3
);
Dart
side1
=
the_map
.
new
Oriented
Face
(
4
);
Dart
side1
=
the_map
.
newFace
(
4
);
the_map
.
sewFaces
(
base
,
side1
);
the_map
.
sewFaces
(
base
,
side1
);
Dart
side2
=
the_map
.
new
Oriented
Face
(
4
);
Dart
side2
=
the_map
.
newFace
(
4
);
the_map
.
sewFaces
(
the_map
.
phi1
(
base
),
side2
);
the_map
.
sewFaces
(
the_map
.
phi1
(
base
),
side2
);
the_map
.
sewFaces
(
the_map
.
phi_1
(
side1
),
the_map
.
phi1
(
side2
));
the_map
.
sewFaces
(
the_map
.
phi_1
(
side1
),
the_map
.
phi1
(
side2
));
Dart
side3
=
the_map
.
new
Oriented
Face
(
4
);
Dart
side3
=
the_map
.
newFace
(
4
);
the_map
.
sewFaces
(
the_map
.
phi1
(
the_map
.
phi1
(
base
)),
side3
);
the_map
.
sewFaces
(
the_map
.
phi1
(
the_map
.
phi1
(
base
)),
side3
);
the_map
.
sewFaces
(
the_map
.
phi_1
(
side2
),
the_map
.
phi1
(
side3
));
the_map
.
sewFaces
(
the_map
.
phi_1
(
side2
),
the_map
.
phi1
(
side3
));
the_map
.
sewFaces
(
the_map
.
phi_1
(
side3
),
the_map
.
phi1
(
side1
));
the_map
.
sewFaces
(
the_map
.
phi_1
(
side3
),
the_map
.
phi1
(
side1
));
Dart
top
=
the_map
.
new
Oriented
Face
(
3
);
Dart
top
=
the_map
.
newFace
(
3
);
the_map
.
sewFaces
(
top
,
the_map
.
phi1
(
the_map
.
phi1
(
side1
)));
the_map
.
sewFaces
(
top
,
the_map
.
phi1
(
the_map
.
phi1
(
side1
)));
the_map
.
sewFaces
(
the_map
.
phi_1
(
top
),
the_map
.
phi1
(
the_map
.
phi1
(
side2
)));
the_map
.
sewFaces
(
the_map
.
phi_1
(
top
),
the_map
.
phi1
(
the_map
.
phi1
(
side2
)));
the_map
.
sewFaces
(
the_map
.
phi1
(
top
),
the_map
.
phi1
(
the_map
.
phi1
(
side3
)));
the_map
.
sewFaces
(
the_map
.
phi1
(
top
),
the_map
.
phi1
(
the_map
.
phi1
(
side3
)));
...
@@ -270,17 +270,17 @@ Dart Polyhedron<PFP>::createOrientedPrism(typename PFP::MAP& the_map)
...
@@ -270,17 +270,17 @@ Dart Polyhedron<PFP>::createOrientedPrism(typename PFP::MAP& the_map)
}
}
template
<
typename
PFP
>
template
<
typename
PFP
>
Dart
Polyhedron
<
PFP
>::
create
Oriented
Polyhedron
(
typename
PFP
::
MAP
&
the_map
,
int
n
)
Dart
Polyhedron
<
PFP
>::
createPolyhedron
(
typename
PFP
::
MAP
&
the_map
,
int
n
)
{
{
Dart
d
;
Dart
d
;
switch
(
n
)
switch
(
n
)
{
{
case
4
:
d
=
create
Oriented
Tetra
(
the_map
);
case
4
:
d
=
createTetra
(
the_map
);
break
;
break
;
case
5
:
d
=
create
Oriented
Pyra
(
the_map
);
case
5
:
d
=
createPyra
(
the_map
);
break
;
break
;
case
6
:
d
=
create
Oriented
Hexa
(
the_map
);
case
6
:
d
=
createHexa
(
the_map
);
break
;
break
;
}
}
...
...
include/Algo/Modelisation/primitives3d.h
View file @
9d09fe01
...
@@ -105,7 +105,7 @@ protected:
...
@@ -105,7 +105,7 @@ protected:
*/
*/
Dart
HexaGrid2Topo
(
int
nx
,
int
ny
);
Dart
HexaGrid2Topo
(
int
nx
,
int
ny
);
Dart
create
Oriented
Hexa
();
Dart
createHexa
();
public:
public:
...
...
include/Algo/Modelisation/primitives3d.hpp
View file @
9d09fe01
...
@@ -33,7 +33,7 @@ namespace Modelisation
...
@@ -33,7 +33,7 @@ namespace Modelisation
//TEMPORAIRE
//TEMPORAIRE
template
<
typename
PFP
>
template
<
typename
PFP
>
Dart
Primitive3D
<
PFP
>::
create
Oriented
Hexa
()
Dart
Primitive3D
<
PFP
>::
createHexa
()
{
{
Dart
base
=
m_map
.
newFace
(
4
);
Dart
base
=
m_map
.
newFace
(
4
);
...
@@ -67,13 +67,13 @@ template <typename PFP>
...
@@ -67,13 +67,13 @@ template <typename PFP>
Dart
Primitive3D
<
PFP
>::
HexaGrid1Topo
(
int
nx
)
Dart
Primitive3D
<
PFP
>::
HexaGrid1Topo
(
int
nx
)
{
{
// first cube
// first cube
Dart
d0
=
create
Oriented
Hexa
();
Dart
d0
=
createHexa
();
m_tableVertDarts
.
push_back
(
d0
);
m_tableVertDarts
.
push_back
(
d0
);
Dart
d1
=
m_map
.
template
phi
<
2112
>(
d0
);
Dart
d1
=
m_map
.
template
phi
<
2112
>(
d0
);
for
(
int
i
=
1
;
i
<
nx
;
++
i
)
for
(
int
i
=
1
;
i
<
nx
;
++
i
)
{
{
Dart
d2
=
create
Oriented
Hexa
();
Dart
d2
=
createHexa
();
m_tableVertDarts
.
push_back
(
d2
);
m_tableVertDarts
.
push_back
(
d2
);
m_map
.
sewVolumes
(
d1
,
d2
);
m_map
.
sewVolumes
(
d1
,
d2
);
d1
=
m_map
.
template
phi
<
2112
>(
d2
);
d1
=
m_map
.
template
phi
<
2112
>(
d2
);
...
...
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