Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
6c04062d
Commit
6c04062d
authored
Dec 18, 2012
by
mattijs
Browse files
STYLE: surfaceClean: unused routine
parent
662e499c
Changes
1
Hide whitespace changes
Inline
Side-by-side
applications/utilities/surface/surfaceClean/collapseBase.C
View file @
6c04062d
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011
-2012
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -36,55 +36,55 @@ using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Dump collapse region to .obj file
static
void
writeRegionOBJ
(
const
triSurface
&
surf
,
const
label
regionI
,
const
labelList
&
collapseRegion
,
const
labelList
&
outsideVerts
)
{
fileName
dir
(
"regions"
);
mkDir
(
dir
);
fileName
regionName
(
dir
/
"region_"
+
name
(
regionI
)
+
".obj"
);
Pout
<<
"Dumping region "
<<
regionI
<<
" to file "
<<
regionName
<<
endl
;
boolList
include
(
surf
.
size
(),
false
);
forAll
(
collapseRegion
,
faceI
)
{
if
(
collapseRegion
[
faceI
]
==
regionI
)
{
include
[
faceI
]
=
true
;
}
}
labelList
pointMap
,
faceMap
;
triSurface
regionSurf
(
surf
.
subsetMesh
(
include
,
pointMap
,
faceMap
));
Pout
<<
"Region "
<<
regionI
<<
" surface:"
<<
nl
;
regionSurf
.
writeStats
(
Pout
);
regionSurf
.
write
(
regionName
);
// Dump corresponding outside vertices.
fileName
pointsName
(
dir
/
"regionPoints_"
+
name
(
regionI
)
+
".obj"
);
Pout
<<
"Dumping region "
<<
regionI
<<
" points to file "
<<
pointsName
<<
endl
;
OFstream
str
(
pointsName
);
forAll
(
outsideVerts
,
i
)
{
meshTools
::
writeOBJ
(
str
,
surf
.
localPoints
()[
outsideVerts
[
i
]]);
}
}
//
// Dump collapse region to .obj file
//
static void writeRegionOBJ
//
(
//
const triSurface& surf,
//
const label regionI,
//
const labelList& collapseRegion,
//
const labelList& outsideVerts
//
)
//
{
//
fileName dir("regions");
//
//
mkDir(dir);
//
fileName regionName(dir / "region_" + name(regionI) + ".obj");
//
//
Pout<< "Dumping region " << regionI << " to file " << regionName << endl;
//
//
boolList include(surf.size(), false);
//
//
forAll(collapseRegion, faceI)
//
{
//
if (collapseRegion[faceI] == regionI)
//
{
//
include[faceI] = true;
//
}
//
}
//
//
labelList pointMap, faceMap;
//
//
triSurface regionSurf(surf.subsetMesh(include, pointMap, faceMap));
//
//
Pout<< "Region " << regionI << " surface:" << nl;
//
regionSurf.writeStats(Pout);
//
//
regionSurf.write(regionName);
//
//
//
// Dump corresponding outside vertices.
//
fileName pointsName(dir / "regionPoints_" + name(regionI) + ".obj");
//
//
Pout<< "Dumping region " << regionI << " points to file " << pointsName
//
<< endl;
//
//
OFstream str(pointsName);
//
//
forAll(outsideVerts, i)
//
{
//
meshTools::writeOBJ(str, surf.localPoints()[outsideVerts[i]]);
//
}
//
}
// Split triangle into multiple triangles because edge e being split
...
...
Write
Preview
Supports
Markdown
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