1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27 \*---------------------------------------------------------------------------*/
29 #include "surfaceIntersection.H"
30 #include "triSurfaceSearch.H"
31 #include "labelPairLookup.H"
34 #include "triSurface.H"
35 #include "pointIndexHit.H"
36 #include "octreeDataTriSurface.H"
38 #include "mergePoints.H"
40 #include "edgeIntersections.H"
42 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
44 defineTypeNameAndDebug(Foam::surfaceIntersection, 0);
47 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
49 // Checks if there exists a special topological situation that causes
50 // edge and the face it hit not to be recognized.
52 // For now if the face shares a point with the edge
53 bool Foam::surfaceIntersection::excludeEdgeHit
55 const triSurface& surf,
61 const labelledTri& f = surf.localFaces()[faceI];
63 const edge& e = surf.edges()[edgeI];
69 || (f[1] == e.start())
71 || (f[2] == e.start())
78 // vector eVec = e.vec(surf.localPoints());
79 // eVec /= mag(eVec) + VSMALL;
81 // const labelList& eLabels = surf.faceEdges()[faceI];
83 // // Get edge vector of 0th edge of face
84 // vector e0Vec = surf.edges()[eLabels[0]].vec(surf.localPoints());
85 // e0Vec /= mag(e0Vec) + VSMALL;
87 // vector n = e0Vec ^ eVec;
89 // if (mag(n) < SMALL)
91 // // e0 is aligned with e. Choose next edge of face.
92 // vector e1Vec = surf.edges()[eLabels[1]].vec(surf.localPoints());
93 // e1Vec /= mag(e1Vec) + VSMALL;
97 // if (mag(n) < SMALL)
99 // // Problematic triangle. Two edges aligned with edgeI. Give
105 // // Check if same as faceNormal
106 // if (mag(n & surf.faceNormals()[faceI]) > 1-tol)
109 // Pout<< "edge:" << e << " face:" << faceI
110 // << " e0Vec:" << e0Vec << " n:" << n
111 // << " normalComponent:" << (n & surf.faceNormals()[faceI])
112 // << " tol:" << tol << endl;
128 //// Find intersection of plane with edges of hitFaceI. Returns
130 //// - intersection point
131 //Foam::pointIndexHit Foam::surfaceIntersection::faceEdgeIntersection
133 // const triSurface& surf,
134 // const label hitFaceI,
137 // const point& eStart,
141 // pointIndexHit pInter;
143 // const pointField& points = surf.points();
145 // const labelledTri& f = surf.localFaces()[hitFaceI];
147 // // Plane for intersect test.
148 // plane pl(eStart, n);
152 // label fp1 = (fp + 1) % 3;
154 // const point& start = points[f[fp]];
155 // const point& end = points[f[fp1]];
157 // vector eVec(end - start);
159 // scalar s = pl.normalIntersect(start, eVec);
161 // if (s < 0 || s > 1)
163 // pInter.setPoint(start + s*eVec);
165 // // Check if is correct one: orientation walking
166 // // eStart - eEnd - hitPoint should be opposite n
167 // vector n2(triPointRef(start, end, pInter.hitPoint()).normal());
169 // Pout<< "plane normal:" << n
170 // << " start:" << start << " end:" << end
171 // << " hit at:" << pInter.hitPoint()
172 // << " resulting normal:" << n2 << endl;
178 // // Find corresponding edge between f[fp] f[fp1]
180 // meshTools::findEdge
183 // surf.faceEdges()[hitFaceI],
188 // pInter.setIndex(edgeI);
195 // FatalErrorIn("surfaceIntersection::borderEdgeIntersection")
196 // << "Did not find intersection of plane " << pl
197 // << " with edges of face " << hitFaceI << " verts:" << f
198 // << abort(FatalError);
205 void Foam::surfaceIntersection::storeIntersection
207 const bool isFirstSurf,
208 const labelList& facesA,
210 DynamicList<edge>& allCutEdges,
211 DynamicList<point>& allCutPoints
215 forAll(facesA, facesAI)
217 label faceA = facesA[facesAI];
219 // Combine two faces. Always make sure the face from the first surface
221 FixedList<label, 2> twoFaces;
233 labelPairLookup::const_iterator iter = facePairToVertex_.find(twoFaces);
235 if (iter == facePairToVertex_.end())
237 // New intersection. Store face-face intersection.
238 facePairToVertex_.insert(twoFaces, allCutPoints.size()-1);
242 // Second occurrence of surf1-surf2 intersection.
243 // Or rather the face on surf1 intersects a face on
244 // surface2 twice -> we found edge.
246 // Check whether perhaps degenerate
247 const point& prevHit = allCutPoints[*iter];
249 const point& thisHit = allCutPoints[allCutPoints.size()-1];
251 if (mag(prevHit - thisHit) < SMALL)
255 "Foam::surfaceIntersection::storeIntersection"
256 "(const bool isFirstSurf, const labelList& facesA,"
257 "const label faceB, DynamicList<edge>& allCutEdges,"
258 "DynamicList<point>& allCutPoints)"
259 ) << "Encountered degenerate edge between face "
260 << twoFaces[0] << " on first surface"
261 << " and face " << twoFaces[1] << " on second surface"
263 << "Point on first surface:" << prevHit << endl
264 << "Point on second surface:" << thisHit << endl
269 allCutEdges.append(edge(*iter, allCutPoints.size()-1));
271 // Remember face on surf
272 facePairToEdge_.insert(twoFaces, allCutEdges.size()-1);
279 // Classify cut of edge of surface1 with surface2:
280 // 1- point of edge hits point on surface2
281 // 2- edge pierces point on surface2
282 // 3- point of edge hits edge on surface2
283 // 4- edge pierces edge on surface2
284 // 5- point of edge hits face on surface2
285 // 6- edge pierces face on surface2
287 // Note that handling of 2 and 4 should be the same but with surface1 and
288 // surface2 reversed.
289 void Foam::surfaceIntersection::classifyHit
291 const triSurface& surf1,
292 const scalarField& surf1PointTol,
293 const triSurface& surf2,
294 const bool isFirstSurf,
297 const pointIndexHit& pHit,
299 DynamicList<edge>& allCutEdges,
300 DynamicList<point>& allCutPoints,
301 List<DynamicList<label> >& surfEdgeCuts
304 const edge& e = surf1.edges()[edgeI];
306 const labelList& facesA = surf1.edgeFaces()[edgeI];
308 // Label of face on surface2 edgeI intersected
309 label surf2FaceI = pHit.index();
311 // Classify point on surface2
313 const labelledTri& f2 = surf2.localFaces()[surf2FaceI];
315 const pointField& surf2Pts = surf2.localPoints();
325 ).classify(pHit.hitPoint(), tolDim, nearType, nearLabel);
327 // Classify points on edge of surface1
331 surf1PointTol[e.start()],
332 surf1PointTol[e.end()],
338 if (nearType == triPointRef::POINT)
342 // 1. Point hits point. Do nothing.
345 Pout<< pHit.hitPoint() << " is surf1:"
346 << " end point of edge " << e
347 << " surf2: vertex " << f2[nearLabel]
348 << " coord:" << surf2Pts[f2[nearLabel]] << endl;
353 // 2. Edge hits point. Cut edge with new point.
356 Pout<< pHit.hitPoint() << " is surf1:"
357 << " somewhere on edge " << e
358 << " surf2: vertex " << f2[nearLabel]
359 << " coord:" << surf2Pts[f2[nearLabel]] << endl;
362 allCutPoints.append(pHit.hitPoint());
363 surfEdgeCuts[edgeI].append(allCutPoints.size()-1);
365 const labelList& facesB = surf2.pointFaces()[f2[nearLabel]];
367 forAll(facesB, faceBI)
380 else if (nearType == triPointRef::EDGE)
384 // 3. Point hits edge. Do nothing on this side. Reverse
385 // is handled by 2 (edge hits point)
386 label edge2I = getEdge(surf2, surf2FaceI, nearLabel);
387 const edge& e2 = surf2.edges()[edge2I];
391 Pout<< pHit.hitPoint() << " is surf1:"
392 << " end point of edge " << e
393 << " surf2: edge " << e2
394 << " coords:" << surf2Pts[e2.start()]
395 << surf2Pts[e2.end()] << endl;
400 // 4. Edge hits edge.
402 // Cut edge with new point (creates duplicates when
403 // doing the surf2 with surf1 intersection but these
404 // are merged later on)
406 label edge2I = getEdge(surf2, surf2FaceI, nearLabel);
407 const edge& e2 = surf2.edges()[edge2I];
411 Pout<< pHit.hitPoint() << " is surf1:"
412 << " somewhere on edge " << e
413 << " surf2: edge " << e2
414 << " coords:" << surf2Pts[e2.start()]
415 << surf2Pts[e2.end()] << endl;
418 allCutPoints.append(pHit.hitPoint());
419 surfEdgeCuts[edgeI].append(allCutPoints.size()-1);
421 // edge hits all faces on surf2 connected to the edge
425 // edge-edge intersection is symmetric, store only
427 // edge hits all faces on surf2 connected to the
430 const labelList& facesB = surf2.edgeFaces()[edge2I];
432 forAll(facesB, faceBI)
450 // 5. Point hits face. Do what? Introduce
451 // point & triangulation in face?
454 Pout<< pHit.hitPoint() << " is surf1:"
455 << " end point of edge " << e
456 << " surf2: face " << surf2FaceI
461 // Look exactly at what side (of surf2) edge is. Leave out ones on
462 // inside of surf2 (i.e. on opposite side of normal)
465 // Vertex on/near surf2
470 nearVert = e.start();
477 const point& nearPt = surf1.localPoints()[nearVert];
479 // Vertex away from surf2
480 label otherVert = e.otherVertex(nearVert);
482 const point& otherPt = surf1.localPoints()[otherVert];
488 << pHit.hitPoint() << " is surf1:"
489 << " end point of edge " << e << " coord:"
490 << surf1.localPoints()[nearVert]
491 << " surf2: face " << surf2FaceI << endl;
494 vector eVec = otherPt - nearPt;
496 if ((surf2.faceNormals()[surf2FaceI] & eVec) > 0)
498 // otherVert on outside of surf2
500 // Shift hitPoint a bit along edge.
501 //point hitPt = nearPt + 0.1*eVec;
502 point hitPt = nearPt;
506 Pout<< "Shifted " << pHit.hitPoint()
508 << " along edge:" << e
509 << " coords:" << surf1.localPoints()[e.start()]
510 << surf1.localPoints()[e.end()] << endl;
513 // Reclassify as normal edge-face pierce (see below)
515 allCutPoints.append(hitPt);
516 surfEdgeCuts[edgeI].append(allCutPoints.size()-1);
518 // edge hits single face only
532 Pout<< "Discarding " << pHit.hitPoint()
533 << " since edge " << e << " on inside of surf2."
534 << " surf2 normal:" << surf2.faceNormals()[surf2FaceI]
541 // 6. Edge pierces face. 'Normal' situation.
544 Pout<< pHit.hitPoint() << " is surf1:"
545 << " somewhere on edge " << e
546 << " surf2: face " << surf2FaceI
550 // edgeI intersects surf2. Store point.
551 allCutPoints.append(pHit.hitPoint());
552 surfEdgeCuts[edgeI].append(allCutPoints.size()-1);
554 // edge hits single face only
572 // Cut all edges of surf1 with surf2. Sets
573 // - cutPoints : coordinates of cutPoints
574 // - cutEdges : newly created edges between cutPoints
575 // - facePairToVertex : hash from face1I and face2I to cutPoint
576 // - facePairToEdge : hash from face1I and face2I to cutEdge
577 // - surfEdgeCuts : gives for each edge the cutPoints
578 // (in order from start to end)
580 void Foam::surfaceIntersection::doCutEdges
582 const triSurface& surf1,
583 const triSurfaceSearch& querySurf2,
584 const bool isFirstSurf,
585 const bool isSelfIntersection,
587 DynamicList<edge>& allCutEdges,
588 DynamicList<point>& allCutPoints,
589 List<DynamicList<label> >& surfEdgeCuts
592 scalar oldTol = intersection::setPlanarTol(1E-3);
594 const pointField& surf1Pts = surf1.localPoints();
596 // Calculate local (to point) tolerance based on min edge length.
597 scalarField surf1PointTol(surf1Pts.size());
599 forAll(surf1PointTol, pointI)
601 surf1PointTol[pointI] =
602 intersection::planarTol()
603 * minEdgeLen(surf1, pointI);
606 const triSurface& surf2 = querySurf2.surface();
608 forAll(surf1.edges(), edgeI)
610 const edge& e = surf1.edges()[edgeI];
612 point pStart = surf1Pts[e.start()];
613 const point& pEnd = surf1Pts[e.end()];
615 const point tolVec = intersection::planarTol()*(pEnd-pStart);
616 const scalar tolDim = mag(tolVec);
618 bool doTrack = false;
621 pointIndexHit pHit = querySurf2.tree().findLine(pStart, pEnd);
625 if (isSelfIntersection)
627 // Skip all intersections which are hit at endpoints of
629 // Problem is that if faces are almost coincident the
630 // intersection point will be calculated quite incorrectly
631 // The error might easily be larger than 1% of the edge
633 // So what we do here is to exclude hit faces if our edge
634 // is in their plane and they share a point with the edge.
636 // Label of face on surface2 edgeI intersected
637 label hitFaceI = pHit.index();
646 0.1 // 1-cos of angle between normals
650 // Classify point on surface1
651 label edgeEnd = classify
653 surf1PointTol[e.start()],
654 surf1PointTol[e.end()],
664 Pout<< "edge:" << edgeI << " vertices:" << e
665 << " start:" << surf1Pts[e.start()]
666 << " end:" << surf1Pts[e.end()]
667 << " hit:" << pHit.hitPoint()
668 << " tolDim:" << tolDim
670 << intersection::planarTol()
673 allCutPoints.append(pHit.hitPoint());
674 surfEdgeCuts[edgeI].append(allCutPoints.size()-1);
696 if (mag(pHit.hitPoint() - pEnd) < tolDim)
702 pStart = pHit.hitPoint() + tolVec;
714 intersection::setPlanarTol(oldTol);
718 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
721 Foam::surfaceIntersection::surfaceIntersection()
725 facePairToVertex_(0),
732 // Construct from two surfaces
733 Foam::surfaceIntersection::surfaceIntersection
735 const triSurfaceSearch& query1,
736 const triSurfaceSearch& query2
741 facePairToVertex_(2*max(query1.surface().size(), query2.surface().size())),
742 facePairToEdge_(2*max(query1.surface().size(), query2.surface().size())),
746 const triSurface& surf1 = query1.surface();
747 const triSurface& surf2 = query2.surface();
750 // Cut all edges of surf1 with surf2.
754 Pout<< "Cutting surf1 edges" << endl;
758 DynamicList<edge> allCutEdges(surf1.nEdges()/20);
759 DynamicList<point> allCutPoints(surf1.nPoints()/20);
762 // From edge to cut index on surface1
763 List<DynamicList<label> > edgeCuts1(query1.surface().nEdges());
769 true, // is first surface; construct labelPair in correct
771 false, // not self intersection
777 // Transfer to straight labelListList
778 transfer(edgeCuts1, surf1EdgeCuts_);
782 // Cut all edges of surf2 with surf1.
786 Pout<< "Cutting surf2 edges" << endl;
789 // From edge to cut index
790 List<DynamicList<label> > edgeCuts2(query2.surface().nEdges());
796 false, // is second surface
797 false, // not self intersection
804 // Transfer to straight label(List)List
805 transfer(edgeCuts2, surf2EdgeCuts_);
806 cutEdges_.transfer(allCutEdges);
807 cutPoints_.transfer(allCutPoints);
812 Pout<< "surfaceIntersection : Intersection generated:"
814 << " points:" << cutPoints_.size() << endl
815 << " edges :" << cutEdges_.size() << endl;
817 Pout<< "surfaceIntersection : Writing intersection to intEdges.obj"
820 OFstream intStream("intEdges.obj");
821 writeOBJ(cutPoints_, cutEdges_, intStream);
823 // Dump all cut edges to files
824 Pout<< "Dumping cut edges of surface1 to surf1EdgeCuts.obj" << endl;
825 OFstream edge1Stream("surf1EdgeCuts.obj");
826 writeIntersectedEdges(surf1, surf1EdgeCuts_, edge1Stream);
828 Pout<< "Dumping cut edges of surface2 to surf2EdgeCuts.obj" << endl;
829 OFstream edge2Stream("surf2EdgeCuts.obj");
830 writeIntersectedEdges(surf2, surf2EdgeCuts_, edge2Stream);
835 // Construct from full intersection Poutrmation
836 Foam::surfaceIntersection::surfaceIntersection
838 const triSurface& surf1,
839 const edgeIntersections& intersections1,
840 const triSurface& surf2,
841 const edgeIntersections& intersections2
846 facePairToVertex_(2*max(surf1.size(), surf2.size())),
847 facePairToEdge_(2*max(surf1.size(), surf2.size())),
852 // All intersection Pout (so for both surfaces)
853 DynamicList<edge> allCutEdges((surf1.nEdges() + surf2.nEdges())/20);
854 DynamicList<point> allCutPoints((surf1.nPoints() + surf2.nPoints())/20);
857 // Cut all edges of surf1 with surf2
858 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
862 Pout<< "Storing surf1 intersections" << endl;
866 // From edge to cut index on surface1
867 List<DynamicList<label> > edgeCuts1(surf1.nEdges());
869 forAll(intersections1, edgeI)
871 const List<pointIndexHit>& intersections = intersections1[edgeI];
873 forAll(intersections, i)
875 const pointIndexHit& pHit = intersections[i];
877 // edgeI intersects surf2. Store point.
878 allCutPoints.append(pHit.hitPoint());
879 edgeCuts1[edgeI].append(allCutPoints.size()-1);
883 true, // is first surface
884 surf1.edgeFaces()[edgeI],
885 pHit.index(), // surf2FaceI
892 // Transfer to straight labelListList
893 transfer(edgeCuts1, surf1EdgeCuts_);
898 // Cut all edges of surf2 with surf1
899 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
903 Pout<< "Storing surf2 intersections" << endl;
907 // From edge to cut index on surface2
908 List<DynamicList<label> > edgeCuts2(surf2.nEdges());
910 forAll(intersections2, edgeI)
912 const List<pointIndexHit>& intersections = intersections2[edgeI];
914 forAll(intersections, i)
916 const pointIndexHit& pHit = intersections[i];
918 // edgeI intersects surf1. Store point.
919 allCutPoints.append(pHit.hitPoint());
920 edgeCuts2[edgeI].append(allCutPoints.size()-1);
924 false, // is second surface
925 surf2.edgeFaces()[edgeI],
926 pHit.index(), // surf2FaceI
933 // Transfer to surf2EdgeCuts_ (straight labelListList)
934 transfer(edgeCuts2, surf2EdgeCuts_);
938 // Transfer to straight label(List)List
939 cutEdges_.transfer(allCutEdges);
940 cutPoints_.transfer(allCutPoints);
945 Pout<< "surfaceIntersection : Intersection generated:"
947 << " points:" << cutPoints_.size() << endl
948 << " edges :" << cutEdges_.size() << endl;
950 Pout<< "surfaceIntersection : Writing intersection to intEdges.obj"
953 OFstream intStream("intEdges.obj");
954 writeOBJ(cutPoints_, cutEdges_, intStream);
956 // Dump all cut edges to files
957 Pout<< "Dumping cut edges of surface1 to surf1EdgeCuts.obj" << endl;
958 OFstream edge1Stream("surf1EdgeCuts.obj");
959 writeIntersectedEdges(surf1, surf1EdgeCuts_, edge1Stream);
961 Pout<< "Dumping cut edges of surface2 to surf2EdgeCuts.obj" << endl;
962 OFstream edge2Stream("surf2EdgeCuts.obj");
963 writeIntersectedEdges(surf2, surf2EdgeCuts_, edge2Stream);
969 // Check all facePairToVertex is used.
970 labelHashSet usedPoints;
972 forAllConstIter(labelPairLookup, facePairToEdge_, iter)
974 label edgeI = iter();
976 const edge& e = cutEdges_[edgeI];
978 usedPoints.insert(e[0]);
979 usedPoints.insert(e[1]);
982 forAllConstIter(labelPairLookup, facePairToVertex_, iter)
984 label pointI = iter();
986 if (!usedPoints.found(pointI))
988 FatalErrorIn("surfaceIntersection::surfaceIntersection")
989 << "Problem: cut point:" << pointI
990 << " coord:" << cutPoints_[pointI]
991 << " not used by any edge" << abort(FatalError);
998 // Construct from single surface. Used to test for self-intersection.
999 Foam::surfaceIntersection::surfaceIntersection
1001 const triSurfaceSearch& query1
1006 facePairToVertex_(2*query1.surface().size()),
1007 facePairToEdge_(2*query1.surface().size()),
1011 const triSurface& surf1 = query1.surface();
1014 // Cut all edges of surf1 with surf1 itself.
1018 Pout<< "Cutting surf1 edges" << endl;
1021 DynamicList<edge> allCutEdges;
1022 DynamicList<point> allCutPoints;
1024 // From edge to cut index on surface1
1025 List<DynamicList<label> > edgeCuts1(query1.surface().nEdges());
1031 true, // is first surface; construct labelPair in correct
1033 true, // self intersection
1041 // Transfer to straight label(List)List
1042 transfer(edgeCuts1, surf1EdgeCuts_);
1043 cutEdges_.transfer(allCutEdges);
1044 cutPoints_.transfer(allCutPoints);
1047 if (cutPoints_.empty() && cutEdges_.empty())
1051 Pout<< "Empty intersection" << endl;
1057 // Remove duplicate points (from edge-point or edge-edge cutting)
1060 // Get typical dimension.
1061 scalar minEdgeLen = GREAT;
1062 forAll(surf1.edges(), edgeI)
1067 surf1.edges()[edgeI].mag(surf1.localPoints())
1073 pointField newPoints;
1075 bool hasMerged = mergePoints
1078 minEdgeLen*intersection::planarTol(),
1088 Pout<< "Merged:" << hasMerged
1089 << " mergeDist:" << minEdgeLen*intersection::planarTol()
1090 << " cutPoints:" << cutPoints_.size()
1091 << " newPoints:" << newPoints.size()
1096 cutPoints_.transfer(newPoints);
1098 // Renumber vertices referenced by edges
1099 forAll(cutEdges_, edgeI)
1101 edge& e = cutEdges_[edgeI];
1103 e.start() = pointMap[e.start()];
1104 e.end() = pointMap[e.end()];
1106 if (e.mag(cutPoints_) < minEdgeLen*intersection::planarTol())
1110 Pout<< "Degenerate cut:" << edgeI << " vertices:" << e
1111 << " coords:" << cutPoints_[e.start()] << ' '
1112 << cutPoints_[e.end()] << endl;
1117 // Renumber vertices referenced by edgeCut lists. Remove duplicates.
1118 forAll(surf1EdgeCuts_, edgeI)
1120 // Get indices of cutPoints this edge is cut by
1121 labelList& cutVerts = surf1EdgeCuts_[edgeI];
1123 removeDuplicates(pointMap, cutVerts);
1129 Pout<< "surfaceIntersection : Intersection generated and compressed:"
1131 << " points:" << cutPoints_.size() << endl
1132 << " edges :" << cutEdges_.size() << endl;
1135 Pout<< "surfaceIntersection : Writing intersection to intEdges.obj"
1138 OFstream intStream("intEdges.obj");
1139 writeOBJ(cutPoints_, cutEdges_, intStream);
1144 // Dump all cut edges to files
1145 Pout<< "Dumping cut edges of surface1 to surf1EdgeCuts.obj" << endl;
1146 OFstream edge1Stream("surf1EdgeCuts.obj");
1147 writeIntersectedEdges(surf1, surf1EdgeCuts_, edge1Stream);
1152 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
1154 const Foam::pointField& Foam::surfaceIntersection::cutPoints() const
1160 const Foam::edgeList& Foam::surfaceIntersection::cutEdges() const
1166 const Foam::labelPairLookup& Foam::surfaceIntersection::facePairToEdge() const
1168 return facePairToEdge_;
1172 const Foam::labelListList& Foam::surfaceIntersection::edgeCuts
1174 const bool isFirstSurf
1179 return surf1EdgeCuts_;
1183 return surf2EdgeCuts_;
1188 const Foam::labelListList& Foam::surfaceIntersection::surf1EdgeCuts() const
1190 return surf1EdgeCuts_;
1194 const Foam::labelListList& Foam::surfaceIntersection::surf2EdgeCuts() const
1196 return surf2EdgeCuts_;
1200 // ************************************************************************* //