1 // File: BRepTools_NurbsConvertModification_21423.cxx
2 // Created: Fri Jul 12 10:16:32 1996
3 // Author: Stagiaire Mary FABIEN
4 // <fbi@animax.paris1.matra-dtv.fr>
6 #include <BRepTools_NurbsConvertModification_21423.hxx>
8 #include <TopoDS_Edge.hxx>
9 #include <TopoDS_Face.hxx>
10 #include <TopoDS_Vertex.hxx>
12 #include <TopLoc_Location.hxx>
14 #include <Geom_Curve.hxx>
15 #include <Geom_Surface.hxx>
17 #include <Geom2d_Curve.hxx>
21 #ifndef _Standard_Type_HeaderFile
22 #include <Standard_Type.hxx>
25 IMPLEMENT_STANDARD_TYPE(BRepTools_NurbsConvertModification_21423)
26 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
27 STANDARD_TYPE(BRepTools_Modification),
28 STANDARD_TYPE(MMgt_TShared),
29 STANDARD_TYPE(Standard_Transient),
31 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
32 IMPLEMENT_STANDARD_TYPE_END(BRepTools_NurbsConvertModification_21423)
34 IMPLEMENT_DOWNCAST(BRepTools_NurbsConvertModification_21423,Standard_Transient)
35 IMPLEMENT_STANDARD_RTTI(BRepTools_NurbsConvertModification_21423)
37 #include <BRepTools.hxx>
39 #include <Standard_NoSuchObject.hxx>
41 #include <Geom_TrimmedCurve.hxx>
42 #include <Geom2d_TrimmedCurve.hxx>
43 #include <Geom_RectangularTrimmedSurface.hxx>
44 #include <Geom_BSplineSurface.hxx>
45 #include <Geom_BSplineCurve.hxx>
46 #include <Geom_BezierSurface.hxx>
47 #include <Geom_BezierCurve.hxx>
48 #include <Geom2d_BSplineCurve.hxx>
49 #include <GeomConvert.hxx>
50 #include <Geom2dConvert.hxx>
51 #include <Geom_Plane.hxx>
52 #include <Geom_Line.hxx>
54 #include <Geom2dAdaptor_Curve.hxx>
55 #include <GeomAdaptor_Curve.hxx>
56 #include <GeomAdaptor_Surface.hxx>
57 #include <Geom2dAdaptor_HCurve.hxx>
58 #include <Geom2dAdaptor_HCurve.hxx>
59 #include <GeomAdaptor_HCurve.hxx>
60 #include <GeomAdaptor_HSurface.hxx>
62 #include <BSplCLib.hxx>
63 #include <Approx_SameParameter.hxx>
64 #include <BRep_Tool.hxx>
65 #include <Extrema_LocateExtPC.hxx>
66 #include <OSD_Chronometer.hxx>
67 #include <gp_GTrsf2d.hxx>
68 #include <gp_TrsfForm.hxx>
71 #include <TopTools_ListIteratorOfListOfShape.hxx>
72 #include <TColStd_ListIteratorOfListOfTransient.hxx>
73 #include <ProjLib_ComputeApprox.hxx>
74 #include <ProjLib_ComputeApproxOnPolarSurface.hxx>
76 #include <BSplCLib.hxx>
77 #include <Geom_Circle.hxx>
78 #include <Geom_Ellipse.hxx>
79 #include <Geom_CylindricalSurface.hxx>
81 #include <TColStd_Array1OfReal.hxx>
82 #include <BRep_TEdge.hxx>
83 #include <BRep_GCurve.hxx>
84 #include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
85 #include <BRepAdaptor_Surface.hxx>
87 static void GeomLib_ChangeUBounds(Handle(Geom_BSplineSurface)& aSurface,
88 const Standard_Real newU1,
89 const Standard_Real newU2)
91 TColStd_Array1OfReal knots(1,aSurface->NbUKnots()) ;
92 aSurface->UKnots(knots) ;
93 BSplCLib::Reparametrize(newU1,
96 aSurface->SetUKnots(knots) ;
98 static void GeomLib_ChangeVBounds(Handle(Geom_BSplineSurface)& aSurface,
99 const Standard_Real newV1,
100 const Standard_Real newV2)
102 TColStd_Array1OfReal knots(1,aSurface->NbVKnots()) ;
103 aSurface->VKnots(knots) ;
104 BSplCLib::Reparametrize(newV1,
107 aSurface->SetVKnots(knots) ;
110 //=======================================================================
111 //function : BRepTools_NurbsConvertModification_21423
113 //=======================================================================
115 BRepTools_NurbsConvertModification_21423::BRepTools_NurbsConvertModification_21423()
121 //=======================================================================
122 //function : NewSurface
124 //=======================================================================
126 Standard_Boolean BRepTools_NurbsConvertModification_21423::NewSurface
127 (const TopoDS_Face& F,
128 Handle(Geom_Surface)& S,
131 Standard_Boolean& RevWires,
132 Standard_Boolean& RevFace)
134 Standard_Real U1, U2, curvU1, curvU2, surfU1, surfU2, UTol;
135 Standard_Real V1, V2, curvV1, curvV2, surfV1, surfV2, VTol;
136 RevWires = Standard_False;
137 RevFace = Standard_False;
138 Handle(Geom_Surface) SS = BRep_Tool::Surface(F,L);
139 Handle(Standard_Type) TheTypeSS = SS->DynamicType();
140 if ((TheTypeSS == STANDARD_TYPE(Geom_BSplineSurface)) ||
141 (TheTypeSS == STANDARD_TYPE(Geom_BezierSurface))) {
142 return Standard_False;
145 BRepTools::UVBounds(F,curvU1,curvU2,curvV1,curvV2);
146 Tol = BRep_Tool::Tolerance(F);
147 Standard_Real TolPar = 0.1*Tol;
148 Standard_Boolean IsUp = S->IsUPeriodic(), IsVp = S->IsVPeriodic();
150 U1 = curvU1; U2 = curvU2;
151 V1 = curvV1; V2 = curvV2;
152 SS->Bounds(surfU1,surfU2,surfV1,surfV2);
154 U1 = Max(surfU1,curvU1);
155 U2 = Min(surfU2,curvU2);
158 V1 = Max(surfV1,curvV1);
159 V2 = Min(surfV2,curvV2);
163 Standard_Real dU = Abs(U2 - U1), dV = Abs(V2 - V1);
164 Standard_Real Up = S->UPeriod(), Vp = S->VPeriod();
165 if(Abs(dU - Up) <= TolPar && U2 <= Up) {
166 if(Abs(dV - Vp) <= TolPar && V2 <= Vp) { }
168 SS = new Geom_RectangularTrimmedSurface(S, V1+1e-9, V2-1e-9, Standard_False);
172 if(Abs(dV - Vp) <= TolPar && V2 <= Vp)
173 SS = new Geom_RectangularTrimmedSurface(S, U1+1e-9, U2-1e-9, Standard_True);
175 SS = new Geom_RectangularTrimmedSurface(S, U1+1e-9, U2-1e-9, V1+1e-9, V2-1e-9);
180 Standard_Real dU = Abs(U2 - U1);
181 Standard_Real Up = S->UPeriod();
182 if(Abs(dU - Up) <= TolPar && U2 <= Up)
183 SS = new Geom_RectangularTrimmedSurface(S, V1+1e-9, V2-1e-9, Standard_False);
185 SS = new Geom_RectangularTrimmedSurface(S, U1+1e-9, U2-1e-9, V1+1e-9, V2-1e-9);
189 Standard_Real dV = Abs(V2 - V1);
190 Standard_Real Vp = S->VPeriod();
191 if(Abs(dV - Vp) <= TolPar && V2 <= Vp)
192 SS = new Geom_RectangularTrimmedSurface(S, U1+1e-9, U2-1e-9, Standard_True);
194 SS = new Geom_RectangularTrimmedSurface(S, U1+1e-9, U2-1e-9, V1+1e-9, V2-1e-9);
198 SS = new Geom_RectangularTrimmedSurface(S, U1+1e-9, U2-1e-9, V1+1e-9, V2-1e-9);
201 SS->Bounds(surfU1,surfU2,surfV1,surfV2) ;
203 S = GeomConvert::SurfaceToBSplineSurface(SS);
204 Handle(Geom_BSplineSurface) BS = Handle(Geom_BSplineSurface)::DownCast(S) ;
205 BS->Resolution(Tol, UTol, VTol) ;
208 // on recadre les bornes de S sinon les anciennes PCurves sont aux fraises
211 if (Abs(curvU1-surfU1) > UTol && !BS->IsUPeriodic()) {
212 GeomLib_ChangeUBounds(BS, U1,U2) ;
214 if (Abs(curvV1-surfV1) > VTol && !BS->IsVPeriodic()) {
215 GeomLib_ChangeVBounds(BS, V1, V2) ;
218 ////modified by jgv, 17.11.11 for SALOME only, bug 21423////
219 BRepAdaptor_Surface BAsurf(F);
220 if (BAsurf.GetType() == GeomAbs_Sphere)
222 Standard_Real dTol = 1e-9/Sqrt(UTol*UTol+VTol*VTol)*2.0;
223 Tol *= Max(dTol,1.0);
225 ////////////////////////////////////////////////////////////
227 return Standard_True;
230 static Standard_Boolean IsConvert(const TopoDS_Edge& E)
232 Standard_Boolean isConvert = Standard_False;
233 Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*)&E.TShape());
234 // iterate on pcurves
235 BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
236 for ( ; itcr.More() && !isConvert; itcr.Next() ) {
237 Handle(BRep_GCurve) GC = Handle(BRep_GCurve)::DownCast(itcr.Value());
238 if ( GC.IsNull() || ! GC->IsCurveOnSurface() ) continue;
239 Handle(Geom_Surface) aSurface = GC->Surface();
240 Handle(Geom2d_Curve) aCurve2d = GC->PCurve();
241 isConvert =((!aSurface->IsKind(STANDARD_TYPE(Geom_BSplineSurface)) &&
242 !aSurface->IsKind(STANDARD_TYPE(Geom_BezierSurface))) ||
243 (!aCurve2d->IsKind(STANDARD_TYPE(Geom2d_BSplineCurve)) &&
244 !aCurve2d->IsKind(STANDARD_TYPE(Geom2d_BezierCurve))));
251 //=======================================================================
252 //function : NewCurve
254 //=======================================================================
256 Standard_Boolean BRepTools_NurbsConvertModification_21423::NewCurve
257 (const TopoDS_Edge& E,
258 Handle(Geom_Curve)& C,
263 Tol = BRep_Tool::Tolerance(E);
264 if(BRep_Tool::Degenerated(E)) {
267 return Standard_True;
271 Handle(Geom_Curve) Caux = BRep_Tool::Curve(E, L, f, l);
273 if ( Caux.IsNull()) {
275 return Standard_False;
277 Handle(Standard_Type) TheType = Caux->DynamicType();
278 if ((TheType == STANDARD_TYPE(Geom_BSplineCurve)) ||
279 (TheType == STANDARD_TYPE(Geom_BezierCurve))) {
281 C = Handle(Geom_Curve)::DownCast(Caux->Copy());
282 return Standard_True;
284 return Standard_False;
289 Standard_Real TolPar = Tol *.1;
291 if(C->IsPeriodic()) {
292 Standard_Real p = C->Period();
293 Standard_Real d = Abs(l - f);
294 if(Abs(d - p) <= TolPar && l <= p) {}
296 C = new Geom_TrimmedCurve(C, f, l);
299 C = new Geom_TrimmedCurve(C, f, l);
301 //modif WOK++ portage hp (fbi du 14/03/97)
303 // gp_Trsf trsf = L.Transformation();
305 // C = GeomConvert::CurveToBSplineCurve(C,Convert_QuasiAngular);
307 C = GeomConvert::CurveToBSplineCurve(C);
309 Standard_Real fnew = C->FirstParameter(), lnew = C->LastParameter(), UTol;
311 Handle(Geom_BSplineCurve) BC = Handle(Geom_BSplineCurve)::DownCast(C) ;
313 if(!BC->IsPeriodic()) {
314 BC->Resolution(Tol, UTol) ;
315 if(Abs(f - fnew) > UTol || Abs(l - lnew) > UTol) {
316 TColStd_Array1OfReal knots(1,BC->NbKnots()) ;
318 BSplCLib::Reparametrize(f, l, knots) ;
319 BC->SetKnots(knots) ;
323 if(!myMap.Contains(Caux)) {
326 return Standard_True ;
329 //=======================================================================
330 //function : NewPoint
332 //=======================================================================
334 Standard_Boolean BRepTools_NurbsConvertModification_21423::NewPoint
335 //(const TopoDS_Vertex& V,
336 (const TopoDS_Vertex& ,
339 // Standard_Real& Tol)
342 return Standard_False;
346 //=======================================================================
347 //function : NewCurve2d
349 //=======================================================================
351 Standard_Boolean BRepTools_NurbsConvertModification_21423::NewCurve2d
352 (const TopoDS_Edge& E,
353 const TopoDS_Face& F,
354 const TopoDS_Edge& newE,
355 const TopoDS_Face& newF,
356 Handle(Geom2d_Curve)& Curve2d,
359 ////modified by jgv, 17.11.11 for SALOME only, bug 21423////
360 Tol = BRep_Tool::Tolerance(E);
361 BRepAdaptor_Surface BAsurf(F);
362 if (BAsurf.GetType() == GeomAbs_Sphere)
363 Tol = Max(Max(BRep_Tool::Tolerance(E),BRep_Tool::Tolerance(F)),
364 Max(BRep_Tool::Tolerance(newE),BRep_Tool::Tolerance(newF))
366 ////////////////////////////////////////////////////////////
368 Standard_Real f2d,l2d;
369 Handle(Geom2d_Curve) C2d = BRep_Tool::CurveOnSurface(E,F,f2d,l2d);
370 Standard_Real f3d,l3d;
372 Handle(Geom_Curve) C3d = BRep_Tool::Curve(E, Loc, f3d,l3d);
373 Standard_Boolean isConvert2d = ((!C3d.IsNull() && !C3d->IsKind(STANDARD_TYPE(Geom_BSplineCurve)) &&
374 !C3d->IsKind(STANDARD_TYPE(Geom_BezierCurve))) ||
377 if(BRep_Tool::Degenerated(E)) {
379 if(!C2d->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve)))
381 Handle(Geom2d_TrimmedCurve) aTrimC = new Geom2d_TrimmedCurve(C2d,f2d,l2d);
384 Curve2d = Geom2dConvert::CurveToBSplineCurve(C2d);
385 return Standard_True;
387 if(!BRepTools::IsReallyClosed(E,F)) {
388 Handle(Standard_Type) TheTypeC2d = C2d->DynamicType();
390 if(TheTypeC2d == STANDARD_TYPE(Geom2d_TrimmedCurve)) {
391 Handle(Geom2d_TrimmedCurve) TC = Handle(Geom2d_TrimmedCurve)::DownCast(C2d);
392 C2d = TC->BasisCurve();
395 Standard_Real fc = C2d->FirstParameter(), lc = C2d->LastParameter();
397 if(!C2d->IsPeriodic()) {
398 if(fc - f2d > Precision::PConfusion()) f2d = fc;
399 if(l2d - lc > Precision::PConfusion()) l2d = lc;
402 C2d = new Geom2d_TrimmedCurve(C2d, f2d, l2d);
404 Geom2dAdaptor_Curve G2dAC(C2d, f2d, l2d);
405 Handle(Geom2dAdaptor_HCurve) G2dAHC = new Geom2dAdaptor_HCurve(G2dAC);
408 Handle(Geom_Curve) C3d = BRep_Tool::Curve(E, Loc, f3d,l3d);
410 C3d = BRep_Tool::Curve(newE, f3d, l3d);
413 C3d = BRep_Tool::Curve(E,f3d,l3d);
415 GeomAdaptor_Curve G3dAC(C3d, f3d, l3d);
416 Handle(GeomAdaptor_HCurve) G3dAHC = new GeomAdaptor_HCurve(G3dAC);
418 Standard_Real Uinf, Usup, Vinf, Vsup, u = 0, v = 0;
419 Handle(Geom_Surface) S = BRep_Tool::Surface(F);
420 Handle(Standard_Type) myT = S->DynamicType();
421 if(myT != STANDARD_TYPE(Geom_Plane)) {
423 Handle(Standard_Type) st = C2d->DynamicType();
424 if ((st == STANDARD_TYPE(Geom2d_BSplineCurve)) ||
425 (st == STANDARD_TYPE(Geom2d_BezierCurve))) {
427 Curve2d = Handle(Geom2d_Curve)::DownCast(C2d->Copy());
428 return Standard_True;
430 return Standard_False;
434 S = BRep_Tool::Surface(newF);
437 S->Bounds(Uinf, Usup, Vinf, Vsup);
438 Uinf -= 1e-9; Usup += 1e-9; Vinf -= 1e-9; Vsup += 1e-9;
439 u = (Usup - Uinf)*0.1;
440 v = (Vsup - Vinf)*0.1;
441 if(S->IsUPeriodic()) {
442 Standard_Real uperiod = S->UPeriod();
443 if(uperiod < (Usup+2*u-Uinf)) {
444 if(uperiod <= (Usup-Uinf)) {
448 u = (uperiod-(Usup-Uinf))*0.5;
452 if(S->IsVPeriodic()) {
453 Standard_Real vperiod = S->VPeriod();
454 if(vperiod < (Vsup+2*v-Vinf)) {
455 if(vperiod <= (Vsup-Vinf)) {
459 v = (vperiod-(Vsup-Vinf))*0.5;
465 S = BRep_Tool::Surface(F);// Si S est un plan, pas de changement de parametrisation
466 GeomAdaptor_Surface GAS(S);
467 Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(GAS);
468 ProjLib_ComputeApprox ProjOnCurve(G3dAHC,GAHS,Tol);
469 if(ProjOnCurve.BSpline().IsNull()) {
470 Curve2d = Geom2dConvert::CurveToBSplineCurve(ProjOnCurve.Bezier());
471 return Standard_True;
473 Curve2d = ProjOnCurve.BSpline();
474 return Standard_True;
476 GeomAdaptor_Surface GAS(S,Uinf-u,Usup+u,Vinf-v,Vsup+v);
478 Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(GAS);
480 ProjLib_ComputeApproxOnPolarSurface ProjOnCurve(G2dAHC,G3dAHC,GAHS,Tol);
482 if(ProjOnCurve.IsDone()) {
483 Curve2d = ProjOnCurve.BSpline();
485 return Standard_True;
488 Curve2d = Geom2dConvert::CurveToBSplineCurve(C2d);
489 return Standard_True;
493 TopTools_ListIteratorOfListOfShape itled;
494 TColStd_ListIteratorOfListOfTransient itlcu;
496 for (itled.Initialize(myled), itlcu.Initialize(mylcu);
497 itled.More(); // itlcu.More()
498 itled.Next(),itlcu.Next()) {
499 if (itled.Value().IsSame(E)) {
504 if (!itled.More()) { // on stocke l`edge et la curve2d
505 Handle(Geom2d_Curve) C2dBis;
506 Standard_Real f3d,l3d,f2dBis,l2dBis;
507 C2d = new Geom2d_TrimmedCurve(C2d, f2d, l2d);
508 Geom2dAdaptor_Curve G2dAC(C2d, f2d, l2d);
509 Handle(Geom2dAdaptor_HCurve) G2dAHC = new Geom2dAdaptor_HCurve(G2dAC);
510 TopoDS_Edge ERevers = E;
512 // TopoDS_Edge ERevers = TopoDS::Edge(E.Reversed());
513 C2dBis = BRep_Tool::CurveOnSurface(ERevers,F,f2dBis,l2dBis);
514 Handle(Standard_Type) TheTypeC2dBis = C2dBis->DynamicType();
515 C2dBis = new Geom2d_TrimmedCurve(C2dBis,f2dBis, l2dBis);
516 Geom2dAdaptor_Curve G2dACBis(C2dBis, f2dBis, l2dBis);
517 Handle(Geom2dAdaptor_HCurve) G2dAHCBis = new Geom2dAdaptor_HCurve(G2dACBis);
520 Handle(Geom_Curve) C3d = BRep_Tool::Curve(E, f3d,l3d);
523 Curve2d = Handle(Geom2d_Curve)::DownCast(C2d->Copy());
524 return Standard_True;
527 return Standard_False;
530 C3d = BRep_Tool::Curve(newE, f3d,l3d);
532 GeomAdaptor_Curve G3dAC(C3d, f3d, l3d);
533 Handle(GeomAdaptor_HCurve) G3dAHC = new GeomAdaptor_HCurve(G3dAC);
535 Handle(Geom_Surface) S = BRep_Tool::Surface(F);
536 Handle(Standard_Type) myT = S->DynamicType();
538 mylcu.Append(C2dBis);
539 Handle(Standard_Type) st = C2d->DynamicType();
540 if ((st == STANDARD_TYPE(Geom2d_BSplineCurve)) ||
541 (st == STANDARD_TYPE(Geom2d_BezierCurve))) {
543 Curve2d = Handle(Geom2d_Curve)::DownCast(C2d->Copy());
544 return Standard_True;
546 return Standard_False;
550 S = BRep_Tool::Surface(newF);// S est une BSplineSurface : pas besoin de la trimmed
552 Standard_Real Uinf, Usup, Vinf, Vsup, u = 0, v = 0;
553 S->Bounds(Uinf, Usup, Vinf, Vsup);
554 Uinf -= 1e-9; Usup += 1e-9; Vinf -= 1e-9; Vsup += 1e-9;
555 u = (Usup - Uinf)*0.1;
556 v = (Vsup - Vinf)*0.1;
557 if(S->IsUPeriodic()) {
558 Standard_Real uperiod = S->UPeriod();
559 if(uperiod < (Usup+2*u-Uinf))
560 if(uperiod <= (Usup-Uinf))
563 u = (uperiod-(Usup-Uinf))*0.5;
565 if(S->IsVPeriodic()) {
566 Standard_Real vperiod = S->VPeriod();
567 if(vperiod < (Vsup+2*v-Vinf))
568 if(vperiod <= (Vsup-Vinf))
571 v = (vperiod-(Vsup-Vinf))*0.5;
573 GeomAdaptor_Surface GAS(S, Uinf-u,Usup+u,Vinf-v,Vsup+v);
574 Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(GAS);
577 ProjLib_ComputeApproxOnPolarSurface
578 ProjOnCurve(G2dAHC,G2dAHCBis,G3dAHC,GAHS,Tol);
580 if(ProjOnCurve.IsDone()) {
581 Curve2d = ProjOnCurve.BSpline();
582 mylcu.Append(ProjOnCurve.Curve2d());
583 return Standard_True;
586 Curve2d = Geom2dConvert::CurveToBSplineCurve(C2d);
587 mylcu.Append(C2dBis);
588 return Standard_True;
591 else { // on est au 2ieme tour
592 C2d = Handle(Geom2d_Curve)::DownCast(itlcu.Value());
593 Handle(Standard_Type) st = C2d->DynamicType();
594 if (!(st == STANDARD_TYPE(Geom2d_BSplineCurve)) &&
595 !(st == STANDARD_TYPE(Geom2d_BezierCurve))) {
596 return Standard_False;
598 Curve2d = Geom2dConvert::CurveToBSplineCurve(C2d);
599 return Standard_True;
603 return Standard_True;
606 //=======================================================================
607 //function : NewParameter
609 //=======================================================================
611 Standard_Boolean BRepTools_NurbsConvertModification_21423::NewParameter
612 (const TopoDS_Vertex& V,
613 const TopoDS_Edge& E,
617 if(BRep_Tool::Degenerated(E))
618 return Standard_False;
619 Standard_Real f, l, param = BRep_Tool::Parameter(V,E);
622 Handle(Geom_Curve) gc = BRep_Tool::Curve(E, L, f, l);
623 if(!myMap.Contains(gc))
624 return Standard_False;
626 Handle(Geom_BSplineCurve) gcc =
627 Handle(Geom_BSplineCurve)::DownCast(myMap.FindFromKey(gc));
629 gcc = Handle(Geom_BSplineCurve)::DownCast(gcc->Transformed(L.Transformation()));
631 GeomAdaptor_Curve ac(gcc);
632 gp_Pnt pnt = BRep_Tool::Pnt(V);
634 Extrema_LocateExtPC proj(pnt, ac, param, f, l, Tol);
636 Standard_Real Dist2Min = proj.SquareDistance();
637 if (Dist2Min < Tol*Tol) {
638 // Standard_Real U_final_point,V_final_point;
639 P = proj.Point().Parameter();
640 return Standard_True;
643 return Standard_False;
646 //=======================================================================
647 //function : Continuity
649 //=======================================================================
651 GeomAbs_Shape BRepTools_NurbsConvertModification_21423::Continuity
652 (const TopoDS_Edge& E,
653 const TopoDS_Face& F1,
654 const TopoDS_Face& F2,
659 return BRep_Tool::Continuity(E,F1,F2);