1 // Created by: Peter KURNEV
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
15 #include <IntTools_Context.ixx>
17 #include <Precision.hxx>
19 #include <Geom_Curve.hxx>
20 #include <Geom_BoundedCurve.hxx>
21 #include <GeomAPI_ProjectPointOnCurve.hxx>
22 #include <GeomAPI_ProjectPointOnSurf.hxx>
23 #include <GeomAdaptor_Curve.hxx>
25 #include <Geom2dHatch_Intersector.hxx>
26 #include <Geom2d_TrimmedCurve.hxx>
28 #include <TopAbs_State.hxx>
30 #include <TopExp_Explorer.hxx>
32 #include <BRep_Tool.hxx>
33 #include <BRepAdaptor_Surface.hxx>
35 #include <IntTools_Tools.hxx>
36 #include <IntTools_FClass2d.hxx>
38 #include <Extrema_LocateExtPC.hxx>
40 #include <Geom2d_Curve.hxx>
41 #include <NCollection_IncAllocator.hxx>
42 #include <IntTools_SurfaceRangeLocalizeData.hxx>
45 //=======================================================================
48 //=======================================================================
49 IntTools_Context::IntTools_Context()
51 myAllocator(new NCollection_IncAllocator()),
52 myFClass2dMap(100, myAllocator),
53 myProjPSMap(100, myAllocator),
54 myProjPCMap(100, myAllocator),
55 mySClassMap(100, myAllocator),
56 myProjPTMap(100, myAllocator),
57 myHatcherMap(100, myAllocator),
58 myProjSDataMap(100, myAllocator),
62 //=======================================================================
65 //=======================================================================
66 IntTools_Context::IntTools_Context
67 (const Handle(NCollection_BaseAllocator)& theAllocator)
69 myAllocator(theAllocator),
70 myFClass2dMap(100, myAllocator),
71 myProjPSMap(100, myAllocator),
72 myProjPCMap(100, myAllocator),
73 mySClassMap(100, myAllocator),
74 myProjPTMap(100, myAllocator),
75 myHatcherMap(100, myAllocator),
76 myProjSDataMap(100, myAllocator),
80 //=======================================================================
83 //=======================================================================
84 IntTools_Context::~IntTools_Context()
86 Standard_Address anAdr;
87 BOPCol_DataMapIteratorOfDataMapOfShapeAddress aIt;
88 BOPCol_DataMapIteratorOfDataMapOfTransientAddress aIt1;
90 IntTools_FClass2d* pFClass2d;
92 aIt.Initialize(myFClass2dMap);
93 for (; aIt.More(); aIt.Next()) {
95 pFClass2d=(IntTools_FClass2d*)anAdr;
96 (*pFClass2d).~IntTools_FClass2d();
97 myAllocator->Free(anAdr);
99 myFClass2dMap.Clear();
101 GeomAPI_ProjectPointOnSurf* pProjPS;
102 aIt.Initialize(myProjPSMap);
103 for (; aIt.More(); aIt.Next()) {
105 pProjPS=(GeomAPI_ProjectPointOnSurf*)anAdr;
106 (*pProjPS).~GeomAPI_ProjectPointOnSurf();
107 myAllocator->Free(anAdr);
111 GeomAPI_ProjectPointOnCurve* pProjPC;
112 aIt.Initialize(myProjPCMap);
113 for (; aIt.More(); aIt.Next()) {
115 pProjPC=(GeomAPI_ProjectPointOnCurve*)anAdr;
116 (*pProjPC).~GeomAPI_ProjectPointOnCurve();
117 myAllocator->Free(anAdr);
122 BRepClass3d_SolidClassifier* pSC;
123 aIt.Initialize(mySClassMap);
124 for (; aIt.More(); aIt.Next()) {
126 pSC=(BRepClass3d_SolidClassifier*)anAdr;
127 (*pSC).~BRepClass3d_SolidClassifier();
128 myAllocator->Free(anAdr);
132 GeomAPI_ProjectPointOnCurve* pProjPT;
133 aIt1.Initialize(myProjPTMap);
134 for (; aIt1.More(); aIt1.Next()) {
136 pProjPT=(GeomAPI_ProjectPointOnCurve*)anAdr;
137 (*pProjPT).~GeomAPI_ProjectPointOnCurve();
138 myAllocator->Free(anAdr);
142 Geom2dHatch_Hatcher* pHatcher;
143 aIt.Initialize(myHatcherMap);
144 for (; aIt.More(); aIt.Next()) {
146 pHatcher=(Geom2dHatch_Hatcher*)anAdr;
147 (*pHatcher).~Geom2dHatch_Hatcher();
148 myAllocator->Free(anAdr);
150 myHatcherMap.Clear();
152 IntTools_SurfaceRangeLocalizeData* pSData = NULL;
153 aIt.Initialize(myProjSDataMap);
154 for (; aIt.More(); aIt.Next()) {
156 pSData = (IntTools_SurfaceRangeLocalizeData*)anAdr;
157 (*pSData).~IntTools_SurfaceRangeLocalizeData();
158 myAllocator->Free(anAdr);
160 myProjSDataMap.Clear();
162 //=======================================================================
163 //function : FClass2d
165 //=======================================================================
166 IntTools_FClass2d& IntTools_Context::FClass2d(const TopoDS_Face& aF)
168 Standard_Address anAdr;
169 IntTools_FClass2d* pFClass2d;
171 if (!myFClass2dMap.IsBound(aF)) {
176 aFF.Orientation(TopAbs_FORWARD);
177 aTolF=BRep_Tool::Tolerance(aFF);
179 pFClass2d=(IntTools_FClass2d*)myAllocator->Allocate(sizeof(IntTools_FClass2d));
180 new (pFClass2d) IntTools_FClass2d(aFF, aTolF);
182 anAdr=(Standard_Address)pFClass2d;
183 myFClass2dMap.Bind(aFF, anAdr);
186 anAdr=myFClass2dMap.Find(aF);
187 pFClass2d=(IntTools_FClass2d*)anAdr;
191 //=======================================================================
194 //=======================================================================
195 GeomAPI_ProjectPointOnSurf& IntTools_Context::ProjPS(const TopoDS_Face& aF)
197 Standard_Address anAdr;
198 GeomAPI_ProjectPointOnSurf* pProjPS;
200 if (!myProjPSMap.IsBound(aF)) {
201 Standard_Real Umin, Usup, Vmin, Vsup, anEpsT=1.e-12 ;
202 BRepAdaptor_Surface aBAS;
204 const Handle(Geom_Surface)& aS=BRep_Tool::Surface(aF);
205 aBAS.Initialize (aF, Standard_True);
207 Umin=aBAS.FirstUParameter();
208 Usup=aBAS.LastUParameter ();
209 Vmin=aBAS.FirstVParameter();
210 Vsup=aBAS.LastVParameter ();
212 pProjPS=(GeomAPI_ProjectPointOnSurf*)myAllocator->Allocate(sizeof(GeomAPI_ProjectPointOnSurf));
213 new (pProjPS) GeomAPI_ProjectPointOnSurf();
214 pProjPS->Init(aS ,Umin, Usup, Vmin, Vsup, anEpsT/*, Extrema_ExtAlgo_Tree*/);
215 Extrema_ExtPS& anExtAlgo = const_cast<Extrema_ExtPS&>(pProjPS->Extrema());
216 anExtAlgo.SetFlag(Extrema_ExtFlag_MIN);
218 anAdr=(Standard_Address)pProjPS;
219 myProjPSMap.Bind(aF, anAdr);
223 anAdr=myProjPSMap.Find(aF);
224 pProjPS=(GeomAPI_ProjectPointOnSurf*)anAdr;
228 //=======================================================================
231 //=======================================================================
232 GeomAPI_ProjectPointOnCurve& IntTools_Context::ProjPC(const TopoDS_Edge& aE)
234 Standard_Address anAdr;
235 GeomAPI_ProjectPointOnCurve* pProjPC;
237 if (!myProjPCMap.IsBound(aE)) {
240 Handle(Geom_Curve)aC3D=BRep_Tool::Curve (aE, f, l);
242 pProjPC=(GeomAPI_ProjectPointOnCurve*)myAllocator->Allocate(sizeof(GeomAPI_ProjectPointOnCurve));
243 new (pProjPC) GeomAPI_ProjectPointOnCurve();
244 pProjPC->Init(aC3D, f, l);
246 anAdr=(Standard_Address)pProjPC;
247 myProjPCMap.Bind(aE, anAdr);
251 anAdr=myProjPCMap.Find(aE);
252 pProjPC=(GeomAPI_ProjectPointOnCurve*)anAdr;
257 //=======================================================================
260 //=======================================================================
261 GeomAPI_ProjectPointOnCurve& IntTools_Context::ProjPT
262 (const Handle(Geom_Curve)& aC3D)
265 Standard_Address anAdr;
266 GeomAPI_ProjectPointOnCurve* pProjPT;
268 if (!myProjPTMap.IsBound(aC3D)) {
270 f=aC3D->FirstParameter();
271 l=aC3D->LastParameter();
273 pProjPT=(GeomAPI_ProjectPointOnCurve*)myAllocator->Allocate(sizeof(GeomAPI_ProjectPointOnCurve));
274 new (pProjPT) GeomAPI_ProjectPointOnCurve();
275 pProjPT->Init(aC3D, f, l);
277 anAdr=(Standard_Address)pProjPT;
278 myProjPTMap.Bind(aC3D, anAdr);
282 anAdr=myProjPTMap.Find(aC3D);
283 pProjPT=(GeomAPI_ProjectPointOnCurve*)anAdr;
287 //=======================================================================
288 //function : SolidClassifier
290 //=======================================================================
291 BRepClass3d_SolidClassifier& IntTools_Context::SolidClassifier
292 (const TopoDS_Solid& aSolid)
294 Standard_Address anAdr;
295 BRepClass3d_SolidClassifier* pSC;
297 if (!mySClassMap.IsBound(aSolid)) {
299 pSC=(BRepClass3d_SolidClassifier*)myAllocator->Allocate(sizeof(BRepClass3d_SolidClassifier));
300 new (pSC) BRepClass3d_SolidClassifier(aSolid);
302 anAdr=(Standard_Address)pSC;
303 mySClassMap.Bind(aSolid, anAdr);
307 anAdr=mySClassMap.Find(aSolid);
308 pSC =(BRepClass3d_SolidClassifier*)anAdr;
313 //=======================================================================
316 //=======================================================================
317 Geom2dHatch_Hatcher& IntTools_Context::Hatcher(const TopoDS_Face& aF)
319 Standard_Address anAdr;
320 Geom2dHatch_Hatcher* pHatcher;
322 if (!myHatcherMap.IsBound(aF)) {
323 Standard_Real aTolArcIntr, aTolTangfIntr, aTolHatch2D, aTolHatch3D;
324 Standard_Real aU1, aU2, aEpsT;
325 TopAbs_Orientation aOrE;
326 Handle(Geom_Surface) aS;
327 Handle(Geom2d_Curve) aC2D;
328 Handle(Geom2d_TrimmedCurve) aCT2D;
330 TopExp_Explorer aExp;
335 aTolTangfIntr=1.e-10;
336 aEpsT=Precision::PConfusion();
338 Geom2dHatch_Intersector aIntr(aTolArcIntr, aTolTangfIntr);
339 pHatcher=new Geom2dHatch_Hatcher(aIntr,
340 aTolHatch2D, aTolHatch3D,
341 Standard_True, Standard_False);
345 aFF.Orientation(TopAbs_FORWARD);
346 aS=BRep_Tool::Surface(aFF);
348 aExp.Init (aFF, TopAbs_EDGE);
349 for (; aExp.More() ; aExp.Next()) {
350 const TopoDS_Edge& aE=*((TopoDS_Edge*)&aExp.Current());
351 aOrE=aE.Orientation();
353 aC2D=BRep_Tool::CurveOnSurface (aE, aFF, aU1, aU2);
354 if (aC2D.IsNull() ) {
357 if (fabs(aU1-aU2) < aEpsT) {
361 aCT2D=new Geom2d_TrimmedCurve(aC2D, aU1, aU2);
362 pHatcher->AddElement(aCT2D, aOrE);
363 }// for (; aExp.More() ; aExp.Next()) {
365 anAdr=(Standard_Address)pHatcher;
366 myHatcherMap.Bind(aFF, anAdr);
367 }//if (!myHatcherMap.IsBound(aF)) {
370 anAdr=myHatcherMap.Find(aF);
371 pHatcher=(Geom2dHatch_Hatcher*)anAdr;
377 //=======================================================================
378 //function : SurfaceData
380 //=======================================================================
381 IntTools_SurfaceRangeLocalizeData& IntTools_Context::SurfaceData
382 (const TopoDS_Face& aF)
384 Standard_Address anAdr;
385 IntTools_SurfaceRangeLocalizeData* pSData;
387 if (!myProjSDataMap.IsBound(aF)) {
388 pSData=new IntTools_SurfaceRangeLocalizeData
391 10. * Precision::PConfusion(),
392 10. * Precision::PConfusion());
394 anAdr=(Standard_Address)pSData;
395 myProjSDataMap.Bind(aF, anAdr);
399 anAdr=myProjSDataMap.Find(aF);
400 pSData=(IntTools_SurfaceRangeLocalizeData*)anAdr;
406 //=======================================================================
407 //function : ComputePE
409 //=======================================================================
410 Standard_Integer IntTools_Context::ComputePE
412 const Standard_Real aTolP1,
413 const TopoDS_Edge& aE2,
416 if (!BRep_Tool::IsGeometric(aE2)) {
419 Standard_Real aDist, aTolE2, aTolSum;
420 Standard_Integer aNbProj;
422 GeomAPI_ProjectPointOnCurve& aProjector=ProjPC(aE2);
423 aProjector.Perform(aP1);
425 aNbProj=aProjector.NbPoints();
430 aDist=aProjector.LowerDistance();
432 aTolE2=BRep_Tool::Tolerance(aE2);
433 aTolSum=aTolP1+aTolE2;
435 aT=aProjector.LowerDistanceParameter();
436 if (aDist > aTolSum) {
441 //=======================================================================
442 //function : ComputeVE
444 //=======================================================================
445 Standard_Integer IntTools_Context::ComputeVE
446 (const TopoDS_Vertex& aV1,
447 const TopoDS_Edge& aE2,
450 if (BRep_Tool::Degenerated(aE2)) {
453 if (!BRep_Tool::IsGeometric(aE2)) {
456 Standard_Real aDist, aTolV1, aTolE2, aTolSum;
457 Standard_Integer aNbProj;
460 aP=BRep_Tool::Pnt(aV1);
462 GeomAPI_ProjectPointOnCurve& aProjector=ProjPC(aE2);
463 aProjector.Perform(aP);
465 aNbProj=aProjector.NbPoints();
470 aDist=aProjector.LowerDistance();
472 // tolerance of check for coincidence is sum of tolerances of edge and vertex
473 // extended by additional Precision::Confusion() to allow for interference where
474 // it is very close but not fit to tolerance (see #24108)
475 aTolV1=BRep_Tool::Tolerance(aV1);
476 aTolE2=BRep_Tool::Tolerance(aE2);
477 aTolSum = aTolV1 + aTolE2 + Precision::Confusion();
479 aT=aProjector.LowerDistanceParameter();
480 if (aDist > aTolSum) {
485 //=======================================================================
486 //function : ComputeVS
488 //=======================================================================
489 Standard_Integer IntTools_Context::ComputeVF
490 (const TopoDS_Vertex& aV1,
491 const TopoDS_Face& aF2,
495 Standard_Real aTolV1, aTolF2, aTolSum, aDist;
498 aP=BRep_Tool::Pnt(aV1);
500 // 1. Check if the point is projectable on the surface
501 GeomAPI_ProjectPointOnSurf& aProjector=ProjPS(aF2);
502 aProjector.Perform(aP);
504 if (!aProjector.IsDone()) { // the point is not projectable on the surface
508 // 2. Check the distance between the projection point and
509 // the original point
510 aDist=aProjector.LowerDistance();
512 aTolV1=BRep_Tool::Tolerance(aV1);
513 aTolF2=BRep_Tool::Tolerance(aF2);
514 aTolSum=aTolV1+aTolF2;
515 if (aDist > aTolSum) {
516 // the distance is too large
519 aProjector.LowerDistanceParameters(U, V);
522 Standard_Boolean pri=IsPointInFace (aF2, aP2d);
523 if (!pri) {// the point lays on the surface but out of the face
528 //=======================================================================
529 //function : StatePointFace
531 //=======================================================================
532 TopAbs_State IntTools_Context::StatePointFace
533 (const TopoDS_Face& aF,
534 const gp_Pnt2d& aP2d)
537 IntTools_FClass2d& aClass2d=FClass2d(aF);
538 aState=aClass2d.Perform(aP2d);
541 //=======================================================================
542 //function : IsPointInFace
544 //=======================================================================
545 Standard_Boolean IntTools_Context::IsPointInFace
546 (const TopoDS_Face& aF,
547 const gp_Pnt2d& aP2d)
549 TopAbs_State aState=StatePointFace(aF, aP2d);
550 if (aState==TopAbs_OUT || aState==TopAbs_ON) {
551 return Standard_False;
553 return Standard_True;
555 //=======================================================================
556 //function : IsPointInOnFace
558 //=======================================================================
559 Standard_Boolean IntTools_Context::IsPointInOnFace(const TopoDS_Face& aF,
560 const gp_Pnt2d& aP2d)
562 TopAbs_State aState=StatePointFace(aF, aP2d);
563 if (aState==TopAbs_OUT) {
564 return Standard_False;
566 return Standard_True;
568 //=======================================================================
569 //function : IsValidPointForFace
571 //=======================================================================
572 Standard_Boolean IntTools_Context::IsValidPointForFace
574 const TopoDS_Face& aF,
575 const Standard_Real aTol)
577 Standard_Boolean bFlag;
578 Standard_Real Umin, U, V;
580 GeomAPI_ProjectPointOnSurf& aProjector=ProjPS(aF);
581 aProjector.Perform(aP);
583 bFlag=aProjector.IsDone();
586 Umin=aProjector.LowerDistance();
587 //if (Umin > 1.e-3) { // it was
592 aProjector.LowerDistanceParameters(U, V);
594 bFlag=IsPointInOnFace (aF, aP2D);
598 //=======================================================================
599 //function : IsValidPointForFaces
601 //=======================================================================
602 Standard_Boolean IntTools_Context::IsValidPointForFaces
604 const TopoDS_Face& aF1,
605 const TopoDS_Face& aF2,
606 const Standard_Real aTol)
608 Standard_Boolean bFlag1, bFlag2;
610 bFlag1=IsValidPointForFace(aP, aF1, aTol);
614 bFlag2=IsValidPointForFace(aP, aF2, aTol);
617 //=======================================================================
618 //function : IsValidBlockForFace
620 //=======================================================================
621 Standard_Boolean IntTools_Context::IsValidBlockForFace
622 (const Standard_Real aT1,
623 const Standard_Real aT2,
624 const IntTools_Curve& aC,
625 const TopoDS_Face& aF,
626 const Standard_Real aTol)
628 Standard_Boolean bFlag;
629 Standard_Real aTInterm;
632 aTInterm=IntTools_Tools::IntermediatePoint(aT1, aT2);
634 Handle(Geom_Curve) aC3D=aC.Curve();
636 aC3D->D0(aTInterm, aPInterm);
638 bFlag=IsValidPointForFace (aPInterm, aF, aTol);
641 //=======================================================================
642 //function : IsValidBlockForFaces
644 //=======================================================================
645 Standard_Boolean IntTools_Context::IsValidBlockForFaces
646 (const Standard_Real aT1,
647 const Standard_Real aT2,
648 const IntTools_Curve& aC,
649 const TopoDS_Face& aF1,
650 const TopoDS_Face& aF2,
651 const Standard_Real aTol)
653 Standard_Boolean bFlag1, bFlag2;
655 Handle(Geom2d_Curve) aPC1 = aC.FirstCurve2d();
656 Handle(Geom2d_Curve) aPC2 = aC.SecondCurve2d();
657 if( !aPC1.IsNull() && !aPC2.IsNull() ) {
658 Standard_Real aMidPar = IntTools_Tools::IntermediatePoint(aT1, aT2);
662 aPC1->D0(aMidPar, aPnt2D);
663 bFlag1 = IsPointInOnFace(aF1, aPnt2D);
668 aPC2->D0(aMidPar, aPnt2D);
669 bFlag2 = IsPointInOnFace(aF2, aPnt2D);
674 bFlag1=IsValidBlockForFace (aT1, aT2, aC, aF1, aTol);
678 bFlag2=IsValidBlockForFace (aT1, aT2, aC, aF2, aTol);
681 //=======================================================================
682 //function : IsVertexOnLine
684 //=======================================================================
685 Standard_Boolean IntTools_Context::IsVertexOnLine
686 (const TopoDS_Vertex& aV,
687 const IntTools_Curve& aC,
688 const Standard_Real aTolC,
691 Standard_Boolean bRet;
694 aTolV=BRep_Tool::Tolerance(aV);
695 bRet=IntTools_Context::IsVertexOnLine(aV, aTolV, aC, aTolC , aT);
699 //=======================================================================
700 //function : IsVertexOnLine
702 //=======================================================================
703 Standard_Boolean IntTools_Context::IsVertexOnLine
704 (const TopoDS_Vertex& aV,
705 const Standard_Real aTolV,
706 const IntTools_Curve& aC,
707 const Standard_Real aTolC,
710 Standard_Real aFirst, aLast, aDist, aTolSum;
711 Standard_Integer aNbProj;
714 aPv=BRep_Tool::Pnt(aV);
716 Handle(Geom_Curve) aC3D=aC.Curve();
721 GeomAdaptor_Curve aGAC(aC3D);
722 GeomAbs_CurveType aType=aGAC.GetType();
723 if (aType==GeomAbs_BSplineCurve ||
724 aType==GeomAbs_BezierCurve) {
731 aTolSum=2.*aTolSum;//xft
736 aFirst=aC3D->FirstParameter();
737 aLast =aC3D->LastParameter();
739 //Checking extermities first
740 if (!Precision::IsInfinite(aFirst)) {
741 gp_Pnt aPCFirst=aC3D->Value(aFirst);
742 aDist=aPv.Distance(aPCFirst);
743 if (aDist < aTolSum) {
747 Extrema_LocateExtPC anExt(aPv, aGAC, aFirst, 1.e-10);
750 Extrema_POnCurv aPOncurve = anExt.Point();
751 aT = aPOncurve.Parameter();
753 if((aT > (aLast + aFirst) * 0.5) ||
754 (aPv.Distance(aPOncurve.Value()) > aTolSum) ||
755 (aPCFirst.Distance(aPOncurve.Value()) < Precision::Confusion()))
760 return Standard_True;
764 //if (!Precision::IsInfinite(aFirst)) {
765 if (!Precision::IsInfinite(aLast)) {
766 gp_Pnt aPCLast=aC3D->Value(aLast);
767 aDist=aPv.Distance(aPCLast);
768 if (aDist < aTolSum) {
772 Extrema_LocateExtPC anExt(aPv, aGAC, aLast, 1.e-10);
775 Extrema_POnCurv aPOncurve = anExt.Point();
776 aT = aPOncurve.Parameter();
778 if((aT < (aLast + aFirst) * 0.5) ||
779 (aPv.Distance(aPOncurve.Value()) > aTolSum) ||
780 (aPCLast.Distance(aPOncurve.Value()) < Precision::Confusion()))
785 return Standard_True;
789 GeomAPI_ProjectPointOnCurve& aProjector=ProjPT(aC3D);
790 aProjector.Perform(aPv);
792 aNbProj=aProjector.NbPoints();
794 Handle(Geom_BoundedCurve) aBC=
795 Handle(Geom_BoundedCurve)::DownCast(aC3D);
797 gp_Pnt aPStart=aBC->StartPoint();
798 gp_Pnt aPEnd =aBC->EndPoint();
800 aDist=aPv.Distance(aPStart);
801 if (aDist < aTolSum) {
803 return Standard_True;
806 aDist=aPv.Distance(aPEnd);
807 if (aDist < aTolSum) {
809 return Standard_True;
813 return Standard_False;
816 aDist=aProjector.LowerDistance();
818 if (aDist > aTolSum) {
819 return Standard_False;
822 aT=aProjector.LowerDistanceParameter();
824 return Standard_True;
826 //=======================================================================
827 //function : ProjectPointOnEdge
829 //=======================================================================
830 Standard_Boolean IntTools_Context::ProjectPointOnEdge
832 const TopoDS_Edge& anEdge,
835 Standard_Integer aNbPoints;
837 GeomAPI_ProjectPointOnCurve& aProjector=ProjPC(anEdge);
838 aProjector.Perform(aP);
840 aNbPoints=aProjector.NbPoints();
842 aT=aProjector.LowerDistanceParameter();
843 return Standard_True;
845 return Standard_False;