| 44 | // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // |
| 45 | |
| 46 | void Foam::faceCoupleInfo::writeOBJ |
| 47 | ( |
| 48 | const fileName& fName, |
| 49 | const edgeList& edges, |
| 50 | const pointField& points, |
| 51 | const bool compact |
| 52 | ) |
| 53 | { |
| 54 | OFstream str(fName); |
| 55 | |
| 56 | labelList pointMap(points.size(), -1); |
| 57 | |
| 58 | if (compact) |
| 59 | { |
| 60 | label newPointi = 0; |
| 61 | |
| 62 | forAll(edges, edgeI) |
| 63 | { |
| 64 | const edge& e = edges[edgeI]; |
| 65 | |
| 66 | forAll(e, eI) |
| 67 | { |
| 68 | label pointi = e[eI]; |
| 69 | |
| 70 | if (pointMap[pointi] == -1) |
| 71 | { |
| 72 | pointMap[pointi] = newPointi++; |
| 73 | |
| 74 | meshTools::writeOBJ(str, points[pointi]); |
| 75 | } |
| 76 | } |
| 77 | } |
| 78 | } |
| 79 | else |
| 80 | { |
| 81 | forAll(points, pointi) |
| 82 | { |
| 83 | meshTools::writeOBJ(str, points[pointi]); |
| 84 | } |
| 85 | |
| 86 | pointMap = identity(points.size()); |
| 87 | } |
| 88 | |
| 89 | forAll(edges, edgeI) |
| 90 | { |
| 91 | const edge& e = edges[edgeI]; |
| 92 | |
| 93 | str<< "l " << pointMap[e[0]]+1 << ' ' << pointMap[e[1]]+1 << nl; |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | |
| 98 | void Foam::faceCoupleInfo::writeOBJ |
no test coverage detected