1 // Copyright (c) 2013-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 #include <Prs3d_WFShape.hxx>
16 #include <Bnd_Box.hxx>
17 #include <BRepAdaptor_HSurface.hxx>
18 #include <BRepAdaptor_Curve.hxx>
19 #include <BRepBndLib.hxx>
20 #include <BRep_Tool.hxx>
21 #include <Graphic3d_Group.hxx>
22 #include <Graphic3d_AspectLine3d.hxx>
23 #include <Graphic3d_ArrayOfPolylines.hxx>
24 #include <Graphic3d_ArrayOfPoints.hxx>
26 #include <Poly_Connect.hxx>
27 #include <Poly_Triangulation.hxx>
28 #include <Poly_Array1OfTriangle.hxx>
29 #include <Poly_Polygon3D.hxx>
30 #include <Poly_PolygonOnTriangulation.hxx>
32 #include <Prs3d_Drawer.hxx>
33 #include <Prs3d_IsoAspect.hxx>
34 #include <Prs3d_PointAspect.hxx>
35 #include <Prs3d_NListIteratorOfListOfSequenceOfPnt.hxx>
36 #include <Prs3d_ShapeTool.hxx>
37 #include <Standard_ErrorHandler.hxx>
38 #include <TColgp_Array1OfPnt.hxx>
39 #include <TColgp_SequenceOfPnt.hxx>
40 #include <TopoDS_Edge.hxx>
42 #include <TopTools_HSequenceOfShape.hxx>
43 #include <TopTools_ListOfShape.hxx>
44 #include <TopTools_ListIteratorOfListOfShape.hxx>
49 //! Compare two aspects
50 inline Standard_Boolean IsSame (const Handle(Graphic3d_AspectLine3d)& theUAspect,
51 const Handle(Graphic3d_AspectLine3d)& theVAspect)
53 Quantity_Color aCU, aCV;
54 Aspect_TypeOfLine aTlU, aTlV;
55 Standard_Real aWU, aWV;
56 theUAspect->Values (aCU, aTlU, aWU);
57 theVAspect->Values (aCV, aTlV, aWV);
65 // =========================================================================
66 // function: AddPolygon
68 // =========================================================================
69 Standard_Boolean Prs3d_WFShape::AddPolygon (const TopoDS_Edge& theEdge,
70 TColgp_SequenceOfPnt& thePoints)
72 TopLoc_Location aLocation;
73 Handle(Poly_Polygon3D) aPolygon = BRep_Tool::Polygon3D (theEdge, aLocation);
74 if (!aPolygon.IsNull())
76 const TColgp_Array1OfPnt& aPoints = aPolygon->Nodes();
77 Standard_Integer anIndex = aPoints.Lower();
78 if (aLocation.IsIdentity())
80 for (; anIndex <= aPoints.Upper(); ++anIndex)
82 thePoints.Append (aPoints.Value (anIndex));
87 for (; anIndex <= aPoints.Upper(); ++anIndex)
89 thePoints.Append (aPoints.Value (anIndex).Transformed (aLocation));
95 Handle(Poly_Triangulation) aTriangulation;
96 Handle(Poly_PolygonOnTriangulation) aHIndices;
97 BRep_Tool::PolygonOnTriangulation (theEdge, aHIndices, aTriangulation, aLocation);
98 if (!aHIndices.IsNull())
100 const TColStd_Array1OfInteger& anIndices = aHIndices->Nodes();
101 const TColgp_Array1OfPnt& aNodes = aTriangulation->Nodes();
103 Standard_Integer anIndex = anIndices.Lower();
104 if (aLocation.IsIdentity())
106 for (; anIndex <= anIndices.Upper(); ++anIndex)
108 thePoints.Append (aNodes (anIndices (anIndex)));
113 for (; anIndex <= anIndices.Upper(); ++anIndex)
115 thePoints.Append (aNodes (anIndices (anIndex)).Transformed (aLocation));
118 return Standard_True;
120 return Standard_False;
123 // =========================================================================
126 // =========================================================================
127 void Prs3d_WFShape::Add (const Handle (Prs3d_Presentation)& thePresentation,
128 const TopoDS_Shape& theShape,
129 const Handle (Prs3d_Drawer)& theDrawer)
131 if (theShape.IsNull())
136 Prs3d_ShapeTool aTool (theShape, theDrawer->VertexDrawMode() == Prs3d_VDM_All);
137 TopTools_ListOfShape aLFree, aLUnFree, aLWire;
138 for (aTool.InitCurve(); aTool.MoreCurve(); aTool.NextCurve())
140 const TopoDS_Edge& anEdge = aTool.GetCurve();
141 switch (aTool.Neighbours())
143 case 0: aLWire.Append (anEdge); break;
144 case 1: aLFree.Append (anEdge); break;
145 default: aLUnFree.Append (anEdge); break;
149 Standard_Real aDeflection = Prs3d::GetDeflection(theShape, theDrawer);
151 Prs3d_NListOfSequenceOfPnt anUIsoCurves;
152 Prs3d_NListOfSequenceOfPnt aVIsoCurves;
153 Prs3d_NListOfSequenceOfPnt aWireCurves;
154 Prs3d_NListOfSequenceOfPnt aFreeCurves;
155 Prs3d_NListOfSequenceOfPnt anUnFreeCurves;
157 const Standard_Integer anIsoU = theDrawer->UIsoAspect()->Number();
158 const Standard_Integer anIsoV = theDrawer->VIsoAspect()->Number();
160 Standard_Boolean hasIsoU = anIsoU > 0;
161 Standard_Boolean hasIsoV = anIsoV > 0;
163 if (IsSame (theDrawer->UIsoAspect()->Aspect(),
164 theDrawer->VIsoAspect()->Aspect()))
166 if (hasIsoU || hasIsoV)
168 BRepAdaptor_Surface aSurface;
169 for (aTool.InitFace(); aTool.MoreFace(); aTool.NextFace())
171 if (aTool.HasSurface())
173 if (!aTool.IsPlanarFace() || theDrawer->IsoOnPlane())
175 aSurface.Initialize (aTool.GetFace());
176 Handle(BRepAdaptor_HSurface) aHSurface = new BRepAdaptor_HSurface (aSurface);
180 Prs3d_NListOfSequenceOfPnt aCurUIsoCurves;
181 myFaceAlgo.Add (thePresentation, aHSurface,
187 Prs3d_NListIteratorOfListOfSequenceOfPnt anIt;
188 for (anIt.Init (aCurUIsoCurves); anIt.More(); anIt.Next())
190 anUIsoCurves.Append (anIt.Value());
193 catch (Standard_Failure)
205 BRepAdaptor_Surface aSurface;
206 for (aTool.InitFace(); aTool.MoreFace(); aTool.NextFace())
208 if (aTool.HasSurface())
210 if (!aTool.IsPlanarFace() || theDrawer->IsoOnPlane())
212 aSurface.Initialize (aTool.GetFace());
213 Handle(BRepAdaptor_HSurface) aHSurface = new BRepAdaptor_HSurface (aSurface);
217 Prs3d_NListOfSequenceOfPnt aCurUIsoCurves;
218 myFaceAlgo.Add (thePresentation, aHSurface,
219 hasIsoU, Standard_False,
225 catch (Standard_Failure)
228 const TopoDS_Face& aFace = aSurface.Face();
229 std::cout << "Problem with the face " << (void* ) &(*(aFace).TShape()) << std::endl;
238 BRepAdaptor_Surface aSurface;
239 for (aTool.InitFace(); aTool.MoreFace(); aTool.NextFace())
241 if (aTool.HasSurface())
243 if (!aTool.IsPlanarFace() || theDrawer->IsoOnPlane())
245 aSurface.Initialize (aTool.GetFace());
246 Handle(BRepAdaptor_HSurface) aHSurface = new BRepAdaptor_HSurface (aSurface);
250 Prs3d_NListOfSequenceOfPnt aCurUIsoCurves;
251 myFaceAlgo.Add (thePresentation, aHSurface,
252 Standard_False, hasIsoV,
258 catch (Standard_Failure)
261 const TopoDS_Face& aFace = aSurface.Face();
262 std::cout << "Problem with the face " << (void* ) &(*(aFace).TShape()) << std::endl;
271 Standard_Integer aNbVertices = 0, aNbBounds = 0;
272 if (anUIsoCurves.Size() > 0)
274 aNbBounds = anUIsoCurves.Size();
275 Prs3d_NListIteratorOfListOfSequenceOfPnt anIt;
276 for (anIt.Init (anUIsoCurves); anIt.More(); anIt.Next())
278 aNbVertices += anIt.Value()->Length();
280 Handle(Graphic3d_ArrayOfPolylines) anUIsoArray = new Graphic3d_ArrayOfPolylines (aNbVertices, aNbBounds);
281 for (anIt.Init (anUIsoCurves); anIt.More(); anIt.Next())
283 const Handle(TColgp_HSequenceOfPnt)& aPoints = anIt.Value();
284 anUIsoArray->AddBound (aPoints->Length());
285 for (Standard_Integer anI = 1; anI <= aPoints->Length(); ++anI)
287 anUIsoArray->AddVertex (aPoints->Value (anI));
290 Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup (thePresentation);
291 aGroup->SetPrimitivesAspect (theDrawer->UIsoAspect()->Aspect());
292 aGroup->AddPrimitiveArray (anUIsoArray);
295 // NOTE: THIS BLOCK WILL NEVER EXECUTE AS aVIsoCurves IS NOT FILLED!!
296 if (aVIsoCurves.Size() > 0)
298 aNbBounds = aVIsoCurves.Size();
299 Prs3d_NListIteratorOfListOfSequenceOfPnt anIt;
300 for (anIt.Init (aVIsoCurves); anIt.More(); anIt.Next())
302 aNbVertices += anIt.Value()->Length();
304 Handle(Graphic3d_ArrayOfPolylines) VIsoArray = new Graphic3d_ArrayOfPolylines (aNbVertices, aNbBounds);
305 for (anIt.Init (aVIsoCurves); anIt.More(); anIt.Next())
307 const Handle(TColgp_HSequenceOfPnt)& aPoints = anIt.Value();
308 VIsoArray->AddBound (aPoints->Length());
309 for (int anI = 1; anI <= aPoints->Length(); anI++)
311 VIsoArray->AddVertex (aPoints->Value (anI));
314 Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup (thePresentation);
315 aGroup->SetPrimitivesAspect (theDrawer->VIsoAspect()->Aspect());
316 aGroup->AddPrimitiveArray (VIsoArray);
319 TopLoc_Location aLocation;
320 Standard_Integer anI, aJ, aN[3];
322 TColgp_SequenceOfPnt aSurfPoints;
323 for (aTool.InitFace(); aTool.MoreFace(); aTool.NextFace())
325 if (!aTool.HasSurface())
327 Handle(Poly_Triangulation) T = aTool.CurrentTriangulation (aLocation);
330 const TColgp_Array1OfPnt& aNodes = T->Nodes();
331 // Build the connect tool
332 Poly_Connect aPolyConnect (T);
334 Standard_Integer aNbTriangles = T->NbTriangles();
335 Standard_Integer aT[3];
337 // Count the free edges
338 Standard_Integer aNbFree = 0;
339 for (anI = 1; anI <= aNbTriangles; ++anI)
341 aPolyConnect.Triangles (anI, aT[0], aT[1], aT[2]);
342 for (aJ = 0; aJ < 3; ++aJ)
351 // Allocate the arrays
352 TColStd_Array1OfInteger aFree (1, 2 * aNbFree);
353 Standard_Integer aNbInternal = (3 * aNbTriangles - aNbFree) / 2;
354 TColStd_Array1OfInteger anInternal (0, 2 * aNbInternal);
356 Standard_Integer aFreeIndex = 1, anIntIndex = 1;
357 const Poly_Array1OfTriangle& aTriangles = T->Triangles();
358 for (anI = 1; anI <= aNbTriangles; ++anI)
360 aPolyConnect.Triangles (anI, aT[0], aT[1], aT[2]);
361 aTriangles (anI).Get (aN[0], aN[1], aN[2]);
362 for (aJ = 0; aJ < 3; aJ++)
364 Standard_Integer k = (aJ + 1) % 3;
367 aFree (aFreeIndex) = aN[aJ];
368 aFree (aFreeIndex + 1) = aN[k];
371 // internal edge if this triangle has a lower index than the adjacent
372 else if (anI < aT[aJ])
374 anInternal (anIntIndex) = aN[aJ];
375 anInternal (anIntIndex + 1) = aN[k];
381 if (!aTool.HasSurface())
384 Standard_Integer aFreeHalfNb = aFree.Length() / 2;
385 for (anI = 1; anI <= aFreeHalfNb; ++anI)
387 gp_Pnt aPoint1 = aNodes (aFree (2 * anI - 1)).Transformed (aLocation);
388 gp_Pnt aPoint2 = aNodes (aFree (2 * anI )).Transformed (aLocation);
389 aSurfPoints.Append (aPoint1);
390 aSurfPoints.Append (aPoint2);
396 if (aSurfPoints.Length() > 0)
398 aNbVertices = aSurfPoints.Length();
399 aNbBounds = (Standard_Integer)aNbVertices / 2;
400 Handle(Graphic3d_ArrayOfPolylines) aSurfArray = new Graphic3d_ArrayOfPolylines (aNbVertices, aNbBounds);
401 for (anI = 1; anI <= aNbVertices; anI += 2)
403 aSurfArray->AddBound (2);
404 aSurfArray->AddVertex (aSurfPoints.Value (anI));
405 aSurfArray->AddVertex (aSurfPoints.Value (anI + 1));
407 Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup (thePresentation);
408 aGroup->SetPrimitivesAspect (theDrawer->FreeBoundaryAspect()->Aspect());
409 aGroup->AddPrimitiveArray (aSurfArray);
412 TopTools_ListIteratorOfListOfShape anIt;
413 if (theDrawer->WireDraw())
415 // Wire (without any neighbour)
416 for (anIt.Initialize(aLWire); anIt.More(); anIt.Next())
418 const TopoDS_Edge& anEdge = TopoDS::Edge (anIt.Value());
422 const Handle(TColgp_HSequenceOfPnt)& aPoints = new TColgp_HSequenceOfPnt;
423 if (!AddPolygon (anEdge, aPoints->ChangeSequence()))
425 if (BRep_Tool::IsGeometric (anEdge))
427 BRepAdaptor_Curve aCurve (anEdge);
428 myCurveAlgo.Add (thePresentation, aCurve, aDeflection, theDrawer,
429 aPoints->ChangeSequence(), Standard_False);
430 aWireCurves.Append (aPoints);
435 aWireCurves.Append (aPoints);
438 catch (Standard_Failure)
441 std::cout << "probleme sur aLocation'edge " << (void* ) &(*(anEdge).TShape()) << std::endl;
447 if (theDrawer->FreeBoundaryDraw())
450 for (anIt.Initialize (aLFree); anIt.More(); anIt.Next())
452 const TopoDS_Edge& anEdge = TopoDS::Edge (anIt.Value());
453 if (!BRep_Tool::Degenerated (anEdge))
458 const Handle(TColgp_HSequenceOfPnt)& aPoints = new TColgp_HSequenceOfPnt;
459 if (!AddPolygon (anEdge, aPoints->ChangeSequence()))
461 if (BRep_Tool::IsGeometric (anEdge))
463 BRepAdaptor_Curve aCurve (anEdge);
464 myCurveAlgo.Add (thePresentation, aCurve, aDeflection, theDrawer,
465 aPoints->ChangeSequence(), Standard_False);
466 aFreeCurves.Append (aPoints);
471 aFreeCurves.Append (aPoints);
474 catch (Standard_Failure)
477 std::cout << "probleme sur aLocation'edge " << (void* ) &(*(anEdge).TShape()) << std::endl;
484 if (theDrawer->UnFreeBoundaryDraw())
486 // Unfree boundaries;
487 for (anIt.Initialize (aLUnFree); anIt.More(); anIt.Next())
489 const TopoDS_Edge& anEdge = TopoDS::Edge (anIt.Value());
493 const Handle(TColgp_HSequenceOfPnt)& aPoints = new TColgp_HSequenceOfPnt;
494 if (!AddPolygon (anEdge, aPoints->ChangeSequence()))
496 if (BRep_Tool::IsGeometric (anEdge))
498 BRepAdaptor_Curve aCurve (anEdge);
499 myCurveAlgo.Add (thePresentation, aCurve, aDeflection, theDrawer, aPoints->ChangeSequence(), Standard_False);
500 anUnFreeCurves.Append (aPoints);
505 anUnFreeCurves.Append (aPoints);
508 catch (Standard_Failure)
511 std::cout << "probleme sur aLocation'edge " << (void* ) &(*(anEdge).TShape()) << std::endl;
517 if (aWireCurves.Size() > 0)
519 aNbBounds = aWireCurves.Size();
520 Prs3d_NListIteratorOfListOfSequenceOfPnt anIt;
521 for (anIt.Init (aWireCurves); anIt.More(); anIt.Next())
523 aNbVertices += anIt.Value()->Length();
525 Handle(Graphic3d_ArrayOfPolylines) WireArray = new Graphic3d_ArrayOfPolylines (aNbVertices, aNbBounds);
526 for (anIt.Init (aWireCurves); anIt.More(); anIt.Next())
528 const Handle(TColgp_HSequenceOfPnt)& aPoints = anIt.Value();
529 WireArray->AddBound (aPoints->Length());
530 for (anI = 1; anI <= aPoints->Length(); ++anI)
532 WireArray->AddVertex (aPoints->Value (anI));
535 Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup (thePresentation);
536 aGroup->SetPrimitivesAspect (theDrawer->WireAspect()->Aspect());
537 aGroup->AddPrimitiveArray (WireArray);
540 if (aFreeCurves.Size() > 0)
542 aNbBounds = aFreeCurves.Size();
543 Prs3d_NListIteratorOfListOfSequenceOfPnt anIt;
544 for (anIt.Init (aFreeCurves); anIt.More(); anIt.Next())
546 aNbVertices += anIt.Value()->Length();
548 Handle(Graphic3d_ArrayOfPolylines) aFreeArray = new Graphic3d_ArrayOfPolylines (aNbVertices, aNbBounds);
549 for (anIt.Init(aFreeCurves); anIt.More(); anIt.Next())
551 const Handle(TColgp_HSequenceOfPnt)& aPoints = anIt.Value();
552 aFreeArray->AddBound (aPoints->Length());
553 for (anI = 1; anI <= aPoints->Length(); ++anI)
555 aFreeArray->AddVertex (aPoints->Value (anI));
558 Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup (thePresentation);
559 aGroup->SetPrimitivesAspect (theDrawer->FreeBoundaryAspect()->Aspect());
560 aGroup->AddPrimitiveArray (aFreeArray);
563 if (anUnFreeCurves.Size() > 0)
565 aNbBounds = anUnFreeCurves.Size();
566 Prs3d_NListIteratorOfListOfSequenceOfPnt anIt;
567 for (anIt.Init (anUnFreeCurves); anIt.More(); anIt.Next())
569 aNbVertices += anIt.Value()->Length();
571 Handle(Graphic3d_ArrayOfPolylines) anUnFreeArray = new Graphic3d_ArrayOfPolylines (aNbVertices, aNbBounds);
572 for (anIt.Init (anUnFreeCurves); anIt.More(); anIt.Next())
574 const Handle(TColgp_HSequenceOfPnt)& aPoints = anIt.Value();
575 anUnFreeArray->AddBound (aPoints->Length());
576 for (anI = 1; anI <= aPoints->Length(); ++anI)
578 anUnFreeArray->AddVertex (aPoints->Value (anI));
581 Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup (thePresentation);
582 aGroup->SetPrimitivesAspect (theDrawer->UnFreeBoundaryAspect()->Aspect());
583 aGroup->AddPrimitiveArray (anUnFreeArray);
587 TColgp_SequenceOfPnt aShapePoints;
588 for (aTool.InitVertex(); aTool.MoreVertex(); aTool.NextVertex())
590 aShapePoints.Append (BRep_Tool::Pnt (aTool.GetVertex()));
593 aNbVertices = aShapePoints.Length();
596 Handle(Graphic3d_ArrayOfPoints) aPointArray = new Graphic3d_ArrayOfPoints (aNbVertices);
597 for (anI = 1; anI <= aNbVertices; ++anI)
599 aPointArray->AddVertex (aShapePoints.Value (anI));
602 Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup (thePresentation);
603 aGroup->SetPrimitivesAspect (theDrawer->PointAspect()->Aspect());
604 aGroup->AddPrimitiveArray (aPointArray);
608 // =========================================================================
609 // function: PickCurve
611 // =========================================================================
612 Handle(TopTools_HSequenceOfShape) Prs3d_WFShape::PickCurve
613 (const Quantity_Length theX,
614 const Quantity_Length theY,
615 const Quantity_Length theZ,
616 const Quantity_Length theDistance,
617 const TopoDS_Shape& theShape,
618 const Handle (Prs3d_Drawer)& theDrawer)
620 Handle(TopTools_HSequenceOfShape) aSeq = new TopTools_HSequenceOfShape();
621 Prs3d_ShapeTool aTool (theShape);
622 for (aTool.InitCurve(); aTool.MoreCurve(); aTool.NextCurve())
624 Bnd_Box aBndBox = aTool.CurveBound();
625 aBndBox.Enlarge (theDistance);
626 if (!aBndBox.IsOut (gp_Pnt (theX, theY, theZ)))
628 if (myCurveAlgo.Match (theX, theY, theZ, theDistance,
629 BRepAdaptor_Curve (aTool.GetCurve()), theDrawer))
631 Standard_Boolean isContain = Standard_False;
632 for (Standard_Integer anI = 1; anI <= aSeq->Length(); ++anI)
634 if (aSeq->Value (anI) == (aTool.GetCurve()))
636 isContain = Standard_True;
642 aSeq->Append (aTool.GetCurve());
650 // =========================================================================
651 // function: PickPatch
653 // =========================================================================
654 Handle(TopTools_HSequenceOfShape) Prs3d_WFShape::PickPatch
655 (const Quantity_Length theX,
656 const Quantity_Length theY,
657 const Quantity_Length theZ,
658 const Quantity_Length theDistance,
659 const TopoDS_Shape& theShape,
660 const Handle(Prs3d_Drawer)& theDrawer)
662 Handle(TopTools_HSequenceOfShape) aSeq = new TopTools_HSequenceOfShape();
663 Prs3d_ShapeTool aTool (theShape);
665 Standard_Boolean aRba1 = theDrawer->UIsoAspect()->Number() != 0;
666 Standard_Boolean aRba2 = theDrawer->VIsoAspect()->Number() != 0;
667 Standard_Boolean isContain;
671 BRepAdaptor_Surface aSurface;
672 for (aTool.InitFace(); aTool.MoreFace(); aTool.NextFace())
674 Bnd_Box aBndBox = aTool.FaceBound();
675 aBndBox.Enlarge (theDistance);
676 if (!aBndBox.IsOut (gp_Pnt (theX, theY, theZ)))
678 aSurface.Initialize (aTool.GetFace());
679 Handle(BRepAdaptor_HSurface) aHSurface = new BRepAdaptor_HSurface (aSurface);
680 if (myFaceAlgo.Match (theX, theY, theZ, theDistance, aHSurface, theDrawer))
682 isContain = Standard_False;
683 for (Standard_Integer anI = 1; anI <= aSeq->Length(); ++anI)
685 if (aSeq->Value (anI) == (aTool.GetFace()))
687 isContain = Standard_True;
693 aSeq->Append (aTool.GetFace());
700 for (aTool.InitCurve(); aTool.MoreCurve(); aTool.NextCurve())
702 Bnd_Box aBndBox = aTool.CurveBound();
703 aBndBox.Enlarge (theDistance);
704 if (!aBndBox.IsOut (gp_Pnt (theX, theY, theZ)))
706 if (myCurveAlgo.Match (theX, theY, theZ, theDistance,
707 BRepAdaptor_Curve(aTool.GetCurve()), theDrawer))
709 Handle(TopTools_HSequenceOfShape) aSurface = aTool.FacesOfEdge();
710 for (Standard_Integer anI = 1; anI <= aSurface->Length(); ++anI)
712 isContain = Standard_False;
713 for (Standard_Integer aJ = 1; aJ <= aSeq->Length(); ++aJ)
715 if (aSeq->Value (aJ) == (aSurface->Value (anI)))
717 isContain = Standard_True;
723 aSeq->Append (aSurface->Value (anI));