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
Etienne Schmitt
CGoGN
Commits
751b9077
Commit
751b9077
authored
Jul 09, 2014
by
Lionel Untereiner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
import mesh for mixed hex/tet meshes
parent
08553e53
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
959 additions
and
839 deletions
+959
-839
Apps/Examples/volumeExplorer.cpp
Apps/Examples/volumeExplorer.cpp
+4
-4
include/Algo/Import/import.hpp
include/Algo/Import/import.hpp
+895
-805
include/Algo/Import/import2tablesVolume.hpp
include/Algo/Import/import2tablesVolume.hpp
+60
-30
No files found.
Apps/Examples/volumeExplorer.cpp
View file @
751b9077
...
...
@@ -177,8 +177,8 @@ void MyQT::cb_Open()
// if (v>maxV)
// maxV=v;
if
(
myMap
.
isVolumeIncidentToBoundary
(
d
))
color
[
d
]
=
PFP
::
VEC3
(
0
,
0
,
0
);
//
if(myMap.isVolumeIncidentToBoundary(d))
//
color[d] = PFP::VEC3(0,0,0);
}
// for (unsigned int i = color.begin(); i != color.end(); color.next(i))
// {
...
...
@@ -422,8 +422,8 @@ int main(int argc, char **argv)
// if (v>maxV)
// maxV=v;
if
(
myMap
.
isVolumeIncidentToBoundary
(
d
))
color
[
d
]
=
PFP
::
VEC3
(
0
,
0
,
0
);
if
(
myMap
.
isVolumeIncidentToBoundary
(
d
))
color
[
d
]
=
PFP
::
VEC3
(
1
,
0.41
,
0.706
);
//else
// color[d] = PFP::VEC3(1.0,0,0);
}
...
...
include/Algo/Import/import.hpp
View file @
751b9077
This diff is collapsed.
Click to expand it.
include/Algo/Import/import2tablesVolume.hpp
View file @
751b9077
...
...
@@ -190,6 +190,8 @@ bool MeshTablesVolume<PFP>::importTet(const std::string& filename, std::vector<s
m_nbFaces.reserve(m_nbVolumes*4);
m_emb.reserve(m_nbVolumes*12);
unsigned int nbc = 0;
for (unsigned int i = 0; i < m_nbVolumes ; ++i)
{
do
...
...
@@ -201,8 +203,35 @@ bool MeshTablesVolume<PFP>::importTet(const std::string& filename, std::vector<s
int n;
oss >> n; // type of volumes
if(!oss.good())
{
oss.clear();
char dummy;
oss >> dummy; // type of volumes
oss >> dummy;
if(dummy == 'C')// connector
{
++nbc;
m_nbFaces.push_back(3);
int s0,s1,s2,s3;
oss >> s0;
oss >> s1;
oss >> s2;
oss >> s3;
//std::cout << "connector " << s0 << " " << s1 << " " << s2 << " " << s3 << std::endl;
m_emb.push_back(verticesID[s0]);
m_emb.push_back(verticesID[s1]);
m_emb.push_back(verticesID[s2]);
m_emb.push_back(verticesID[s3]);
}
}
//tetrahedron
if(n == 4)
else
if(n == 4)
{
m_nbFaces.push_back(4);
...
...
@@ -218,7 +247,7 @@ bool MeshTablesVolume<PFP>::importTet(const std::string& filename, std::vector<s
typename PFP::VEC3 B = position[verticesID[s2]];
typename PFP::VEC3 C = position[verticesID[s3]];
if (Geom::testOrientation3D<typename PFP::VEC3>(P,A,B,C) == Geom::UND
ER)
if (Geom::testOrientation3D<typename PFP::VEC3>(P,A,B,C) == Geom::OV
ER)
{
int ui = s1;
s1 = s2;
...
...
@@ -334,33 +363,33 @@ bool MeshTablesVolume<PFP>::importTet(const std::string& filename, std::vector<s
oss >> s6;
oss >> s7;
typename PFP::VEC3 P = position[verticesID[s4]];
typename PFP::VEC3 A = position[verticesID[s0]];
typename PFP::VEC3 B = position[verticesID[s1]];
typename PFP::VEC3 C = position[verticesID[s2]];
// 1 hexa ok avec cette partie
if (Geom::testOrientation3D<typename PFP::VEC3>(P,A,B,C) == Geom::UND
ER)
{
unsigned int pt[8];
pt[0] = s0;
pt[1] = s1;
pt[2] = s3;
pt[3] = s2;
pt[4] = s4;
pt[5] = s5;
pt[6] = s7;
pt[7] = s6;
s0 = pt[0];
s1 = pt[1];
s2 = pt[2];
s3 = pt[3];
s4 = pt[4];
s5 = pt[5];
s6 = pt[6];
s7 = pt[7];
}
typename PFP::VEC3 P = position[verticesID[s4]];
typename PFP::VEC3 A = position[verticesID[s0]];
typename PFP::VEC3 B = position[verticesID[s1]];
typename PFP::VEC3 C = position[verticesID[s2]];
// 1 hexa ok avec cette partie
if (Geom::testOrientation3D<typename PFP::VEC3>(P,A,B,C) == Geom::OV
ER)
{
unsigned int pt[8];
pt[0] = s0;
pt[1] = s1;
pt[2] = s3;
pt[3] = s2;
pt[4] = s4;
pt[5] = s5;
pt[6] = s7;
pt[7] = s6;
s0 = pt[0];
s1 = pt[1];
s2 = pt[2];
s3 = pt[3];
s4 = pt[4];
s5 = pt[5];
s6 = pt[6];
s7 = pt[7];
}
m_emb.push_back(verticesID[s0]);
m_emb.push_back(verticesID[s1]);
...
...
@@ -371,9 +400,10 @@ bool MeshTablesVolume<PFP>::importTet(const std::string& filename, std::vector<s
m_emb.push_back(verticesID[s6]);
m_emb.push_back(verticesID[s7]);
}
}
std::cout << "#connectors = " << nbc << std::endl;
fp.close();
return true;
}
...
...
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