ENH: improved handling of 'unresolved' surface intersections (issue #450)

- the heuristic for matching unresolved intersections is a relatively
  simple matching scheme that seems to be more robust than attempting to walk
  the geometry or the cuts.

- avoid false positives for self intersection
This commit is contained in:
Mark Olesen
2017-05-08 14:57:47 +02:00
parent da8ea0f21a
commit 0e7630feca
12 changed files with 384 additions and 297 deletions

View File

@ -34,7 +34,7 @@ Description
#include "triSurface.H"
#include "triSurfaceMesh.H"
#include "surfaceIntersection.H"
#include "OFstream.H"
#include "OBJstream.H"
using namespace Foam;
@ -172,7 +172,7 @@ int main(int argc, char *argv[])
{
Info<< "surf1-cuts: " << cuts.surf1EdgeCuts() << nl
<< "surf2-cuts: " << cuts.surf2EdgeCuts() << nl
<< "face-pairs: " << cuts.facePairToEdge() << nl
<< "face-pairs: " << cuts.facePairToEdgeId() << nl
<< "edges: " << cuts.cutEdges() << nl;
}
@ -198,7 +198,7 @@ int main(int argc, char *argv[])
{
Info<< "surf1-cuts: " << cuts.surf1EdgeCuts() << nl
<< "surf2-cuts: " << cuts.surf2EdgeCuts() << nl
<< "face-pairs: " << cuts.facePairToEdge() << nl
<< "face-pairs: " << cuts.facePairToEdgeId() << nl
<< "edges: " << cuts.cutEdges() << nl;
}
}
@ -209,20 +209,7 @@ int main(int argc, char *argv[])
if (points.size() || edges.size())
{
Info<<"write to " << outputFile << nl;
OFstream os(outputFile);
forAll(points, pointi)
{
const point& pt = points[pointi];
os << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << nl;
}
forAll(edges, edgei)
{
const edge& e = edges[edgei];
os << "l " << e.start()+1 << ' ' << e.end()+1 << nl;
}
OBJstream(outputFile).write(edges, points);
}
Info<< "End\n" << endl;