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:
@ -103,11 +103,7 @@ bool Foam::setEnv
|
||||
const bool overwrite
|
||||
)
|
||||
{
|
||||
# ifdef linux
|
||||
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();
|
||||
|
||||
// Stitch all points within SMALL meters.
|
||||
stitchTriangles(rawPoints);
|
||||
|
||||
// Convert solidNames into regionNames
|
||||
|
||||
@ -42,17 +42,16 @@ bool triSurface::stitchTriangles
|
||||
)
|
||||
{
|
||||
// Merge points
|
||||
labelList pointMap(rawPoints.size());
|
||||
|
||||
pointField newPoints(rawPoints.size());
|
||||
|
||||
labelList pointMap;
|
||||
pointField newPoints;
|
||||
bool hasMerged = mergePoints(rawPoints, tol, verbose, pointMap, newPoints);
|
||||
|
||||
if (hasMerged)
|
||||
{
|
||||
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());
|
||||
@ -73,6 +72,7 @@ bool triSurface::stitchTriangles
|
||||
operator[](newTriangleI)[0] = newA;
|
||||
operator[](newTriangleI)[1] = newB;
|
||||
operator[](newTriangleI)[2] = newC;
|
||||
operator[](newTriangleI).region() = operator[](i).region();
|
||||
newTriangleI++;
|
||||
}
|
||||
else if (verbose)
|
||||
|
||||
@ -651,7 +651,7 @@ surfacePatchList triSurface::calcPatches(labelList& faceMap) const
|
||||
{
|
||||
sortedRegion[faceI] = operator[](faceI).region();
|
||||
}
|
||||
sortedRegion.sort();
|
||||
sortedRegion.stableSort();
|
||||
|
||||
faceMap = sortedRegion.indices();
|
||||
|
||||
@ -1214,7 +1214,11 @@ void triSurface::writeStats(Ostream& os) const
|
||||
{
|
||||
// Calculate bounding box without any additional addressing
|
||||
// Copy of treeBoundBox code. Cannot use meshTools from triSurface...
|
||||
boundBox bb;
|
||||
boundBox bb
|
||||
(
|
||||
point(VGREAT, VGREAT, VGREAT),
|
||||
point(-VGREAT, -VGREAT, -VGREAT)
|
||||
);
|
||||
forAll(*this, triI)
|
||||
{
|
||||
const labelledTri& f = operator[](triI);
|
||||
|
||||
Reference in New Issue
Block a user