1 // Created by: Peter KURNEV
2 // Copyright (c) 1999-2012 OPEN CASCADE SAS
4 // The content of this file is subject to the Open CASCADE Technology Public
5 // License Version 6.5 (the "License"). You may not use the content of this file
6 // except in compliance with the License. Please obtain a copy of the License
7 // at http://www.opencascade.org and read it completely before using this file.
9 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
10 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12 // The Original Code and all software distributed under the License is
13 // distributed on an "AS IS" basis, without warranty of any kind, and the
14 // Initial Developer hereby disclaims all such warranties, including without
15 // limitation, any warranties of merchantability, fitness for a particular
16 // purpose or non-infringement. Please see the License for the specific terms
17 // and conditions governing the rights and limitations under the License.
20 #include <BOPInt_Context.ixx>
22 #include <Precision.hxx>
24 #include <Geom_Curve.hxx>
25 #include <Geom_BoundedCurve.hxx>
26 #include <GeomAPI_ProjectPointOnCurve.hxx>
27 #include <GeomAPI_ProjectPointOnSurf.hxx>
28 #include <GeomAdaptor_Curve.hxx>
30 #include <Geom2dHatch_Intersector.hxx>
31 #include <Geom2d_TrimmedCurve.hxx>
33 #include <TopAbs_State.hxx>
35 #include <TopExp_Explorer.hxx>
37 #include <BRep_Tool.hxx>
38 #include <BRepAdaptor_Surface.hxx>
40 #include <IntTools_Tools.hxx>
41 #include <IntTools_FClass2d.hxx>
43 #include <Extrema_LocateExtPC.hxx>
45 #include <Geom2d_Curve.hxx>
46 #include <NCollection_IncAllocator.hxx>
47 #include <IntTools_SurfaceRangeLocalizeData.hxx>
50 //=======================================================================
53 //=======================================================================
54 BOPInt_Context::BOPInt_Context()
56 myAllocator(new NCollection_IncAllocator()),
57 myFClass2dMap(100, myAllocator),
58 myProjPSMap(100, myAllocator),
59 myProjPCMap(100, myAllocator),
60 mySClassMap(100, myAllocator),
61 myProjPTMap(100, myAllocator),
62 myHatcherMap(100, myAllocator),
63 myProjSDataMap(100, myAllocator),
67 //=======================================================================
70 //=======================================================================
71 BOPInt_Context::BOPInt_Context(const Handle(NCollection_BaseAllocator)& theAllocator)
73 myAllocator(theAllocator),
74 myFClass2dMap(100, myAllocator),
75 myProjPSMap(100, myAllocator),
76 myProjPCMap(100, myAllocator),
77 mySClassMap(100, myAllocator),
78 myProjPTMap(100, myAllocator),
79 myHatcherMap(100, myAllocator),
80 myProjSDataMap(100, myAllocator),
84 //=======================================================================
87 //=======================================================================
88 BOPInt_Context::~BOPInt_Context()
90 Standard_Address anAdr;
91 BOPCol_DataMapIteratorOfDataMapOfShapeAddress aIt;
92 BOPCol_DataMapIteratorOfDataMapOfTransientAddress aIt1;
94 IntTools_FClass2d* pFClass2d;
96 aIt.Initialize(myFClass2dMap);
97 for (; aIt.More(); aIt.Next()) {
99 pFClass2d=(IntTools_FClass2d*)anAdr;
100 (*pFClass2d).~IntTools_FClass2d();
101 myAllocator->Free(anAdr);
103 myFClass2dMap.Clear();
105 GeomAPI_ProjectPointOnSurf* pProjPS;
106 aIt.Initialize(myProjPSMap);
107 for (; aIt.More(); aIt.Next()) {
109 pProjPS=(GeomAPI_ProjectPointOnSurf*)anAdr;
110 (*pProjPS).~GeomAPI_ProjectPointOnSurf();
111 myAllocator->Free(anAdr);
115 GeomAPI_ProjectPointOnCurve* pProjPC;
116 aIt.Initialize(myProjPCMap);
117 for (; aIt.More(); aIt.Next()) {
119 pProjPC=(GeomAPI_ProjectPointOnCurve*)anAdr;
120 (*pProjPC).~GeomAPI_ProjectPointOnCurve();
121 myAllocator->Free(anAdr);
126 BRepClass3d_SolidClassifier* pSC;
127 aIt.Initialize(mySClassMap);
128 for (; aIt.More(); aIt.Next()) {
130 pSC=(BRepClass3d_SolidClassifier*)anAdr;
131 (*pSC).~BRepClass3d_SolidClassifier();
132 myAllocator->Free(anAdr);
136 GeomAPI_ProjectPointOnCurve* pProjPT;
137 aIt1.Initialize(myProjPTMap);
138 for (; aIt1.More(); aIt1.Next()) {
140 pProjPT=(GeomAPI_ProjectPointOnCurve*)anAdr;
141 (*pProjPT).~GeomAPI_ProjectPointOnCurve();
142 myAllocator->Free(anAdr);
146 Geom2dHatch_Hatcher* pHatcher;
147 aIt.Initialize(myHatcherMap);
148 for (; aIt.More(); aIt.Next()) {
150 pHatcher=(Geom2dHatch_Hatcher*)anAdr;
151 (*pHatcher).~Geom2dHatch_Hatcher();
152 myAllocator->Free(anAdr);
154 myHatcherMap.Clear();
156 IntTools_SurfaceRangeLocalizeData* pSData = NULL;
157 aIt.Initialize(myProjSDataMap);
158 for (; aIt.More(); aIt.Next()) {
160 pSData = (IntTools_SurfaceRangeLocalizeData*)anAdr;
161 (*pSData).~IntTools_SurfaceRangeLocalizeData();
162 myAllocator->Free(anAdr);
164 myProjSDataMap.Clear();
166 //=======================================================================
167 //function : FClass2d
169 //=======================================================================
170 IntTools_FClass2d& BOPInt_Context::FClass2d(const TopoDS_Face& aF)
172 Standard_Address anAdr;
173 IntTools_FClass2d* pFClass2d;
175 if (!myFClass2dMap.IsBound(aF)) {
180 aFF.Orientation(TopAbs_FORWARD);
181 aTolF=BRep_Tool::Tolerance(aFF);
183 pFClass2d=(IntTools_FClass2d*)myAllocator->Allocate(sizeof(IntTools_FClass2d));
184 new (pFClass2d) IntTools_FClass2d(aFF, aTolF);
186 anAdr=(Standard_Address)pFClass2d;
187 myFClass2dMap.Bind(aFF, anAdr);
190 anAdr=myFClass2dMap.Find(aF);
191 pFClass2d=(IntTools_FClass2d*)anAdr;
195 //=======================================================================
198 //=======================================================================
199 GeomAPI_ProjectPointOnSurf& BOPInt_Context::ProjPS(const TopoDS_Face& aF)
201 Standard_Address anAdr;
202 GeomAPI_ProjectPointOnSurf* pProjPS;
204 if (!myProjPSMap.IsBound(aF)) {
205 Standard_Real Umin, Usup, Vmin, Vsup, anEpsT=1.e-12 ;
206 BRepAdaptor_Surface aBAS;
208 const Handle(Geom_Surface)& aS=BRep_Tool::Surface(aF);
209 aBAS.Initialize (aF, Standard_True);
211 Umin=aBAS.FirstUParameter();
212 Usup=aBAS.LastUParameter ();
213 Vmin=aBAS.FirstVParameter();
214 Vsup=aBAS.LastVParameter ();
216 pProjPS=(GeomAPI_ProjectPointOnSurf*)myAllocator->Allocate(sizeof(GeomAPI_ProjectPointOnSurf));
217 new (pProjPS) GeomAPI_ProjectPointOnSurf();
218 pProjPS->Init(aS ,Umin, Usup, Vmin, Vsup, anEpsT);
220 anAdr=(Standard_Address)pProjPS;
221 myProjPSMap.Bind(aF, anAdr);
225 anAdr=myProjPSMap.Find(aF);
226 pProjPS=(GeomAPI_ProjectPointOnSurf*)anAdr;
230 //=======================================================================
233 //=======================================================================
234 GeomAPI_ProjectPointOnCurve& BOPInt_Context::ProjPC(const TopoDS_Edge& aE)
236 Standard_Address anAdr;
237 GeomAPI_ProjectPointOnCurve* pProjPC;
239 if (!myProjPCMap.IsBound(aE)) {
242 Handle(Geom_Curve)aC3D=BRep_Tool::Curve (aE, f, l);
244 pProjPC=(GeomAPI_ProjectPointOnCurve*)myAllocator->Allocate(sizeof(GeomAPI_ProjectPointOnCurve));
245 new (pProjPC) GeomAPI_ProjectPointOnCurve();
246 pProjPC->Init(aC3D, f, l);
248 anAdr=(Standard_Address)pProjPC;
249 myProjPCMap.Bind(aE, anAdr);
253 anAdr=myProjPCMap.Find(aE);
254 pProjPC=(GeomAPI_ProjectPointOnCurve*)anAdr;
259 //=======================================================================
262 //=======================================================================
263 GeomAPI_ProjectPointOnCurve& BOPInt_Context::ProjPT(const Handle(Geom_Curve)& aC3D)
266 Standard_Address anAdr;
267 GeomAPI_ProjectPointOnCurve* pProjPT;
269 if (!myProjPTMap.IsBound(aC3D)) {
271 f=aC3D->FirstParameter();
272 l=aC3D->LastParameter();
274 pProjPT=(GeomAPI_ProjectPointOnCurve*)myAllocator->Allocate(sizeof(GeomAPI_ProjectPointOnCurve));
275 new (pProjPT) GeomAPI_ProjectPointOnCurve();
276 pProjPT->Init(aC3D, f, l);
278 anAdr=(Standard_Address)pProjPT;
279 myProjPTMap.Bind(aC3D, anAdr);
283 anAdr=myProjPTMap.Find(aC3D);
284 pProjPT=(GeomAPI_ProjectPointOnCurve*)anAdr;
288 //=======================================================================
289 //function : SolidClassifier
291 //=======================================================================
292 BRepClass3d_SolidClassifier& BOPInt_Context::SolidClassifier(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& BOPInt_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& BOPInt_Context::SurfaceData(const TopoDS_Face& aF)
383 Standard_Address anAdr;
384 IntTools_SurfaceRangeLocalizeData* pSData;
386 if (!myProjSDataMap.IsBound(aF)) {
387 pSData=new IntTools_SurfaceRangeLocalizeData(3,
389 10. * Precision::PConfusion(),
390 10. * Precision::PConfusion());
392 anAdr=(Standard_Address)pSData;
393 myProjSDataMap.Bind(aF, anAdr);
397 anAdr=myProjSDataMap.Find(aF);
398 pSData=(IntTools_SurfaceRangeLocalizeData*)anAdr;
404 //=======================================================================
405 //function : ComputePE
407 //=======================================================================
408 Standard_Integer BOPInt_Context::ComputePE(const gp_Pnt& aP1,
409 const Standard_Real aTolP1,
410 const TopoDS_Edge& aE2,
413 if (!BRep_Tool::IsGeometric(aE2)) {
416 Standard_Real aDist, aTolE2, aTolSum;
417 Standard_Integer aNbProj;
419 GeomAPI_ProjectPointOnCurve& aProjector=ProjPC(aE2);
420 aProjector.Perform(aP1);
422 aNbProj=aProjector.NbPoints();
427 aDist=aProjector.LowerDistance();
429 aTolE2=BRep_Tool::Tolerance(aE2);
430 aTolSum=aTolP1+aTolE2;
432 aT=aProjector.LowerDistanceParameter();
433 if (aDist > aTolSum) {
438 //=======================================================================
439 //function : ComputeVE
441 //=======================================================================
442 Standard_Integer BOPInt_Context::ComputeVE(const TopoDS_Vertex& aV1,
443 const TopoDS_Edge& aE2,
446 if (BRep_Tool::Degenerated(aE2)) {
449 if (!BRep_Tool::IsGeometric(aE2)) {
452 Standard_Real aDist, aTolV1, aTolE2, aTolSum;
453 Standard_Integer aNbProj;
456 aP=BRep_Tool::Pnt(aV1);
458 GeomAPI_ProjectPointOnCurve& aProjector=ProjPC(aE2);
459 aProjector.Perform(aP);
461 aNbProj=aProjector.NbPoints();
466 aDist=aProjector.LowerDistance();
468 aTolV1=BRep_Tool::Tolerance(aV1);
469 aTolE2=BRep_Tool::Tolerance(aE2);
470 aTolSum=aTolV1+aTolE2;
472 aT=aProjector.LowerDistanceParameter();
473 if (aDist > aTolSum) {
478 //=======================================================================
479 //function : ComputeVS
481 //=======================================================================
482 Standard_Integer BOPInt_Context::ComputeVF(const TopoDS_Vertex& aV1,
483 const TopoDS_Face& aF2,
487 Standard_Real aTolV1, aTolF2, aTolSum, aDist;
490 aP=BRep_Tool::Pnt(aV1);
492 // 1. Check if the point is projectable on the surface
493 GeomAPI_ProjectPointOnSurf& aProjector=ProjPS(aF2);
494 aProjector.Perform(aP);
496 if (!aProjector.IsDone()) { // the point is not projectable on the surface
500 // 2. Check the distance between the projection point and
501 // the original point
502 aDist=aProjector.LowerDistance();
504 aTolV1=BRep_Tool::Tolerance(aV1);
505 aTolF2=BRep_Tool::Tolerance(aF2);
506 aTolSum=aTolV1+aTolF2;
507 if (aDist > aTolSum) {
508 // the distance is too large
511 aProjector.LowerDistanceParameters(U, V);
514 Standard_Boolean pri=IsPointInFace (aF2, aP2d);
515 if (!pri) {// the point lays on the surface but out of the face
520 //=======================================================================
521 //function : StatePointFace
523 //=======================================================================
524 TopAbs_State BOPInt_Context::StatePointFace(const TopoDS_Face& aF,
525 const gp_Pnt2d& aP2d)
528 IntTools_FClass2d& aClass2d=FClass2d(aF);
529 aState=aClass2d.Perform(aP2d);
532 //=======================================================================
533 //function : IsPointInFace
535 //=======================================================================
536 Standard_Boolean BOPInt_Context::IsPointInFace(const TopoDS_Face& aF,
537 const gp_Pnt2d& aP2d)
539 TopAbs_State aState=StatePointFace(aF, aP2d);
540 if (aState==TopAbs_OUT || aState==TopAbs_ON) {
541 return Standard_False;
543 return Standard_True;
545 //=======================================================================
546 //function : IsPointInOnFace
548 //=======================================================================
549 Standard_Boolean BOPInt_Context::IsPointInOnFace(const TopoDS_Face& aF,
550 const gp_Pnt2d& aP2d)
552 TopAbs_State aState=StatePointFace(aF, aP2d);
553 if (aState==TopAbs_OUT) {
554 return Standard_False;
556 return Standard_True;
558 //=======================================================================
559 //function : IsValidPointForFace
561 //=======================================================================
562 Standard_Boolean BOPInt_Context::IsValidPointForFace(const gp_Pnt& aP,
563 const TopoDS_Face& aF,
564 const Standard_Real aTol)
566 Standard_Boolean bFlag;
567 Standard_Real Umin, myEpsT, U, V;
570 GeomAPI_ProjectPointOnSurf& aProjector=ProjPS(aF);
571 aProjector.Perform(aP);
573 bFlag=aProjector.IsDone();
576 Umin=aProjector.LowerDistance();
577 //if (Umin > 1.e-3) { // it was
582 aProjector.LowerDistanceParameters(U, V);
584 bFlag=IsPointInOnFace (aF, aP2D);
588 //=======================================================================
589 //function : IsValidPointForFaces
591 //=======================================================================
592 Standard_Boolean BOPInt_Context::IsValidPointForFaces (const gp_Pnt& aP,
593 const TopoDS_Face& aF1,
594 const TopoDS_Face& aF2,
595 const Standard_Real aTol)
597 Standard_Boolean bFlag1, bFlag2;
599 bFlag1=IsValidPointForFace(aP, aF1, aTol);
603 bFlag2=IsValidPointForFace(aP, aF2, aTol);
606 //=======================================================================
607 //function : IsValidBlockForFace
609 //=======================================================================
610 Standard_Boolean BOPInt_Context::IsValidBlockForFace (const Standard_Real aT1,
611 const Standard_Real aT2,
612 const IntTools_Curve& aC,
613 const TopoDS_Face& aF,
614 const Standard_Real aTol)
616 Standard_Boolean bFlag;
617 Standard_Real aTInterm, aFirst, aLast;
620 aTInterm=IntTools_Tools::IntermediatePoint(aT1, aT2);
622 Handle(Geom_Curve) aC3D=aC.Curve();
623 aFirst=aC3D->FirstParameter();
624 aLast =aC3D->LastParameter();
626 aC3D->D0(aTInterm, aPInterm);
628 bFlag=IsValidPointForFace (aPInterm, aF, aTol);
631 //=======================================================================
632 //function : IsValidBlockForFaces
634 //=======================================================================
635 Standard_Boolean BOPInt_Context::IsValidBlockForFaces (const Standard_Real aT1,
636 const Standard_Real aT2,
637 const IntTools_Curve& aC,
638 const TopoDS_Face& aF1,
639 const TopoDS_Face& aF2,
640 const Standard_Real aTol)
642 Standard_Boolean bFlag1, bFlag2;
644 Handle(Geom2d_Curve) aPC1 = aC.FirstCurve2d();
645 Handle(Geom2d_Curve) aPC2 = aC.SecondCurve2d();
646 if( !aPC1.IsNull() && !aPC2.IsNull() ) {
647 Standard_Real aMidPar = IntTools_Tools::IntermediatePoint(aT1, aT2);
651 aPC1->D0(aMidPar, aPnt2D);
652 bFlag1 = IsPointInOnFace(aF1, aPnt2D);
657 aPC2->D0(aMidPar, aPnt2D);
658 bFlag2 = IsPointInOnFace(aF2, aPnt2D);
663 bFlag1=IsValidBlockForFace (aT1, aT2, aC, aF1, aTol);
667 bFlag2=IsValidBlockForFace (aT1, aT2, aC, aF2, aTol);
670 //=======================================================================
671 //function : IsVertexOnLine
673 //=======================================================================
674 Standard_Boolean BOPInt_Context::IsVertexOnLine (const TopoDS_Vertex& aV,
675 const IntTools_Curve& aC,
676 const Standard_Real aTolC,
679 Standard_Boolean bRet;
682 aTolV=BRep_Tool::Tolerance(aV);
683 bRet=BOPInt_Context::IsVertexOnLine(aV, aTolV, aC, aTolC , aT);
687 //=======================================================================
688 //function : IsVertexOnLine
690 //=======================================================================
691 Standard_Boolean BOPInt_Context::IsVertexOnLine (const TopoDS_Vertex& aV,
692 const Standard_Real aTolV,
693 const IntTools_Curve& aC,
694 const Standard_Real aTolC,
697 Standard_Real aFirst, aLast, aDist, aTolSum;
698 Standard_Integer aNbProj;
701 aPv=BRep_Tool::Pnt(aV);
703 Handle(Geom_Curve) aC3D=aC.Curve();
708 GeomAdaptor_Curve aGAC(aC3D);
709 GeomAbs_CurveType aType=aGAC.GetType();
710 if (aType==GeomAbs_BSplineCurve ||
711 aType==GeomAbs_BezierCurve) {
718 aTolSum=2.*aTolSum;//xft
723 aFirst=aC3D->FirstParameter();
724 aLast =aC3D->LastParameter();
726 //Checking extermities first
727 if (!Precision::IsInfinite(aFirst)) {
728 gp_Pnt aPCFirst=aC3D->Value(aFirst);
729 aDist=aPv.Distance(aPCFirst);
730 if (aDist < aTolSum) {
734 Extrema_LocateExtPC anExt(aPv, aGAC, aFirst, 1.e-10);
737 Extrema_POnCurv aPOncurve = anExt.Point();
738 aT = aPOncurve.Parameter();
740 if((aT > (aLast + aFirst) * 0.5) ||
741 (aPv.Distance(aPOncurve.Value()) > aTolSum) ||
742 (aPCFirst.Distance(aPOncurve.Value()) < Precision::Confusion()))
747 return Standard_True;
751 //if (!Precision::IsInfinite(aFirst)) {
752 if (!Precision::IsInfinite(aLast)) {
753 gp_Pnt aPCLast=aC3D->Value(aLast);
754 aDist=aPv.Distance(aPCLast);
755 if (aDist < aTolSum) {
759 Extrema_LocateExtPC anExt(aPv, aGAC, aLast, 1.e-10);
762 Extrema_POnCurv aPOncurve = anExt.Point();
763 aT = aPOncurve.Parameter();
765 if((aT < (aLast + aFirst) * 0.5) ||
766 (aPv.Distance(aPOncurve.Value()) > aTolSum) ||
767 (aPCLast.Distance(aPOncurve.Value()) < Precision::Confusion()))
772 return Standard_True;
776 GeomAPI_ProjectPointOnCurve& aProjector=ProjPT(aC3D);
777 aProjector.Perform(aPv);
779 aNbProj=aProjector.NbPoints();
781 Handle(Geom_BoundedCurve) aBC=
782 Handle(Geom_BoundedCurve)::DownCast(aC3D);
784 gp_Pnt aPStart=aBC->StartPoint();
785 gp_Pnt aPEnd =aBC->EndPoint();
787 aDist=aPv.Distance(aPStart);
788 if (aDist < aTolSum) {
790 return Standard_True;
793 aDist=aPv.Distance(aPEnd);
794 if (aDist < aTolSum) {
796 return Standard_True;
800 return Standard_False;
803 aDist=aProjector.LowerDistance();
805 if (aDist > aTolSum) {
806 return Standard_False;
809 aT=aProjector.LowerDistanceParameter();
811 return Standard_True;
813 //=======================================================================
814 //function : ProjectPointOnEdge
816 //=======================================================================
817 Standard_Boolean BOPInt_Context::ProjectPointOnEdge(const gp_Pnt& aP,
818 const TopoDS_Edge& anEdge,
821 Standard_Integer aNbPoints;
823 GeomAPI_ProjectPointOnCurve& aProjector=ProjPC(anEdge);
824 aProjector.Perform(aP);
826 aNbPoints=aProjector.NbPoints();
828 aT=aProjector.LowerDistanceParameter();
829 return Standard_True;
831 return Standard_False;