1 // Created on: 1997-02-10
2 // Created by: Jacques GOUSSARD
3 // Copyright (c) 1997-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and / or modify it
9 // under the terms of the GNU Lesser General Public version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #include <BRepBlend_RstRstConstRad.ixx>
18 #include <math_Gauss.hxx>
19 #include <math_SVD.hxx>
23 #include <BlendFunc.hxx>
24 #include <GeomFill.hxx>
25 #include <Standard_DomainError.hxx>
26 #include <Standard_NotImplemented.hxx>
27 #include <Precision.hxx>
31 static void t3dto2d(Standard_Real& a,
37 Standard_Real AB = A.Dot(B);
38 Standard_Real AC = A.Dot(C);
39 Standard_Real BC = B.Dot(C);
40 Standard_Real BB = B.Dot(B);
41 Standard_Real CC = C.Dot(C);
42 Standard_Real deno = (BB*CC-BC*BC);
43 a = (AB*CC-AC*BC)/deno;
44 b = (AC*BB-AB*BC)/deno;
47 //=======================================================================
48 //function : BRepBlend_RstRstConstRad
50 //=======================================================================
52 BRepBlend_RstRstConstRad::BRepBlend_RstRstConstRad
53 (const Handle(Adaptor3d_HSurface)& Surf1,
54 const Handle(Adaptor2d_HCurve2d)& Rst1,
55 const Handle(Adaptor3d_HSurface)& Surf2,
56 const Handle(Adaptor2d_HCurve2d)& Rst2,
57 const Handle(Adaptor3d_HCurve)& CGuide):
58 surf1(Surf1), surf2(Surf2), rst1(Rst1), rst2(Rst2),
59 cons1(Rst1, Surf1), cons2(Rst2, Surf2),
60 guide(CGuide), tguide(CGuide),
61 istangent(Standard_True), maxang(RealFirst()), minang(RealLast()),
63 mySShape(BlendFunc_Rational)
66 //=======================================================================
67 //function : NbVariables
69 //=======================================================================
71 Standard_Integer BRepBlend_RstRstConstRad::NbVariables() const
76 //=======================================================================
77 //function : NbEquations
79 //=======================================================================
81 Standard_Integer BRepBlend_RstRstConstRad::NbEquations() const
86 //=======================================================================
89 //=======================================================================
91 Standard_Boolean BRepBlend_RstRstConstRad::Value(const math_Vector& X,
94 ptrst1 = cons1.Value(X(1));
95 ptrst2 = cons2.Value(X(2));
97 F(1) = nplan.XYZ().Dot(ptrst1.XYZ()) + theD;
98 F(2) = nplan.XYZ().Dot(ptrst2.XYZ()) + theD;
100 return Standard_True;
103 //=======================================================================
104 //function : Derivatives
106 //=======================================================================
108 Standard_Boolean BRepBlend_RstRstConstRad::Derivatives(const math_Vector& X,
113 cons1.D1(X(1), ptrst1, d11);
114 cons2.D1(X(2), ptrst2, d21);
116 D(1,1) = nplan.Dot(d11);
120 D(2,2) = nplan.Dot(d21);
122 return Standard_True;
125 //=======================================================================
128 //=======================================================================
130 Standard_Boolean BRepBlend_RstRstConstRad::Values(const math_Vector& X,
134 Standard_Boolean Error;
137 Error = Derivatives(X, D);
139 return Standard_True;
142 //=======================================================================
145 //=======================================================================
147 void BRepBlend_RstRstConstRad::Set(const Handle(Adaptor3d_HSurface)& SurfRef1,
148 const Handle(Adaptor2d_HCurve2d)& RstRef1,
149 const Handle(Adaptor3d_HSurface)& SurfRef2,
150 const Handle(Adaptor2d_HCurve2d)& RstRef2)
158 //=======================================================================
161 //=======================================================================
163 void BRepBlend_RstRstConstRad::Set(const Standard_Real Param)
165 tguide->D2(Param, ptgui, d1gui, d2gui);
166 normtg = d1gui.Magnitude();
167 nplan = d1gui.Normalized();
168 theD = - (nplan.XYZ().Dot(ptgui.XYZ()));
171 //=======================================================================
174 //=======================================================================
176 void BRepBlend_RstRstConstRad::Set(const Standard_Real First,
177 const Standard_Real Last)
179 tguide = guide->Trim(First, Last, 1.e-12);
182 //=======================================================================
183 //function : GetTolerance
185 //=======================================================================
187 void BRepBlend_RstRstConstRad::GetTolerance(math_Vector& Tolerance,
188 const Standard_Real Tol) const
190 Tolerance(1) = cons1.Resolution(Tol);
191 Tolerance(2) = cons2.Resolution(Tol);
194 //=======================================================================
195 //function : GetBounds
197 //=======================================================================
199 void BRepBlend_RstRstConstRad::GetBounds(math_Vector& InfBound,
200 math_Vector& SupBound) const
202 InfBound(1) = cons1.FirstParameter();
203 InfBound(2) = cons2.FirstParameter();
204 SupBound(1) = cons1.LastParameter();
205 SupBound(2) = cons2.LastParameter();
209 //=======================================================================
210 //function : IsSolution
212 //=======================================================================
214 Standard_Boolean BRepBlend_RstRstConstRad::IsSolution(const math_Vector& Sol,
215 const Standard_Real Tol)
219 math_Vector valsol(1, 2), secmember(1, 2);
220 math_Matrix gradsol(1, 2, 1, 2);
222 gp_Vec dnplan, d1urst1, d1vrst1, d1urst2, d1vrst2, d11, d21, temp;
225 Standard_Real Cosa, Sina, Angle;
227 Values(Sol, valsol, gradsol);
229 if (Abs(valsol(1)) <= Tol &&
230 Abs(valsol(2)) <= Tol ) {
232 // Calculation of tangents
234 pt2drst1 = rst1->Value(prmrst1);
236 pt2drst2 = rst2->Value(prmrst2);
238 cons1.D1(Sol(1), ptrst1, d11);
239 cons2.D1(Sol(2), ptrst2, d21);
241 dnplan.SetLinearForm(1./normtg, d2gui,
242 -1./normtg * (nplan.Dot(d2gui)), nplan);
244 temp.SetXYZ(ptrst1.XYZ() - ptgui.XYZ());
245 secmember(1) = normtg - dnplan.Dot(temp);
247 temp.SetXYZ(ptrst2.XYZ() - ptgui.XYZ());
248 secmember(2) = normtg - dnplan.Dot(temp);
250 math_Gauss Resol(gradsol);
252 if (Resol.IsDone()) {
253 Resol.Solve(secmember);
254 istangent = Standard_False;
257 math_SVD SingRS (gradsol);
258 if (SingRS.IsDone()) {
259 math_Vector DEDT(1,3);
261 SingRS.Solve(DEDT, secmember, 1.e-6);
262 istangent = Standard_False;
264 else istangent = Standard_True;
269 tgrst1 = secmember(1) * d11;
270 tgrst2 = secmember(2) * d21;
273 surf1->D1(pt2drst1.X(), pt2drst1.Y(), bid, d1urst1, d1vrst1);
274 t3dto2d(a, b, tgrst1, d1urst1, d1vrst1);
275 tg2drst1.SetCoord(a, b);
276 surf2->D1(pt2drst2.X(), pt2drst2.Y(), bid, d1urst2, d1vrst2);
277 t3dto2d(a, b, tgrst1, d1urst2, d1vrst2);
278 tg2drst2.SetCoord(a, b);
283 Standard_Boolean IsCenter;
285 IsCenter = CenterCircleRst1Rst2(ptrst1, ptrst2, nplan, Center, NotUsed);
287 if (!IsCenter) return Standard_False;
289 gp_Vec n1(Center, ptrst1) , n2(Center, ptrst2);
295 Sina = nplan.Dot(n1.Crossed(n2));
298 Sina = -Sina; //nplan is changed into -nplan
303 Angle = 2.*M_PI - Angle;
306 if (Angle > maxang) {maxang = Angle;}
307 if (Angle < minang) {minang = Angle;}
308 distmin = Min( distmin, ptrst1.Distance(ptrst2));
310 return Standard_True;
312 istangent = Standard_True;
313 return Standard_False;
316 //=======================================================================
317 //function : GetMinimalDistance
319 //=======================================================================
321 Standard_Real BRepBlend_RstRstConstRad::GetMinimalDistance() const
326 //=======================================================================
327 //function : PointOnRst1
329 //=======================================================================
331 const gp_Pnt& BRepBlend_RstRstConstRad::PointOnRst1() const
336 //=======================================================================
337 //function : PointOnRst2
339 //=======================================================================
341 const gp_Pnt& BRepBlend_RstRstConstRad::PointOnRst2() const
346 //=======================================================================
347 //function : Pnt2dOnRst1
349 //=======================================================================
351 const gp_Pnt2d& BRepBlend_RstRstConstRad::Pnt2dOnRst1() const
356 //=======================================================================
357 //function : Pnt2dOnRst2
359 //=======================================================================
361 const gp_Pnt2d& BRepBlend_RstRstConstRad::Pnt2dOnRst2() const
366 //=======================================================================
367 //function : ParameterOnRst1
369 //=======================================================================
371 Standard_Real BRepBlend_RstRstConstRad::ParameterOnRst1() const
376 //=======================================================================
377 //function : ParameterOnRst2
379 //=======================================================================
381 Standard_Real BRepBlend_RstRstConstRad::ParameterOnRst2() const
385 //=======================================================================
386 //function : IsTangencyPoint
388 //=======================================================================
390 Standard_Boolean BRepBlend_RstRstConstRad::IsTangencyPoint() const
395 //=======================================================================
396 //function : TangentOnRst1
398 //=======================================================================
400 const gp_Vec& BRepBlend_RstRstConstRad::TangentOnRst1() const
402 if (istangent) {Standard_DomainError::Raise();}
406 //=======================================================================
407 //function : Tangent2dOnRst1
409 //=======================================================================
411 const gp_Vec2d& BRepBlend_RstRstConstRad::Tangent2dOnRst1() const
413 if (istangent) {Standard_DomainError::Raise();}
417 //=======================================================================
418 //function : TangentOnRst2
420 //=======================================================================
422 const gp_Vec& BRepBlend_RstRstConstRad::TangentOnRst2() const
424 if (istangent) {Standard_DomainError::Raise();}
428 //=======================================================================
429 //function : Tangent2dOnRst2
431 //=======================================================================
433 const gp_Vec2d& BRepBlend_RstRstConstRad::Tangent2dOnRst2() const
435 if (istangent) {Standard_DomainError::Raise();}
439 //=======================================================================
442 //=======================================================================
444 Blend_DecrochStatus BRepBlend_RstRstConstRad::Decroch(const math_Vector& Sol,
450 gp_Vec NRst1InPlane, NRst2InPlane;
451 gp_Pnt PtTmp1, PtTmp2, Center;
452 gp_Vec d1u, d1v, centptrst, NotUsed;
453 Standard_Real norm, unsurnorm;
456 rstref1->Value(Sol(1)).Coord(u, v);
457 surfref1->D1(u, v,PtTmp1,d1u,d1v);
458 // Normal to the reference surface 1
459 NRst1 = d1u.Crossed(d1v);
460 rstref2->Value(Sol(2)).Coord(u, v);
461 surfref2->D1(u, v, PtTmp2, d1u, d1v);
462 // Normal to the reference surface 2
463 NRst2 = d1u.Crossed(d1v);
465 Standard_Boolean IsCenter;
467 IsCenter = CenterCircleRst1Rst2(PtTmp1, PtTmp2, nplan, Center, NotUsed);
469 norm = nplan.Crossed(NRst1).Magnitude();
470 unsurnorm = 1. / norm;
472 NRst1InPlane.SetLinearForm(nplan.Dot(NRst1) * unsurnorm, nplan, -unsurnorm, NRst1);
474 centptrst.SetXYZ(PtTmp1.XYZ() - Center.XYZ());
476 if (centptrst.Dot(NRst1InPlane) < 0.) NRst1InPlane.Reverse();
478 TgRst1 = nplan.Crossed(centptrst);
480 norm = nplan.Crossed(NRst2).Magnitude();
481 unsurnorm = 1./ norm;
482 NRst2InPlane.SetLinearForm(nplan.Dot(NRst2) * unsurnorm, nplan, -unsurnorm, NRst2);
483 centptrst.SetXYZ(PtTmp2.XYZ() - Center.XYZ());
486 if (centptrst.Dot(NRst2InPlane) < 0.) NRst2InPlane.Reverse();
488 TgRst2 = nplan.Crossed(centptrst);
495 // The vectors are returned
496 if (NRst1InPlane.Dot(TgRst1) > -1.e-10) {
497 if (NRst2InPlane.Dot(TgRst2) < 1.e-10) {
498 return Blend_DecrochBoth;
501 return Blend_DecrochRst1;
505 if (NRst2InPlane.Dot(TgRst2) < 1.e-10) {
506 return Blend_DecrochRst2;
509 return Blend_NoDecroch;
515 //=======================================================================
518 //=======================================================================
520 void BRepBlend_RstRstConstRad::Set(const Standard_Real Radius,
521 const Standard_Integer Choix)
528 //=======================================================================
531 //=======================================================================
533 void BRepBlend_RstRstConstRad::Set(const BlendFunc_SectionShape TypeSection)
535 mySShape = TypeSection;
540 //=======================================================================
541 //function : CenterCircleRst1Rst2
542 //purpose : Calculate the center of the circle passing by two points of restrictions
543 //=======================================================================
544 Standard_Boolean BRepBlend_RstRstConstRad::CenterCircleRst1Rst2(const gp_Pnt& PtRst1,
545 const gp_Pnt& PtRst2,
551 gp_Vec rst1rst2(PtRst1, PtRst2);
552 gp_Vec vdmedNor; //,NRst1; vdmedNor directong vector of the perpendicular bisector
554 Standard_Real Dist;// distance between the middle of PtRst1,PtRst2 and Center
556 // Calculate the center of the circle
557 VdMed = rst1rst2.Crossed(np);
558 norm2 = rst1rst2.SquareMagnitude();
559 Dist = ray * ray - 0.25 * norm2;
565 if (Dist < - 1.E-07) return Standard_False;
569 vdmedNor = VdMed.Normalized();
570 Center.SetXYZ(0.5 * rst1rst2.XYZ() + PtRst1.XYZ() + Dist * vdmedNor.XYZ());
574 Center.SetXYZ(0.5 * rst1rst2.XYZ() + PtRst1.XYZ());
577 return Standard_True;
586 //=======================================================================
589 //=======================================================================
591 void BRepBlend_RstRstConstRad::Section(const Standard_Real Param,
592 const Standard_Real U,
593 const Standard_Real V,
598 gp_Vec ns, np, NotUsed;
601 tguide->D1(Param, ptgui, d1gui);
602 np = d1gui.Normalized();
603 ptrst1 = cons1.Value(U);
604 ptrst2 = cons2.Value(V);
606 Standard_Boolean IsCenter;
608 IsCenter = CenterCircleRst1Rst2(ptrst1, ptrst2, np, Center, NotUsed);
610 C.SetRadius(Abs(ray));
611 ns = gp_Vec(Center, ptrst1).Normalized();
617 C.SetPosition(gp_Ax2(Center, np, ns));
618 Pdeb = 0; //ElCLib::Parameter(C, pts);
619 Pfin = ElCLib::Parameter(C, ptrst2);
621 // Test of angles negative and almost null : Special Case
622 if (Pfin > 1.5 * M_PI) {
624 C.SetPosition(gp_Ax2(Center, np, ns));
625 Pfin = ElCLib::Parameter(C, ptrst2);
627 if (Pfin < Precision::PConfusion()) Pfin += Precision::PConfusion();
630 //=======================================================================
631 //function : IsRational
633 //=======================================================================
635 Standard_Boolean BRepBlend_RstRstConstRad::IsRational () const
637 return (mySShape==BlendFunc_Rational || mySShape==BlendFunc_QuasiAngular);
640 //=======================================================================
641 //function : GetSectionSize
643 //=======================================================================
645 Standard_Real BRepBlend_RstRstConstRad::GetSectionSize() const
647 return maxang * Abs(ray);
650 //=======================================================================
651 //function : GetMinimalWeight
653 //=======================================================================
655 void BRepBlend_RstRstConstRad::GetMinimalWeight(TColStd_Array1OfReal& Weights) const
657 BlendFunc::GetMinimalWeights(mySShape, myTConv, minang, maxang, Weights );
658 // It is supposed that it does not depend on the Radius!
661 //=======================================================================
662 //function : NbIntervals
664 //=======================================================================
666 Standard_Integer BRepBlend_RstRstConstRad::NbIntervals (const GeomAbs_Shape S) const
668 return guide->NbIntervals(BlendFunc::NextShape(S));
671 //=======================================================================
672 //function : Intervals
674 //=======================================================================
676 void BRepBlend_RstRstConstRad::Intervals (TColStd_Array1OfReal& T,
677 const GeomAbs_Shape S) const
679 guide->Intervals(T, BlendFunc::NextShape(S));
682 //=======================================================================
683 //function : GetShape
685 //=======================================================================
687 void BRepBlend_RstRstConstRad::GetShape (Standard_Integer& NbPoles,
688 Standard_Integer& NbKnots,
689 Standard_Integer& Degree,
690 Standard_Integer& NbPoles2d)
693 BlendFunc::GetShape(mySShape, maxang, NbPoles, NbKnots, Degree, myTConv);
696 //=======================================================================
697 //function : GetTolerance
698 //purpose : Determine Tolerances to be used in approximations.
699 //=======================================================================
701 void BRepBlend_RstRstConstRad::GetTolerance(const Standard_Real BoundTol,
702 const Standard_Real SurfTol,
703 const Standard_Real AngleTol,
705 math_Vector& Tol1d) const
707 Standard_Integer low = Tol3d.Lower(), up = Tol3d.Upper();
709 Tol= GeomFill::GetTolerance(myTConv, minang, Abs(ray),
713 Tol3d(low+1) = Tol3d(up-1) = Min(Tol, SurfTol);
714 Tol3d(low) = Tol3d(up) = Min(Tol, BoundTol);
717 //=======================================================================
720 //=======================================================================
722 void BRepBlend_RstRstConstRad::Knots(TColStd_Array1OfReal& TKnots)
724 GeomFill::Knots(myTConv, TKnots);
727 //=======================================================================
730 //=======================================================================
732 void BRepBlend_RstRstConstRad::Mults(TColStd_Array1OfInteger& TMults)
734 GeomFill::Mults(myTConv, TMults);
737 //=======================================================================
740 //=======================================================================
742 void BRepBlend_RstRstConstRad::Section(const Blend_Point& P,
743 TColgp_Array1OfPnt& Poles,
744 TColgp_Array1OfPnt2d& Poles2d,
745 TColStd_Array1OfReal& Weights)
747 gp_Vec ns, ns2, NotUsed;
751 Standard_Real prm = P.Parameter();
752 Standard_Integer low = Poles.Lower();
753 Standard_Integer upp = Poles.Upper();
755 tguide->D1(prm,ptgui, d1gui);
756 nplan = d1gui.Normalized();
758 u = P.ParameterOnC1();
759 v = P.ParameterOnC2();
761 gp_Pnt2d pt2d1 = rst1->Value(u);
762 gp_Pnt2d pt2d2 = rst2->Value(v);
764 ptrst1 = cons1.Value(u);
765 ptrst2 = cons2.Value(v);
766 distmin = Min (distmin, ptrst1.Distance(ptrst2));
768 Poles2d(Poles2d.Lower()).SetCoord(pt2d1.X(),pt2d1.Y());
769 Poles2d(Poles2d.Upper()).SetCoord(pt2d2.X(),pt2d2.Y());
772 if (mySShape == BlendFunc_Linear) {
780 // Calculate the center of the circle
781 Standard_Boolean IsCenter;
782 IsCenter = CenterCircleRst1Rst2(ptrst1, ptrst2, nplan, Center, NotUsed);
784 // normals to the section with points
785 ns = gp_Vec(Center, ptrst1).Normalized();
786 ns2 = gp_Vec(Center, ptrst2).Normalized();
792 GeomFill::GetCircle(myTConv,
794 nplan, ptrst1, ptrst2,
799 //=======================================================================
802 //=======================================================================
804 Standard_Boolean BRepBlend_RstRstConstRad::Section(const Blend_Point& P,
805 TColgp_Array1OfPnt& Poles,
806 TColgp_Array1OfVec& DPoles,
807 TColgp_Array1OfPnt2d& Poles2d,
808 TColgp_Array1OfVec2d& DPoles2d,
809 TColStd_Array1OfReal& Weights,
810 TColStd_Array1OfReal& DWeights)
814 gp_Vec dnplan, d1n1, d1n2;//,np2, dnp2;
816 gp_Vec d1urst, d1vrst;
817 gp_Pnt Center, NotUsed;
819 Standard_Real norm2, normmed, Dist;
821 math_Vector sol(1, 2), valsol(1, 2), secmember(1, 2);
822 math_Matrix gradsol(1, 2, 1, 2);
824 Standard_Real prm = P.Parameter();
825 Standard_Integer low = Poles.Lower();
826 Standard_Integer upp = Poles.Upper();
827 Standard_Boolean istgt;
829 tguide->D2(prm, ptgui, d1gui, d2gui);
830 normtg = d1gui.Magnitude();
831 nplan = d1gui.Normalized();
832 dnplan.SetLinearForm(1./normtg, d2gui,
833 -1./normtg * (nplan.Dot(d2gui)), nplan);
835 sol(1) = prmrst1 = P.ParameterOnC1();
836 sol(2) = prmrst2 = P.ParameterOnC2();
837 pt2drst1 = rst1->Value(prmrst1);
838 pt2drst2 = rst2->Value(prmrst2);
840 Values(sol, valsol, gradsol);
842 cons1.D1(sol(1), ptrst1, d11);
843 cons2.D1(sol(2), ptrst2, d21);
845 temp.SetXYZ(ptrst1.XYZ() - ptgui.XYZ());
846 secmember(1) = normtg - dnplan.Dot(temp);
848 temp.SetXYZ(ptrst2.XYZ() - ptgui.XYZ());
849 secmember(2) = normtg - dnplan.Dot(temp);
851 math_Gauss Resol(gradsol, 1.e-9);
853 if (Resol.IsDone()) {
854 istgt = Standard_False;
855 Resol.Solve(secmember);
858 math_SVD SingRS (gradsol);
859 if (SingRS.IsDone()) {
860 math_Vector DEDT(1,2);
862 SingRS.Solve(DEDT, secmember, 1.e-6);
863 istgt = Standard_False;
865 else istgt = Standard_True;
869 gp_Vec rst1rst2(ptrst1, ptrst2);
870 Standard_Boolean IsCenter;
872 IsCenter = CenterCircleRst1Rst2(ptrst1, ptrst2, nplan, Center, med);
873 if (!IsCenter) return Standard_False;
875 normmed = med.Magnitude();
877 gp_Vec n1(Center, ptrst1), n2(Center, ptrst2);
882 // secmember contains derivatives of parameters on curves
884 tgrst1 = secmember(1) * d11;
885 tgrst2 = secmember(2) * d21;
889 norm2 = rst1rst2.SquareMagnitude();
890 d1rst1rst2 = tgrst2 - tgrst1;
891 Dist = ray * ray - 0.25 * norm2;
894 gp_Vec d1P1P2CrosNp, dmed;
895 d1P1P2CrosNp = d1rst1rst2.Crossed(nplan) + rst1rst2.Crossed(dnplan);
896 // derivative of the perpendicular bisector
897 dmed = d1P1P2CrosNp - med.Dot(d1P1P2CrosNp) * med;
900 Standard_Real d1Dist = - (0.25 / Dist) * rst1rst2.Dot(d1rst1rst2);
906 // the derivative of coefficient Dist is located in dmed
907 dmed.SetLinearForm(Dist, dmed, d1Dist, med);
909 // derivative of the Normal to the curve in P1
910 d1n1 = - (dmed + d1rst1rst2) / ray;
912 // derivative of the Normal to the curve in P2
913 d1n2 = (d1rst1rst2 - dmed) / ray;
917 // Normal to the curve in P1
918 d1n1 = - d1rst1rst2 / ray;
920 // Normal to the curve in P2
921 d1n2 = d1rst1rst2 / ray;
927 Poles2d(Poles2d.Lower()).SetCoord(pt2drst1.X(), pt2drst1.Y());
928 Poles2d(Poles2d.Upper()).SetCoord(pt2drst2.X(), pt2drst2.Y());
931 surf1->D1(pt2drst1.X(), pt2drst1.Y(), NotUsed, d1urst, d1vrst);
932 t3dto2d(a,b,tgrst1, d1urst, d1vrst);
933 DPoles2d(Poles2d.Lower()).SetCoord(a, b);
935 surf2->D1(pt2drst2.X(), pt2drst2.Y(), NotUsed, d1urst, d1vrst);
936 t3dto2d(a, b, tgrst2, d1urst, d1vrst);
937 DPoles2d(Poles2d.Upper()).SetCoord(a, b);
941 if (mySShape == BlendFunc_Linear) {
947 DPoles(low) = tgrst1;
948 DPoles(upp) = tgrst2;
955 // Case of the circle
956 // tangent to the center of the circle
958 tgct.SetLinearForm(-ray, d1n1, tgrst1);
968 return GeomFill::GetCircle(myTConv,
982 GeomFill::GetCircle(myTConv,
984 nplan, ptrst1, ptrst2,
987 return Standard_False;
991 //=======================================================================
994 //=======================================================================
996 Standard_Boolean BRepBlend_RstRstConstRad::Section
1000 TColgp_Array1OfVec&,
1001 TColgp_Array1OfPnt2d&,
1002 TColgp_Array1OfVec2d&,
1003 TColgp_Array1OfVec2d&,
1004 TColStd_Array1OfReal&,
1005 TColStd_Array1OfReal&,
1006 TColStd_Array1OfReal&)
1008 return Standard_False;
1012 void BRepBlend_RstRstConstRad::Resolution(const Standard_Integer IC2d,
1013 const Standard_Real Tol,
1014 Standard_Real& TolU,
1015 Standard_Real& TolV) const
1018 TolU = surf1->UResolution(Tol);
1019 TolV = surf1->VResolution(Tol);
1022 TolU = surf2->UResolution(Tol);
1023 TolV = surf2->VResolution(Tol);