1 // File: BRepBlend_RstRstConstRad.cxx
2 // Created: Mon Feb 10 10:32:10 1997
3 // Author: Laurent BOURESCHE
4 // Author: Jacques GOUSSARD
5 // <lbo@pomalox.paris1.matra-dtv.fr>
6 // Modif : jlr le 28/07/97 modif de section pour Edge/Face
7 // modif de set (courbe bornee)
8 #include <BRepBlend_RstRstConstRad.ixx>
9 #include <math_Gauss.hxx>
10 #include <math_SVD.hxx>
14 #include <BlendFunc.hxx>
15 #include <GeomFill.hxx>
16 #include <Standard_DomainError.hxx>
17 #include <Standard_NotImplemented.hxx>
18 #include <Precision.hxx>
22 static void t3dto2d(Standard_Real& a,
28 Standard_Real AB = A.Dot(B);
29 Standard_Real AC = A.Dot(C);
30 Standard_Real BC = B.Dot(C);
31 Standard_Real BB = B.Dot(B);
32 Standard_Real CC = C.Dot(C);
33 Standard_Real deno = (BB*CC-BC*BC);
34 a = (AB*CC-AC*BC)/deno;
35 b = (AC*BB-AB*BC)/deno;
38 //=======================================================================
39 //function : BRepBlend_RstRstConstRad
41 //=======================================================================
43 BRepBlend_RstRstConstRad::BRepBlend_RstRstConstRad
44 (const Handle(Adaptor3d_HSurface)& Surf1,
45 const Handle(Adaptor2d_HCurve2d)& Rst1,
46 const Handle(Adaptor3d_HSurface)& Surf2,
47 const Handle(Adaptor2d_HCurve2d)& Rst2,
48 const Handle(Adaptor3d_HCurve)& CGuide):
49 surf1(Surf1), surf2(Surf2), rst1(Rst1), rst2(Rst2),
50 cons1(Rst1, Surf1), cons2(Rst2, Surf2),
51 guide(CGuide), tguide(CGuide),
52 istangent(Standard_True), maxang(RealFirst()), minang(RealLast()),
54 mySShape(BlendFunc_Rational)
57 //=======================================================================
58 //function : NbVariables
60 //=======================================================================
62 Standard_Integer BRepBlend_RstRstConstRad::NbVariables() const
67 //=======================================================================
68 //function : NbEquations
70 //=======================================================================
72 Standard_Integer BRepBlend_RstRstConstRad::NbEquations() const
77 //=======================================================================
80 //=======================================================================
82 Standard_Boolean BRepBlend_RstRstConstRad::Value(const math_Vector& X,
85 ptrst1 = cons1.Value(X(1));
86 ptrst2 = cons2.Value(X(2));
88 F(1) = nplan.XYZ().Dot(ptrst1.XYZ()) + theD;
89 F(2) = nplan.XYZ().Dot(ptrst2.XYZ()) + theD;
94 //=======================================================================
95 //function : Derivatives
97 //=======================================================================
99 Standard_Boolean BRepBlend_RstRstConstRad::Derivatives(const math_Vector& X,
104 cons1.D1(X(1), ptrst1, d11);
105 cons2.D1(X(2), ptrst2, d21);
107 D(1,1) = nplan.Dot(d11);
111 D(2,2) = nplan.Dot(d21);
113 return Standard_True;
116 //=======================================================================
119 //=======================================================================
121 Standard_Boolean BRepBlend_RstRstConstRad::Values(const math_Vector& X,
125 Standard_Boolean Error;
128 Error = Derivatives(X, D);
130 return Standard_True;
133 //=======================================================================
136 //=======================================================================
138 void BRepBlend_RstRstConstRad::Set(const Handle(Adaptor3d_HSurface)& SurfRef1,
139 const Handle(Adaptor2d_HCurve2d)& RstRef1,
140 const Handle(Adaptor3d_HSurface)& SurfRef2,
141 const Handle(Adaptor2d_HCurve2d)& RstRef2)
149 //=======================================================================
152 //=======================================================================
154 void BRepBlend_RstRstConstRad::Set(const Standard_Real Param)
156 tguide->D2(Param, ptgui, d1gui, d2gui);
157 normtg = d1gui.Magnitude();
158 nplan = d1gui.Normalized();
159 theD = - (nplan.XYZ().Dot(ptgui.XYZ()));
162 //=======================================================================
165 //=======================================================================
167 void BRepBlend_RstRstConstRad::Set(const Standard_Real First,
168 const Standard_Real Last)
170 tguide = guide->Trim(First, Last, 1.e-12);
173 //=======================================================================
174 //function : GetTolerance
176 //=======================================================================
178 void BRepBlend_RstRstConstRad::GetTolerance(math_Vector& Tolerance,
179 const Standard_Real Tol) const
181 Tolerance(1) = cons1.Resolution(Tol);
182 Tolerance(2) = cons2.Resolution(Tol);
185 //=======================================================================
186 //function : GetBounds
188 //=======================================================================
190 void BRepBlend_RstRstConstRad::GetBounds(math_Vector& InfBound,
191 math_Vector& SupBound) const
193 InfBound(1) = cons1.FirstParameter();
194 InfBound(2) = cons2.FirstParameter();
195 SupBound(1) = cons1.LastParameter();
196 SupBound(2) = cons2.LastParameter();
200 //=======================================================================
201 //function : IsSolution
203 //=======================================================================
205 Standard_Boolean BRepBlend_RstRstConstRad::IsSolution(const math_Vector& Sol,
206 const Standard_Real Tol)
210 math_Vector valsol(1, 2), secmember(1, 2);
211 math_Matrix gradsol(1, 2, 1, 2);
213 gp_Vec dnplan, d1urst1, d1vrst1, d1urst2, d1vrst2, d11, d21, temp;
216 Standard_Real Cosa, Sina, Angle;
218 Values(Sol, valsol, gradsol);
220 if (Abs(valsol(1)) <= Tol &&
221 Abs(valsol(2)) <= Tol ) {
223 // Calculation of tangents
225 pt2drst1 = rst1->Value(prmrst1);
227 pt2drst2 = rst2->Value(prmrst2);
229 cons1.D1(Sol(1), ptrst1, d11);
230 cons2.D1(Sol(2), ptrst2, d21);
232 dnplan.SetLinearForm(1./normtg, d2gui,
233 -1./normtg * (nplan.Dot(d2gui)), nplan);
235 temp.SetXYZ(ptrst1.XYZ() - ptgui.XYZ());
236 secmember(1) = normtg - dnplan.Dot(temp);
238 temp.SetXYZ(ptrst2.XYZ() - ptgui.XYZ());
239 secmember(2) = normtg - dnplan.Dot(temp);
241 math_Gauss Resol(gradsol);
243 if (Resol.IsDone()) {
244 Resol.Solve(secmember);
245 istangent = Standard_False;
248 math_SVD SingRS (gradsol);
249 if (SingRS.IsDone()) {
250 math_Vector DEDT(1,3);
252 SingRS.Solve(DEDT, secmember, 1.e-6);
253 istangent = Standard_False;
255 else istangent = Standard_True;
260 tgrst1 = secmember(1) * d11;
261 tgrst2 = secmember(2) * d21;
264 surf1->D1(pt2drst1.X(), pt2drst1.Y(), bid, d1urst1, d1vrst1);
265 t3dto2d(a, b, tgrst1, d1urst1, d1vrst1);
266 tg2drst1.SetCoord(a, b);
267 surf2->D1(pt2drst2.X(), pt2drst2.Y(), bid, d1urst2, d1vrst2);
268 t3dto2d(a, b, tgrst1, d1urst2, d1vrst2);
269 tg2drst2.SetCoord(a, b);
274 Standard_Boolean IsCenter;
276 IsCenter = CenterCircleRst1Rst2(ptrst1, ptrst2, nplan, Center, NotUsed);
278 if (!IsCenter) return Standard_False;
280 gp_Vec n1(Center, ptrst1) , n2(Center, ptrst2);
286 Sina = nplan.Dot(n1.Crossed(n2));
289 Sina = -Sina; //nplan is changed into -nplan
294 Angle = 2.*PI - Angle;
297 if (Angle > maxang) {maxang = Angle;}
298 if (Angle < minang) {minang = Angle;}
299 distmin = Min( distmin, ptrst1.Distance(ptrst2));
301 return Standard_True;
303 istangent = Standard_True;
304 return Standard_False;
307 //=======================================================================
308 //function : GetMinimalDistance
310 //=======================================================================
312 Standard_Real BRepBlend_RstRstConstRad::GetMinimalDistance() const
317 //=======================================================================
318 //function : PointOnRst1
320 //=======================================================================
322 const gp_Pnt& BRepBlend_RstRstConstRad::PointOnRst1() const
327 //=======================================================================
328 //function : PointOnRst2
330 //=======================================================================
332 const gp_Pnt& BRepBlend_RstRstConstRad::PointOnRst2() const
337 //=======================================================================
338 //function : Pnt2dOnRst1
340 //=======================================================================
342 const gp_Pnt2d& BRepBlend_RstRstConstRad::Pnt2dOnRst1() const
347 //=======================================================================
348 //function : Pnt2dOnRst2
350 //=======================================================================
352 const gp_Pnt2d& BRepBlend_RstRstConstRad::Pnt2dOnRst2() const
357 //=======================================================================
358 //function : ParameterOnRst1
360 //=======================================================================
362 Standard_Real BRepBlend_RstRstConstRad::ParameterOnRst1() const
367 //=======================================================================
368 //function : ParameterOnRst2
370 //=======================================================================
372 Standard_Real BRepBlend_RstRstConstRad::ParameterOnRst2() const
376 //=======================================================================
377 //function : IsTangencyPoint
379 //=======================================================================
381 Standard_Boolean BRepBlend_RstRstConstRad::IsTangencyPoint() const
386 //=======================================================================
387 //function : TangentOnRst1
389 //=======================================================================
391 const gp_Vec& BRepBlend_RstRstConstRad::TangentOnRst1() const
393 if (istangent) {Standard_DomainError::Raise();}
397 //=======================================================================
398 //function : Tangent2dOnRst1
400 //=======================================================================
402 const gp_Vec2d& BRepBlend_RstRstConstRad::Tangent2dOnRst1() const
404 if (istangent) {Standard_DomainError::Raise();}
408 //=======================================================================
409 //function : TangentOnRst2
411 //=======================================================================
413 const gp_Vec& BRepBlend_RstRstConstRad::TangentOnRst2() const
415 if (istangent) {Standard_DomainError::Raise();}
419 //=======================================================================
420 //function : Tangent2dOnRst2
422 //=======================================================================
424 const gp_Vec2d& BRepBlend_RstRstConstRad::Tangent2dOnRst2() const
426 if (istangent) {Standard_DomainError::Raise();}
430 //=======================================================================
433 //=======================================================================
435 Blend_DecrochStatus BRepBlend_RstRstConstRad::Decroch(const math_Vector& Sol,
441 gp_Vec NRst1InPlane, NRst2InPlane;
442 gp_Pnt PtTmp1, PtTmp2, Center;
443 gp_Vec d1u, d1v, centptrst, NotUsed;
444 Standard_Real norm, unsurnorm;
447 rstref1->Value(Sol(1)).Coord(u, v);
448 surfref1->D1(u, v,PtTmp1,d1u,d1v);
449 // Normal to the reference surface 1
450 NRst1 = d1u.Crossed(d1v);
451 rstref2->Value(Sol(2)).Coord(u, v);
452 surfref2->D1(u, v, PtTmp2, d1u, d1v);
453 // Normal to the reference surface 2
454 NRst2 = d1u.Crossed(d1v);
456 Standard_Boolean IsCenter;
458 IsCenter = CenterCircleRst1Rst2(PtTmp1, PtTmp2, nplan, Center, NotUsed);
460 norm = nplan.Crossed(NRst1).Magnitude();
461 unsurnorm = 1. / norm;
463 NRst1InPlane.SetLinearForm(nplan.Dot(NRst1) * unsurnorm, nplan, -unsurnorm, NRst1);
465 centptrst.SetXYZ(PtTmp1.XYZ() - Center.XYZ());
467 if (centptrst.Dot(NRst1InPlane) < 0.) NRst1InPlane.Reverse();
469 TgRst1 = nplan.Crossed(centptrst);
471 norm = nplan.Crossed(NRst2).Magnitude();
472 unsurnorm = 1./ norm;
473 NRst2InPlane.SetLinearForm(nplan.Dot(NRst2) * unsurnorm, nplan, -unsurnorm, NRst2);
474 centptrst.SetXYZ(PtTmp2.XYZ() - Center.XYZ());
477 if (centptrst.Dot(NRst2InPlane) < 0.) NRst2InPlane.Reverse();
479 TgRst2 = nplan.Crossed(centptrst);
486 // The vectors are returned
487 if (NRst1InPlane.Dot(TgRst1) > -1.e-10) {
488 if (NRst2InPlane.Dot(TgRst2) < 1.e-10) {
489 return Blend_DecrochBoth;
492 return Blend_DecrochRst1;
496 if (NRst2InPlane.Dot(TgRst2) < 1.e-10) {
497 return Blend_DecrochRst2;
500 return Blend_NoDecroch;
506 //=======================================================================
509 //=======================================================================
511 void BRepBlend_RstRstConstRad::Set(const Standard_Real Radius,
512 const Standard_Integer Choix)
519 //=======================================================================
522 //=======================================================================
524 void BRepBlend_RstRstConstRad::Set(const BlendFunc_SectionShape TypeSection)
526 mySShape = TypeSection;
531 //=======================================================================
532 //function : CenterCircleRst1Rst2
533 //purpose : Calculate the center of the circle passing by two points of restrictions
534 //=======================================================================
535 Standard_Boolean BRepBlend_RstRstConstRad::CenterCircleRst1Rst2(const gp_Pnt& PtRst1,
536 const gp_Pnt& PtRst2,
542 gp_Vec rst1rst2(PtRst1, PtRst2);
543 gp_Vec vdmedNor; //,NRst1; vdmedNor directong vector of the perpendicular bisector
545 Standard_Real Dist;// distance between the middle of PtRst1,PtRst2 and Center
547 // Calculate the center of the circle
548 VdMed = rst1rst2.Crossed(np);
549 norm2 = rst1rst2.SquareMagnitude();
550 Dist = ray * ray - 0.25 * norm2;
556 if (Dist < - 1.E-07) return Standard_False;
560 vdmedNor = VdMed.Normalized();
561 Center.SetXYZ(0.5 * rst1rst2.XYZ() + PtRst1.XYZ() + Dist * vdmedNor.XYZ());
565 Center.SetXYZ(0.5 * rst1rst2.XYZ() + PtRst1.XYZ());
568 return Standard_True;
577 //=======================================================================
580 //=======================================================================
582 void BRepBlend_RstRstConstRad::Section(const Standard_Real Param,
583 const Standard_Real U,
584 const Standard_Real V,
589 gp_Vec ns, np, NotUsed;
592 tguide->D1(Param, ptgui, d1gui);
593 np = d1gui.Normalized();
594 ptrst1 = cons1.Value(U);
595 ptrst2 = cons2.Value(V);
597 Standard_Boolean IsCenter;
599 IsCenter = CenterCircleRst1Rst2(ptrst1, ptrst2, np, Center, NotUsed);
601 C.SetRadius(Abs(ray));
602 ns = gp_Vec(Center, ptrst1).Normalized();
608 C.SetPosition(gp_Ax2(Center, np, ns));
609 Pdeb = 0; //ElCLib::Parameter(C, pts);
610 Pfin = ElCLib::Parameter(C, ptrst2);
612 // Test of angles negative and almost null : Special Case
613 if (Pfin > 1.5 * PI) {
615 C.SetPosition(gp_Ax2(Center, np, ns));
616 Pfin = ElCLib::Parameter(C, ptrst2);
618 if (Pfin < Precision::PConfusion()) Pfin += Precision::PConfusion();
621 //=======================================================================
622 //function : IsRational
624 //=======================================================================
626 Standard_Boolean BRepBlend_RstRstConstRad::IsRational () const
628 return (mySShape==BlendFunc_Rational || mySShape==BlendFunc_QuasiAngular);
631 //=======================================================================
632 //function : GetSectionSize
634 //=======================================================================
636 Standard_Real BRepBlend_RstRstConstRad::GetSectionSize() const
638 return maxang * Abs(ray);
641 //=======================================================================
642 //function : GetMinimalWeight
644 //=======================================================================
646 void BRepBlend_RstRstConstRad::GetMinimalWeight(TColStd_Array1OfReal& Weights) const
648 BlendFunc::GetMinimalWeights(mySShape, myTConv, minang, maxang, Weights );
649 // It is supposed that it does not depend on the Radius!
652 //=======================================================================
653 //function : NbIntervals
655 //=======================================================================
657 Standard_Integer BRepBlend_RstRstConstRad::NbIntervals (const GeomAbs_Shape S) const
659 return guide->NbIntervals(BlendFunc::NextShape(S));
662 //=======================================================================
663 //function : Intervals
665 //=======================================================================
667 void BRepBlend_RstRstConstRad::Intervals (TColStd_Array1OfReal& T,
668 const GeomAbs_Shape S) const
670 guide->Intervals(T, BlendFunc::NextShape(S));
673 //=======================================================================
674 //function : GetShape
676 //=======================================================================
678 void BRepBlend_RstRstConstRad::GetShape (Standard_Integer& NbPoles,
679 Standard_Integer& NbKnots,
680 Standard_Integer& Degree,
681 Standard_Integer& NbPoles2d)
684 BlendFunc::GetShape(mySShape, maxang, NbPoles, NbKnots, Degree, myTConv);
687 //=======================================================================
688 //function : GetTolerance
689 //purpose : Determine Tolerances to be used in approximations.
690 //=======================================================================
692 void BRepBlend_RstRstConstRad::GetTolerance(const Standard_Real BoundTol,
693 const Standard_Real SurfTol,
694 const Standard_Real AngleTol,
696 math_Vector& Tol1d) const
698 Standard_Integer low = Tol3d.Lower(), up = Tol3d.Upper();
700 Tol= GeomFill::GetTolerance(myTConv, minang, Abs(ray),
704 Tol3d(low+1) = Tol3d(up-1) = Min(Tol, SurfTol);
705 Tol3d(low) = Tol3d(up) = Min(Tol, BoundTol);
708 //=======================================================================
711 //=======================================================================
713 void BRepBlend_RstRstConstRad::Knots(TColStd_Array1OfReal& TKnots)
715 GeomFill::Knots(myTConv, TKnots);
718 //=======================================================================
721 //=======================================================================
723 void BRepBlend_RstRstConstRad::Mults(TColStd_Array1OfInteger& TMults)
725 GeomFill::Mults(myTConv, TMults);
728 //=======================================================================
731 //=======================================================================
733 void BRepBlend_RstRstConstRad::Section(const Blend_Point& P,
734 TColgp_Array1OfPnt& Poles,
735 TColgp_Array1OfPnt2d& Poles2d,
736 TColStd_Array1OfReal& Weights)
738 gp_Vec ns, ns2, NotUsed;
742 Standard_Real prm = P.Parameter();
743 Standard_Integer low = Poles.Lower();
744 Standard_Integer upp = Poles.Upper();
746 tguide->D1(prm,ptgui, d1gui);
747 nplan = d1gui.Normalized();
749 u = P.ParameterOnC1();
750 v = P.ParameterOnC2();
752 gp_Pnt2d pt2d1 = rst1->Value(u);
753 gp_Pnt2d pt2d2 = rst2->Value(v);
755 ptrst1 = cons1.Value(u);
756 ptrst2 = cons2.Value(v);
757 distmin = Min (distmin, ptrst1.Distance(ptrst2));
759 Poles2d(Poles2d.Lower()).SetCoord(pt2d1.X(),pt2d1.Y());
760 Poles2d(Poles2d.Upper()).SetCoord(pt2d2.X(),pt2d2.Y());
763 if (mySShape == BlendFunc_Linear) {
771 // Calculate the center of the circle
772 Standard_Boolean IsCenter;
773 IsCenter = CenterCircleRst1Rst2(ptrst1, ptrst2, nplan, Center, NotUsed);
775 // normals to the section with points
776 ns = gp_Vec(Center, ptrst1).Normalized();
777 ns2 = gp_Vec(Center, ptrst2).Normalized();
783 GeomFill::GetCircle(myTConv,
785 nplan, ptrst1, ptrst2,
790 //=======================================================================
793 //=======================================================================
795 Standard_Boolean BRepBlend_RstRstConstRad::Section(const Blend_Point& P,
796 TColgp_Array1OfPnt& Poles,
797 TColgp_Array1OfVec& DPoles,
798 TColgp_Array1OfPnt2d& Poles2d,
799 TColgp_Array1OfVec2d& DPoles2d,
800 TColStd_Array1OfReal& Weights,
801 TColStd_Array1OfReal& DWeights)
805 gp_Vec dnplan, d1n1, d1n2;//,np2, dnp2;
807 gp_Vec d1urst, d1vrst;
808 gp_Pnt Center, NotUsed;
810 Standard_Real norm2, normmed, Dist;
812 math_Vector sol(1, 2), valsol(1, 2), secmember(1, 2);
813 math_Matrix gradsol(1, 2, 1, 2);
815 Standard_Real prm = P.Parameter();
817 Standard_Integer NbSpan = (Poles.Length() - 1) / 2;
819 Standard_Integer low = Poles.Lower();
820 Standard_Integer upp = Poles.Upper();
821 Standard_Boolean istgt;
823 tguide->D2(prm, ptgui, d1gui, d2gui);
824 normtg = d1gui.Magnitude();
825 nplan = d1gui.Normalized();
826 dnplan.SetLinearForm(1./normtg, d2gui,
827 -1./normtg * (nplan.Dot(d2gui)), nplan);
829 sol(1) = prmrst1 = P.ParameterOnC1();
830 sol(2) = prmrst2 = P.ParameterOnC2();
831 pt2drst1 = rst1->Value(prmrst1);
832 pt2drst2 = rst2->Value(prmrst2);
834 Values(sol, valsol, gradsol);
836 cons1.D1(sol(1), ptrst1, d11);
837 cons2.D1(sol(2), ptrst2, d21);
839 temp.SetXYZ(ptrst1.XYZ() - ptgui.XYZ());
840 secmember(1) = normtg - dnplan.Dot(temp);
842 temp.SetXYZ(ptrst2.XYZ() - ptgui.XYZ());
843 secmember(2) = normtg - dnplan.Dot(temp);
845 math_Gauss Resol(gradsol, 1.e-9);
847 if (Resol.IsDone()) {
848 istgt = Standard_False;
849 Resol.Solve(secmember);
852 math_SVD SingRS (gradsol);
853 if (SingRS.IsDone()) {
854 math_Vector DEDT(1,2);
856 SingRS.Solve(DEDT, secmember, 1.e-6);
857 istgt = Standard_False;
859 else istgt = Standard_True;
863 gp_Vec rst1rst2(ptrst1, ptrst2);
864 Standard_Boolean IsCenter;
866 IsCenter = CenterCircleRst1Rst2(ptrst1, ptrst2, nplan, Center, med);
867 if (!IsCenter) return Standard_False;
869 normmed = med.Magnitude();
871 gp_Vec n1(Center, ptrst1), n2(Center, ptrst2);
876 // secmember contains derivatives of parameters on curves
878 tgrst1 = secmember(1) * d11;
879 tgrst2 = secmember(2) * d21;
883 norm2 = rst1rst2.SquareMagnitude();
884 d1rst1rst2 = tgrst2 - tgrst1;
885 Dist = ray * ray - 0.25 * norm2;
888 gp_Vec d1P1P2CrosNp, dmed;
889 d1P1P2CrosNp = d1rst1rst2.Crossed(nplan) + rst1rst2.Crossed(dnplan);
890 // derivative of the perpendicular bisector
891 dmed = d1P1P2CrosNp - med.Dot(d1P1P2CrosNp) * med;
894 Standard_Real d1Dist = - (0.25 / Dist) * rst1rst2.Dot(d1rst1rst2);
900 // the derivative of coefficient Dist is located in dmed
901 dmed.SetLinearForm(Dist, dmed, d1Dist, med);
903 // derivative of the Normal to the curve in P1
904 d1n1 = - (dmed + d1rst1rst2) / ray;
906 // derivative of the Normal to the curve in P2
907 d1n2 = (d1rst1rst2 - dmed) / ray;
911 // Normal to the curve in P1
912 d1n1 = - d1rst1rst2 / ray;
914 // Normal to the curve in P2
915 d1n2 = d1rst1rst2 / ray;
921 Poles2d(Poles2d.Lower()).SetCoord(pt2drst1.X(), pt2drst1.Y());
922 Poles2d(Poles2d.Upper()).SetCoord(pt2drst2.X(), pt2drst2.Y());
925 surf1->D1(pt2drst1.X(), pt2drst1.Y(), NotUsed, d1urst, d1vrst);
926 t3dto2d(a,b,tgrst1, d1urst, d1vrst);
927 DPoles2d(Poles2d.Lower()).SetCoord(a, b);
929 surf2->D1(pt2drst2.X(), pt2drst2.Y(), NotUsed, d1urst, d1vrst);
930 t3dto2d(a, b, tgrst2, d1urst, d1vrst);
931 DPoles2d(Poles2d.Upper()).SetCoord(a, b);
935 if (mySShape == BlendFunc_Linear) {
941 DPoles(low) = tgrst1;
942 DPoles(upp) = tgrst2;
949 // Case of the circle
950 // tangent to the center of the circle
952 tgct.SetLinearForm(-ray, d1n1, tgrst1);
962 return GeomFill::GetCircle(myTConv,
976 GeomFill::GetCircle(myTConv,
978 nplan, ptrst1, ptrst2,
981 return Standard_False;
985 //=======================================================================
988 //=======================================================================
990 Standard_Boolean BRepBlend_RstRstConstRad::Section
995 TColgp_Array1OfPnt2d&,
996 TColgp_Array1OfVec2d&,
997 TColgp_Array1OfVec2d&,
998 TColStd_Array1OfReal&,
999 TColStd_Array1OfReal&,
1000 TColStd_Array1OfReal&)
1002 return Standard_False;
1006 void BRepBlend_RstRstConstRad::Resolution(const Standard_Integer IC2d,
1007 const Standard_Real Tol,
1008 Standard_Real& TolU,
1009 Standard_Real& TolV) const
1012 TolU = surf1->UResolution(Tol);
1013 TolV = surf1->VResolution(Tol);
1016 TolU = surf2->UResolution(Tol);
1017 TolV = surf2->VResolution(Tol);