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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
KennethVanhoey
CGoGN
Commits
97325e21
Commit
97325e21
authored
Jan 14, 2013
by
untereiner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correction import volumetric meshes
parent
f463bd36
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
54 additions
and
24 deletions
+54
-24
Apps/Examples/volumeExplorer.cpp
Apps/Examples/volumeExplorer.cpp
+21
-0
Apps/Tuto/tuto_dual2.cpp
Apps/Tuto/tuto_dual2.cpp
+16
-11
include/Algo/Import/importChoupi.hpp
include/Algo/Import/importChoupi.hpp
+0
-2
include/Algo/Import/importNodeEle.hpp
include/Algo/Import/importNodeEle.hpp
+11
-3
include/Algo/Import/importObjEle.hpp
include/Algo/Import/importObjEle.hpp
+1
-1
include/Algo/Import/importTet.hpp
include/Algo/Import/importTet.hpp
+1
-1
include/Algo/Import/importTs.hpp
include/Algo/Import/importTs.hpp
+3
-4
src/Topology/map/map2.cpp
src/Topology/map/map2.cpp
+1
-2
No files found.
Apps/Examples/volumeExplorer.cpp
View file @
97325e21
...
...
@@ -166,6 +166,17 @@ void MyQT::cb_Open()
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
attrNames
[
0
])
;
}
if
(
extension
==
std
::
string
(
".ts"
))
{
if
(
!
Algo
::
Volume
::
Import
::
importMeshV
<
PFP
>
(
myMap
,
filename
,
attrNames
,
Algo
::
Volume
::
Import
::
TS
))
{
std
::
cerr
<<
"could not import "
<<
filename
<<
std
::
endl
;
return
;
}
else
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
attrNames
[
0
])
;
}
if
(
extension
==
std
::
string
(
".off"
))
{
...
...
@@ -408,6 +419,16 @@ int main(int argc, char **argv)
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
attrNames
[
0
])
;
}
if
(
extension
==
std
::
string
(
".ts"
))
{
if
(
!
Algo
::
Volume
::
Import
::
importMeshV
<
PFP
>
(
myMap
,
filename
,
attrNames
,
Algo
::
Volume
::
Import
::
TS
))
{
std
::
cerr
<<
"could not import "
<<
filename
<<
std
::
endl
;
return
1
;
}
else
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
attrNames
[
0
])
;
}
if
(
extension
==
std
::
string
(
".off"
))
{
...
...
Apps/Tuto/tuto_dual2.cpp
View file @
97325e21
...
...
@@ -66,24 +66,29 @@ int main(int argc, char **argv)
// get a handler to the 3D vector attribute created by the import
VertexAttribute
<
PFP
::
VEC3
>
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
attrNames
[
0
]);
FaceAttribute
<
PFP
::
VEC3
>
positionF
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
FACE
>
(
"position"
)
;
if
(
!
positionF
.
isValid
())
positionF
=
myMap
.
addAttribute
<
PFP
::
VEC3
,
FACE
>
(
"position"
)
;
Algo
::
Surface
::
Geometry
::
computeCentroidFaces
<
PFP
>
(
myMap
,
position
,
positionF
)
;
//
// Dual
//
myMap
.
computeDual
();
// FaceAttribute<PFP::VEC3> positionF = myMap.getAttribute<PFP::VEC3, FACE>("position") ;
// if(!positionF.isValid())
// positionF = myMap.addAttribute<PFP::VEC3, FACE>("position") ;
//
// Algo::Surface::Geometry::computeCentroidFaces<PFP>(myMap, position, positionF) ;
// myMap.computeDual();
// position = positionF ;
EdgeAttribute
<
PFP
::
VEC3
>
positionE
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
Edge
>
(
"position"
)
;
if
(
!
positionE
.
isValid
())
positionE
=
myMap
.
addAttribute
<
PFP
::
VEC3
,
EDGE
>
(
"position"
)
;
Algo
::
Surface
::
Geometry
::
computeCentroidEdges
<
PFP
>
(
myMap
,
position
,
positionF
)
;
myMap
.
computeDual
();
position
=
positionF
;
myMap
.
check
();
//turn_to<VertexAttribute<PFP::VEC3>, FaceAttribute<PFP::VEC3> >(&positionF);
//turn_to<FaceAttribute<PFP::VEC3>, VertexAttribute<PFP::VEC3> >(position);
//const std::type_info &t1 = typeid(&positionF);
//std::cout << "type name : " << t1.name() << std::endl;
Algo
::
Surface
::
Export
::
exportOFF
<
PFP
>
(
myMap
,
position
,
"result.off"
);
std
::
cout
<<
"Exported"
<<
std
::
endl
;
...
...
include/Algo/Import/importChoupi.hpp
View file @
97325e21
...
...
@@ -38,8 +38,6 @@ namespace Import
template
<
typename
PFP
>
bool
importChoupi
(
const
std
::
string
&
filename
,
std
::
vector
<
typename
PFP
::
VEC3
>&
tabV
,
std
::
vector
<
unsigned
int
>&
tabE
)
{
std
::
cout
<<
"immport choupiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii"
<<
std
::
endl
;
typedef
typename
PFP
::
VEC3
VEC3
;
//open file
...
...
include/Algo/Import/importNodeEle.hpp
View file @
97325e21
...
...
@@ -149,17 +149,25 @@ bool importNodeWithELERegions(typename PFP::MAP& map, const std::string& filenam
std
::
stringstream
oss
(
line
);
oss
>>
nbe
;
Dart
d
=
Surface
::
Modelisation
::
createTetrahedron
<
PFP
>
(
map
);
Dart
d
=
Surface
::
Modelisation
::
createTetrahedron
<
PFP
>
(
map
,
false
);
Geom
::
Vec4ui
pt
;
oss
>>
pt
[
0
];
--
(
pt
[
0
]);
// oss >> pt[0];
// --(pt[0]);
// oss >> pt[1];
// --(pt[1]);
// oss >> pt[2];
// --(pt[2]);
// oss >> pt[3];
// --(pt[3]);
oss
>>
pt
[
1
];
--
(
pt
[
1
]);
oss
>>
pt
[
2
];
--
(
pt
[
2
]);
oss
>>
pt
[
3
];
--
(
pt
[
3
]);
oss
>>
pt
[
0
];
--
(
pt
[
0
]);
//regions ?
//oss >> nbe;
...
...
include/Algo/Import/importObjEle.hpp
View file @
97325e21
...
...
@@ -148,7 +148,7 @@ bool importOFFWithELERegions(typename PFP::MAP& map, const std::string& filename
std
::
stringstream
oss
(
line
);
oss
>>
nbe
;
Dart
d
=
Surface
::
Modelisation
::
createTetrahedron
<
PFP
>
(
map
);
Dart
d
=
Surface
::
Modelisation
::
createTetrahedron
<
PFP
>
(
map
,
false
);
Geom
::
Vec4ui
pt
;
oss
>>
pt
[
0
];
...
...
include/Algo/Import/importTet.hpp
View file @
97325e21
...
...
@@ -116,7 +116,7 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector<
std
::
stringstream
oss
(
ligne
);
oss
>>
nbe
;
//number of vertices = 4 or used for region mark
Dart
d
=
Surface
::
Modelisation
::
createTetrahedron
<
PFP
>
(
map
);
Dart
d
=
Surface
::
Modelisation
::
createTetrahedron
<
PFP
>
(
map
,
false
);
Geom
::
Vec4ui
pt
;
oss
>>
pt
[
0
];
...
...
include/Algo/Import/importTs.hpp
View file @
97325e21
...
...
@@ -120,10 +120,8 @@ bool importTs(typename PFP::MAP& map, const std::string& filename, std::vector<s
}
while
(
ligne
.
size
()
==
0
);
std
::
stringstream
oss
(
ligne
);
oss
>>
nbe
;
//number of vertices = 4
assert
(
nbe
==
4
);
Dart
d
=
Surface
::
Modelisation
::
createTetrahedron
<
PFP
>
(
map
);
Dart
d
=
Surface
::
Modelisation
::
createTetrahedron
<
PFP
>
(
map
,
false
);
Geom
::
Vec4ui
pt
;
oss
>>
pt
[
0
];
...
...
@@ -170,6 +168,8 @@ bool importTs(typename PFP::MAP& map, const std::string& filename, std::vector<s
//end of tetra
}
fp
.
close
();
//Association des phi3
unsigned
int
nbBoundaryFaces
=
0
;
for
(
Dart
d
=
map
.
begin
();
d
!=
map
.
end
();
map
.
next
(
d
))
...
...
@@ -210,7 +210,6 @@ bool importTs(typename PFP::MAP& map, const std::string& filename, std::vector<s
CGoGNout
<<
"Map closed ("
<<
nbBoundaryFaces
<<
" boundary faces)"
<<
CGoGNendl
;
}
fp
.
close
();
return
true
;
}
...
...
src/Topology/map/map2.cpp
View file @
97325e21
...
...
@@ -955,14 +955,13 @@ void Map2::computeDual()
//TODO triangulation of the boundary face to compute correctly the dual(dual(T)) of mesh T
void
Map2
::
computeDualBorderConstraint
()
{
//unmarkBoundary
std
::
vector
<
Dart
>
oldb
;
for
(
Dart
d
=
begin
();
d
!=
end
();
next
(
d
))
{
if
(
isBoundaryMarked2
(
d
))
{
oldb
.
push_back
(
d
);
boundaryUnmarkOrbit
<
FACE
,
2
>
(
d
);
fillHole
(
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