mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://noisy/home/noisy2/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -230,8 +230,8 @@ void write
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append("surface");
|
argList::validArgs.append("input file");
|
||||||
argList::validArgs.append("output name");
|
argList::validArgs.append("output file");
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
|
|||||||
@ -103,11 +103,7 @@ bool Foam::setEnv
|
|||||||
const bool overwrite
|
const bool overwrite
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
# ifdef linux
|
|
||||||
return setenv(envName.c_str(), value.c_str(), overwrite) == 0;
|
return setenv(envName.c_str(), value.c_str(), overwrite) == 0;
|
||||||
# else
|
|
||||||
return putenv((char*)(envName + '=' + value.c_str()).c_str()) == 0;
|
|
||||||
# endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -438,6 +438,7 @@ bool triSurface::readSTLASCII(const fileName& STLfileName)
|
|||||||
|
|
||||||
STLlabels.clear();
|
STLlabels.clear();
|
||||||
|
|
||||||
|
// Stitch all points within SMALL meters.
|
||||||
stitchTriangles(rawPoints);
|
stitchTriangles(rawPoints);
|
||||||
|
|
||||||
// Convert solidNames into regionNames
|
// Convert solidNames into regionNames
|
||||||
|
|||||||
@ -42,17 +42,16 @@ bool triSurface::stitchTriangles
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Merge points
|
// Merge points
|
||||||
labelList pointMap(rawPoints.size());
|
labelList pointMap;
|
||||||
|
pointField newPoints;
|
||||||
pointField newPoints(rawPoints.size());
|
|
||||||
|
|
||||||
bool hasMerged = mergePoints(rawPoints, tol, verbose, pointMap, newPoints);
|
bool hasMerged = mergePoints(rawPoints, tol, verbose, pointMap, newPoints);
|
||||||
|
|
||||||
if (hasMerged)
|
if (hasMerged)
|
||||||
{
|
{
|
||||||
if (verbose)
|
if (verbose)
|
||||||
{
|
{
|
||||||
Pout<< "stitchTriangles : Renumbering all triangles" << endl;
|
Pout<< "stitchTriangles : Merged from " << rawPoints.size()
|
||||||
|
<< " points down to " << newPoints.size() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
pointField& ps = const_cast<pointField&>(points());
|
pointField& ps = const_cast<pointField&>(points());
|
||||||
@ -73,6 +72,7 @@ bool triSurface::stitchTriangles
|
|||||||
operator[](newTriangleI)[0] = newA;
|
operator[](newTriangleI)[0] = newA;
|
||||||
operator[](newTriangleI)[1] = newB;
|
operator[](newTriangleI)[1] = newB;
|
||||||
operator[](newTriangleI)[2] = newC;
|
operator[](newTriangleI)[2] = newC;
|
||||||
|
operator[](newTriangleI).region() = operator[](i).region();
|
||||||
newTriangleI++;
|
newTriangleI++;
|
||||||
}
|
}
|
||||||
else if (verbose)
|
else if (verbose)
|
||||||
|
|||||||
@ -651,7 +651,7 @@ surfacePatchList triSurface::calcPatches(labelList& faceMap) const
|
|||||||
{
|
{
|
||||||
sortedRegion[faceI] = operator[](faceI).region();
|
sortedRegion[faceI] = operator[](faceI).region();
|
||||||
}
|
}
|
||||||
sortedRegion.sort();
|
sortedRegion.stableSort();
|
||||||
|
|
||||||
faceMap = sortedRegion.indices();
|
faceMap = sortedRegion.indices();
|
||||||
|
|
||||||
@ -1214,7 +1214,11 @@ void triSurface::writeStats(Ostream& os) const
|
|||||||
{
|
{
|
||||||
// Calculate bounding box without any additional addressing
|
// Calculate bounding box without any additional addressing
|
||||||
// Copy of treeBoundBox code. Cannot use meshTools from triSurface...
|
// Copy of treeBoundBox code. Cannot use meshTools from triSurface...
|
||||||
boundBox bb;
|
boundBox bb
|
||||||
|
(
|
||||||
|
point(VGREAT, VGREAT, VGREAT),
|
||||||
|
point(-VGREAT, -VGREAT, -VGREAT)
|
||||||
|
);
|
||||||
forAll(*this, triI)
|
forAll(*this, triI)
|
||||||
{
|
{
|
||||||
const labelledTri& f = operator[](triI);
|
const labelledTri& f = operator[](triI);
|
||||||
|
|||||||
Reference in New Issue
Block a user