1 // Created on: 1991-06-25
3 // Copyright (c) 1991-1999 Matra Datavision
4 // Copyright (c) 1999-2012 OPEN CASCADE SAS
6 // The content of this file is subject to the Open CASCADE Technology Public
7 // License Version 6.5 (the "License"). You may not use the content of this file
8 // except in compliance with the License. Please obtain a copy of the License
9 // at http://www.opencascade.org and read it completely before using this file.
11 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 // The Original Code and all software distributed under the License is
15 // distributed on an "AS IS" basis, without warranty of any kind, and the
16 // Initial Developer hereby disclaims all such warranties, including without
17 // limitation, any warranties of merchantability, fitness for a particular
18 // purpose or non-infringement. Please see the License for the specific terms
19 // and conditions governing the rights and limitations under the License.
23 // modified by Edward AGAPOV (eap) Jan 28 2002 --- DN(), occ143(BUC60654)
27 #include <Geom2d_OffsetCurve.ixx>
29 #include <Standard_ConstructionError.hxx>
30 #include <Standard_RangeError.hxx>
31 #include <Standard_NotImplemented.hxx>
32 #include <Geom2d_UndefinedDerivative.hxx>
33 #include <Geom2d_UndefinedValue.hxx>
34 #include <Geom2d_Line.hxx>
35 #include <Geom2d_Circle.hxx>
36 #include <Geom2d_Ellipse.hxx>
37 #include <Geom2d_Hyperbola.hxx>
38 #include <Geom2d_Parabola.hxx>
39 #include <Geom2d_BezierCurve.hxx>
40 #include <Geom2d_BSplineCurve.hxx>
41 #include <Geom2d_TrimmedCurve.hxx>
44 typedef Handle(Geom2d_OffsetCurve) Handle(OffsetCurve);
45 typedef Geom2d_OffsetCurve OffsetCurve;
46 typedef Handle(Geom2d_Geometry) Handle(Geometry);
47 typedef Handle(Geom2d_Curve) Handle(Curve);
48 typedef Geom2d_Curve Curve;
49 typedef gp_Dir2d Dir2d;
50 typedef gp_Pnt2d Pnt2d;
51 typedef gp_Vec2d Vec2d;
52 typedef gp_Trsf2d Trsf2d;
57 static const int MaxDegree = 9;
58 //ordre de derivation maximum pour la recherche de la premiere
63 //=======================================================================
66 //=======================================================================
68 Handle(Geom2d_Geometry) Geom2d_OffsetCurve::Copy () const
70 Handle(OffsetCurve) C;
71 C = new OffsetCurve (basisCurve, offsetValue);
76 //=======================================================================
77 //function : Geom2d_OffsetCurve
79 //=======================================================================
81 Geom2d_OffsetCurve::Geom2d_OffsetCurve (const Handle(Curve)& C,
82 const Standard_Real Offset)
83 : offsetValue (Offset)
85 if (C->DynamicType() == STANDARD_TYPE(Geom2d_OffsetCurve)) {
86 Handle(OffsetCurve) OC = Handle(OffsetCurve)::DownCast(C);
87 SetBasisCurve (OC->BasisCurve());
88 offsetValue += OC->Offset();
95 //=======================================================================
98 //=======================================================================
100 void Geom2d_OffsetCurve::Reverse ()
102 basisCurve->Reverse();
103 offsetValue = -offsetValue;
106 //=======================================================================
107 //function : ReversedParameter
109 //=======================================================================
111 Standard_Real Geom2d_OffsetCurve::ReversedParameter( const Standard_Real U) const
113 return basisCurve->ReversedParameter( U);
116 //=======================================================================
117 //function : SetBasisCurve
119 //=======================================================================
121 void Geom2d_OffsetCurve::SetBasisCurve (const Handle(Curve)& C)
123 Handle(Geom2d_Curve) aBasisCurve = Handle(Geom2d_Curve)::DownCast(C->Copy());
125 // Basis curve must be at least C1
126 if (aBasisCurve->Continuity() == GeomAbs_C0)
128 // For B-splines it is sometimes possible to increase continuity by removing
129 // unnecessarily duplicated knots
130 if (aBasisCurve->IsKind(STANDARD_TYPE(Geom2d_BSplineCurve)))
132 Handle(Geom2d_BSplineCurve) aBCurve = Handle(Geom2d_BSplineCurve)::DownCast(aBasisCurve);
133 Standard_Integer degree = aBCurve->Degree();
134 Standard_Real Toler = 1e-7;
135 Standard_Integer start = aBCurve->IsPeriodic() ? 1 : aBCurve->FirstUKnotIndex(),
136 finish = aBCurve->IsPeriodic() ? aBCurve->NbKnots() : aBCurve->LastUKnotIndex();
137 for (Standard_Integer i = start; i <= finish; i++)
139 Standard_Integer mult = aBCurve->Multiplicity(i);
140 if ( mult == degree )
141 aBCurve->RemoveKnot(i,degree - 1, Toler);
145 // Raise exception if still C0
146 if (aBasisCurve->Continuity() == GeomAbs_C0)
147 Standard_ConstructionError::Raise("Offset on C0 curve");
150 basisCurve = aBasisCurve;
153 //=======================================================================
154 //function : SetOffsetValue
156 //=======================================================================
158 void Geom2d_OffsetCurve::SetOffsetValue (const Standard_Real D) { offsetValue = D; }
160 //=======================================================================
161 //function : BasisCurve
163 //=======================================================================
165 Handle(Curve) Geom2d_OffsetCurve::BasisCurve () const
170 //=======================================================================
171 //function : Continuity
173 //=======================================================================
175 GeomAbs_Shape Geom2d_OffsetCurve::Continuity () const
177 GeomAbs_Shape OffsetShape=GeomAbs_C0;
178 switch (basisCurve->Continuity()) {
179 case GeomAbs_C0 : OffsetShape = GeomAbs_C0; break;
180 case GeomAbs_C1 : OffsetShape = GeomAbs_C0; break;
181 case GeomAbs_C2 : OffsetShape = GeomAbs_C1; break;
182 case GeomAbs_C3 : OffsetShape = GeomAbs_C2; break;
183 case GeomAbs_CN : OffsetShape = GeomAbs_CN; break;
184 case GeomAbs_G1 : OffsetShape = GeomAbs_G1; break;
185 case GeomAbs_G2 : OffsetShape = GeomAbs_G2; break;
190 //=======================================================================
193 //=======================================================================
195 void Geom2d_OffsetCurve::D0 (const Standard_Real U,
200 basisCurve->D1 (U, P, V1);
201 Standard_Integer Index = 2;
202 while (V1.Magnitude() <= gp::Resolution() && Index <= MaxDegree) {
203 V1 = basisCurve->DN (U, Index);
206 Standard_Real A = V1.Y();
207 Standard_Real B = - V1.X();
208 Standard_Real R = Sqrt(A*A + B * B);
209 if (R <= gp::Resolution()) Geom2d_UndefinedValue::Raise();
210 A = A * offsetValue/R;
211 B = B * offsetValue/R;
212 P.SetCoord(P.X() + A, P.Y() + B);
215 //=======================================================================
218 //=======================================================================
220 void Geom2d_OffsetCurve::D1 (const Standard_Real U, Pnt2d& P, Vec2d& V1) const {
222 // P(u) = p(u) + Offset * Ndir / R
223 // with R = || p' ^ Z|| and Ndir = P' ^ Z
225 // P'(u) = p'(u) + (Offset / R**2) * (DNdir/DU * R - Ndir * (DR/R))
228 basisCurve->D2 (U, P, V1, V2);
229 Standard_Integer Index = 2;
230 while (V1.Magnitude() <= gp::Resolution() && Index <= MaxDegree) {
231 V1 = basisCurve->DN (U, Index);
234 if (Index != 2) { V2 = basisCurve->DN (U, Index); }
235 XY Ndir (V1.Y(), -V1.X());
236 XY DNdir (V2.Y(), -V2.X());
237 Standard_Real R2 = Ndir.SquareModulus();
238 Standard_Real R = Sqrt (R2);
239 Standard_Real R3 = R * R2;
240 Standard_Real Dr = Ndir.Dot (DNdir);
241 if (R3 <= gp::Resolution()) {
242 //We try another computation but the stability is not very good.
243 if (R2 <= gp::Resolution()) Geom2d_UndefinedDerivative::Raise();
245 DNdir.Subtract (Ndir.Multiplied (Dr/R));
246 DNdir.Multiply (offsetValue/R2);
247 V1.Add (Vec2d(DNdir));
250 // Same computation as IICURV in EUCLID-IS because the stability is
252 DNdir.Multiply (offsetValue/R);
253 DNdir.Subtract (Ndir.Multiplied (offsetValue*Dr/R3));
254 V1.Add (Vec2d(DNdir));
256 Ndir.Multiply (offsetValue/R);
261 //=======================================================================
264 //=======================================================================
266 void Geom2d_OffsetCurve::D2 (const Standard_Real U,
268 Vec2d& V1, Vec2d& V2) const
270 // P(u) = p(u) + Offset * Ndir / R
271 // with R = || p' ^ Z|| and Ndir = P' ^ Z
273 // P'(u) = p'(u) + (Offset / R**2) * (DNdir/DU * R - Ndir * (DR/R))
275 // P"(u) = p"(u) + (Offset / R) * (D2Ndir/DU - DNdir * (2.0 * Dr/ R**2) +
276 // Ndir * ( (3.0 * Dr**2 / R**4) - (D2r / R**2)))
279 basisCurve->D3 (U, P, V1, V2, V3);
280 Standard_Integer Index = 2;
281 while (V1.Magnitude() <= gp::Resolution() && Index <= MaxDegree) {
282 V1 = basisCurve->DN (U, Index);
286 V2 = basisCurve->DN (U, Index);
287 V3 = basisCurve->DN (U, Index + 1);
289 XY Ndir (V1.Y(), -V1.X());
290 XY DNdir (V2.Y(), -V2.X());
291 XY D2Ndir (V3.Y(), -V3.X());
292 Standard_Real R2 = Ndir.SquareModulus();
293 Standard_Real R = Sqrt (R2);
294 Standard_Real R3 = R2 * R;
295 Standard_Real R4 = R2 * R2;
296 Standard_Real R5 = R3 * R2;
297 Standard_Real Dr = Ndir.Dot (DNdir);
298 Standard_Real D2r = Ndir.Dot (D2Ndir) + DNdir.Dot (DNdir);
299 if (R5 <= gp::Resolution()) {
300 //We try another computation but the stability is not very good
302 if (R4 <= gp::Resolution()) { Geom2d_UndefinedDerivative::Raise(); }
304 Standard_Real R4 = R2 * R2;
305 D2Ndir.Subtract (DNdir.Multiplied (2.0 * Dr / R2));
306 D2Ndir.Add (Ndir.Multiplied (((3.0 * Dr * Dr)/R4) - (D2r/R2)));
307 D2Ndir.Multiply (offsetValue / R);
308 V2.Add (Vec2d(D2Ndir));
311 DNdir.Subtract (Ndir.Multiplied (Dr/R));
312 DNdir.Multiply (offsetValue/R2);
313 V1.Add (Vec2d(DNdir));
316 // Same computation as IICURV in EUCLID-IS because the stability is
319 D2Ndir.Multiply (offsetValue/R);
320 D2Ndir.Subtract (DNdir.Multiplied (2.0 * offsetValue * Dr / R3));
321 D2Ndir.Add (Ndir.Multiplied
322 (offsetValue * (((3.0 * Dr * Dr) / R5) - (D2r / R3))));
323 V2.Add (Vec2d(D2Ndir));
325 DNdir.Multiply (offsetValue/R);
326 DNdir.Subtract (Ndir.Multiplied (offsetValue*Dr/R3));
327 V1.Add (Vec2d(DNdir));
330 Ndir.Multiply (offsetValue/R);
336 //=======================================================================
339 //=======================================================================
341 void Geom2d_OffsetCurve::D3 (const Standard_Real U,
343 Vec2d& V1, Vec2d& V2, Vec2d& V3) const {
346 // P(u) = p(u) + Offset * Ndir / R
347 // with R = || p' ^ Z|| and Ndir = P' ^ Z
349 // P'(u) = p'(u) + (Offset / R**2) * (DNdir/DU * R - Ndir * (DR/R))
351 // P"(u) = p"(u) + (Offset / R) * (D2Ndir/DU - DNdir * (2.0 * Dr/ R**2) +
352 // Ndir * ( (3.0 * Dr**2 / R**4) - (D2r / R**2)))
354 //P"'(u) = p"'(u) + (Offset / R) * (D3Ndir - (3.0 * Dr/R**2 ) * D2Ndir -
355 // (3.0 * D2r / R2) * DNdir) + (3.0 * Dr * Dr / R4) * DNdir -
356 // (D3r/R2) * Ndir + (6.0 * Dr * Dr / R4) * Ndir +
357 // (6.0 * Dr * D2r / R4) * Ndir - (15.0 * Dr* Dr* Dr /R6) * Ndir
361 basisCurve->D3 (U, P, V1, V2, V3);
362 Vec2d V4 = basisCurve->DN (U, 4);
363 Standard_Integer Index = 2;
364 while (V1.Magnitude() <= gp::Resolution() && Index <= MaxDegree) {
365 V1 = basisCurve->DN (U, Index);
369 V2 = basisCurve->DN (U, Index);
370 V3 = basisCurve->DN (U, Index + 1);
371 V4 = basisCurve->DN (U, Index + 2);
373 XY Ndir (V1.Y(), -V1.X());
374 XY DNdir (V2.Y(), -V2.X());
375 XY D2Ndir (V3.Y(), -V3.X());
376 XY D3Ndir (V4.Y(), -V4.X());
377 Standard_Real R2 = Ndir.SquareModulus();
378 Standard_Real R = Sqrt (R2);
379 Standard_Real R3 = R2 * R;
380 Standard_Real R4 = R2 * R2;
381 Standard_Real R5 = R3 * R2;
382 Standard_Real R6 = R3 * R3;
383 Standard_Real R7 = R5 * R2;
384 Standard_Real Dr = Ndir.Dot (DNdir);
385 Standard_Real D2r = Ndir.Dot (D2Ndir) + DNdir.Dot (DNdir);
386 Standard_Real D3r = Ndir.Dot (D3Ndir) + 3.0 * DNdir.Dot (D2Ndir);
387 if (R7 <= gp::Resolution()) {
388 //We try another computation but the stability is not very good
390 if (R6 <= gp::Resolution()) Geom2d_UndefinedDerivative::Raise();
392 D3Ndir.Subtract (D2Ndir.Multiplied (3.0 * offsetValue * Dr / R2));
394 (DNdir.Multiplied ((3.0 * offsetValue) * ((D2r/R2) + (Dr*Dr)/R4))));
395 D3Ndir.Add (Ndir.Multiplied (
396 (offsetValue * (6.0*Dr*Dr/R4 + 6.0*Dr*D2r/R4 - 15.0*Dr*Dr*Dr/R6 - D3r))
398 D3Ndir.Multiply (offsetValue/R);
399 V3.Add (Vec2d(D3Ndir));
401 Standard_Real R4 = R2 * R2;
402 D2Ndir.Subtract (DNdir.Multiplied (2.0 * Dr / R2));
403 D2Ndir.Subtract (Ndir.Multiplied (((3.0 * Dr * Dr)/R4) - (D2r/R2)));
404 D2Ndir.Multiply (offsetValue / R);
405 V2.Add (Vec2d(D2Ndir));
408 DNdir.Subtract (Ndir.Multiplied (Dr/R));
409 DNdir.Multiply (offsetValue/R2);
410 V1.Add (Vec2d(DNdir));
413 // Same computation as IICURV in EUCLID-IS because the stability is
416 D3Ndir.Multiply (offsetValue/R);
417 D3Ndir.Subtract (D2Ndir.Multiplied (3.0 * offsetValue * Dr / R3));
418 D3Ndir.Subtract (DNdir.Multiplied (
419 ((3.0 * offsetValue) * ((D2r/R3) + (Dr*Dr)/R5))) );
420 D3Ndir.Add (Ndir.Multiplied (
421 (offsetValue * (6.0*Dr*Dr/R5 + 6.0*Dr*D2r/R5 - 15.0*Dr*Dr*Dr/R7 - D3r))
423 V3.Add (Vec2d(D3Ndir));
425 D2Ndir.Multiply (offsetValue/R);
426 D2Ndir.Subtract (DNdir.Multiplied (2.0 * offsetValue * Dr / R3));
427 D2Ndir.Subtract (Ndir.Multiplied (
428 offsetValue * (((3.0 * Dr * Dr) / R5) - (D2r / R3))
431 V2.Add (Vec2d(D2Ndir));
433 DNdir.Multiply (offsetValue/R);
434 DNdir.Subtract (Ndir.Multiplied (offsetValue*Dr/R3));
435 V1.Add (Vec2d(DNdir));
438 Ndir.Multiply (offsetValue/R);
443 //=======================================================================
446 //=======================================================================
448 Vec2d Geom2d_OffsetCurve::DN (const Standard_Real U,
449 const Standard_Integer N) const
451 Standard_RangeError_Raise_if (N < 1, "Geom2d_OffsetCurve::DN()");
456 case 1: D1( U, PBidon, VN); break;
457 case 2: D2( U, PBidon, VBidon, VN); break;
458 case 3: D3( U, PBidon, VBidon, VBidon, VN); break;
460 Standard_NotImplemented::Raise();
467 //=======================================================================
470 //=======================================================================
472 void Geom2d_OffsetCurve::Value (const Standard_Real U,
473 Pnt2d& P, Pnt2d& Pbasis,
474 Vec2d& V1basis ) const
477 basisCurve->D1 (U, Pbasis, V1basis);
478 Standard_Integer Index = 2;
479 while (V1basis.Magnitude() <= gp::Resolution() && Index <= MaxDegree) {
480 V1basis = basisCurve->DN (U, Index);
483 Standard_Real A = V1basis.Y();
484 Standard_Real B = - V1basis.X();
485 Standard_Real R = Sqrt(A*A + B * B);
486 if (R <= gp::Resolution()) Geom2d_UndefinedValue::Raise();
487 A = A * offsetValue/R;
488 B = B * offsetValue/R;
489 P.SetCoord (A + Pbasis.X(), B + Pbasis.Y());
493 //=======================================================================
496 //=======================================================================
498 void Geom2d_OffsetCurve::D1 (const Standard_Real U,
499 Pnt2d& P, Pnt2d& Pbasis,
500 Vec2d& V1, Vec2d& V1basis,
501 Vec2d& V2basis ) const
503 // P(u) = p(u) + Offset * Ndir / R
504 // with R = || p' ^ Z|| and Ndir = P' ^ Z
506 // P'(u) = p'(u) + (Offset / R**2) * (DNdir/DU * R - Ndir * (DR/R))
508 basisCurve->D2 (U, Pbasis, V1basis, V2basis);
511 Standard_Integer Index = 2;
512 while (V1.Magnitude() <= gp::Resolution() && Index <= MaxDegree) {
513 V1 = basisCurve->DN (U, Index);
517 V2 = basisCurve->DN (U, Index);
519 XY Ndir (V1.Y(), -V1.X());
520 XY DNdir (V2.Y(), -V2.X());
521 Standard_Real R2 = Ndir.SquareModulus();
522 Standard_Real R = Sqrt (R2);
523 Standard_Real R3 = R * R2;
524 Standard_Real Dr = Ndir.Dot (DNdir);
525 if (R3 <= gp::Resolution()) {
526 //We try another computation but the stability is not very good.
527 if (R2 <= gp::Resolution()) { Geom2d_UndefinedDerivative::Raise(); }
529 DNdir.Subtract (Ndir.Multiplied (Dr/R));
530 DNdir.Multiply (offsetValue / R2);
531 V1.Add (Vec2d(DNdir));
534 // Same computation as IICURV in EUCLID-IS because the stability is
536 DNdir.Multiply (offsetValue/R);
537 DNdir.Subtract (Ndir.Multiplied (offsetValue*Dr/R3));
538 V1.Add (Vec2d(DNdir));
540 Ndir.Multiply (offsetValue/R);
541 Ndir.Add (Pbasis.XY());
546 //=======================================================================
549 //=======================================================================
551 void Geom2d_OffsetCurve::D2 (const Standard_Real U,
552 Pnt2d& P, Pnt2d& Pbasis,
553 Vec2d& V1, Vec2d& V2,
554 Vec2d& V1basis, Vec2d& V2basis,
555 Vec2d& V3basis ) const
557 // P(u) = p(u) + Offset * Ndir / R
558 // with R = || p' ^ Z|| and Ndir = P' ^ Z
560 // P'(u) = p'(u) + (Offset / R**2) * (DNdir/DU * R - Ndir * (DR/R))
562 // P"(u) = p"(u) + (Offset / R) * (D2Ndir/DU - DNdir * (2.0 * Dr/ R**2) +
563 // Ndir * ( (3.0 * Dr**2 / R**4) - (D2r / R**2)))
565 basisCurve->D3 (U, Pbasis, V1basis, V2basis, V3basis);
566 Standard_Integer Index = 2;
570 while (V1.Magnitude() <= gp::Resolution() && Index <= MaxDegree) {
571 V1 = basisCurve->DN (U, Index);
575 V2 = basisCurve->DN (U, Index);
576 V3 = basisCurve->DN (U, Index + 1);
578 XY Ndir (V1.Y(), -V1.X());
579 XY DNdir (V2.Y(), -V2.X());
580 XY D2Ndir (V3.Y(), -V3.X());
581 Standard_Real R2 = Ndir.SquareModulus();
582 Standard_Real R = Sqrt (R2);
583 Standard_Real R3 = R2 * R;
584 Standard_Real R4 = R2 * R2;
585 Standard_Real R5 = R3 * R2;
586 Standard_Real Dr = Ndir.Dot (DNdir);
587 Standard_Real D2r = Ndir.Dot (D2Ndir) + DNdir.Dot (DNdir);
588 if (R5 <= gp::Resolution()) {
589 //We try another computation but the stability is not very good
591 if (R4 <= gp::Resolution()) { Geom2d_UndefinedDerivative::Raise(); }
593 Standard_Real R4 = R2 * R2;
594 D2Ndir.Subtract (DNdir.Multiplied (2.0 * Dr / R2));
595 D2Ndir.Subtract (Ndir.Multiplied (((3.0 * Dr * Dr)/R4) - (D2r/R2)));
596 D2Ndir.Multiply (offsetValue / R);
597 V2.Add (Vec2d(D2Ndir));
600 DNdir.Subtract (Ndir.Multiplied (Dr/R));
601 DNdir.Multiply (offsetValue/R2);
602 V1.Add (Vec2d(DNdir));
605 // Same computation as IICURV in EUCLID-IS because the stability is
608 D2Ndir.Multiply (offsetValue/R);
609 D2Ndir.Subtract (DNdir.Multiplied (2.0 * offsetValue * Dr / R3));
610 D2Ndir.Subtract (Ndir.Multiplied (
611 offsetValue * (((3.0 * Dr * Dr) / R5) - (D2r / R3))
614 V2.Add (Vec2d(D2Ndir));
616 DNdir.Multiply (offsetValue/R);
617 DNdir.Subtract (Ndir.Multiplied (offsetValue*Dr/R3));
618 V1.Add (Vec2d(DNdir));
621 Ndir.Multiply (offsetValue/R);
622 Ndir.Add (Pbasis.XY());
626 //=======================================================================
627 //function : FirstParameter
629 //=======================================================================
631 Standard_Real Geom2d_OffsetCurve::FirstParameter () const
633 return basisCurve->FirstParameter();
636 //=======================================================================
637 //function : LastParameter
639 //=======================================================================
641 Standard_Real Geom2d_OffsetCurve::LastParameter () const
643 return basisCurve->LastParameter();
647 //=======================================================================
650 //=======================================================================
652 Standard_Real Geom2d_OffsetCurve::Offset () const { return offsetValue; }
654 //=======================================================================
655 //function : IsClosed
657 //=======================================================================
659 Standard_Boolean Geom2d_OffsetCurve::IsClosed () const
662 D0(FirstParameter(),PF);
663 D0(LastParameter(),PL);
664 return ( PF.Distance(PL) <= gp::Resolution());
667 //=======================================================================
670 //=======================================================================
672 Standard_Boolean Geom2d_OffsetCurve::IsCN (const Standard_Integer N) const
674 Standard_RangeError_Raise_if (N < 0, " " );
675 return basisCurve->IsCN (N + 1);
678 //=======================================================================
679 //function : IsPeriodic
681 //=======================================================================
683 Standard_Boolean Geom2d_OffsetCurve::IsPeriodic () const
685 return basisCurve->IsPeriodic();
688 //=======================================================================
691 //=======================================================================
693 Standard_Real Geom2d_OffsetCurve::Period() const
695 return basisCurve->Period();
698 //=======================================================================
699 //function : Transform
701 //=======================================================================
703 void Geom2d_OffsetCurve::Transform (const Trsf2d& T)
705 basisCurve->Transform (T);
706 offsetValue *= Abs(T.ScaleFactor());
710 //=======================================================================
711 //function : TransformedParameter
713 //=======================================================================
715 Standard_Real Geom2d_OffsetCurve::TransformedParameter(const Standard_Real U,
716 const gp_Trsf2d& T) const
718 return basisCurve->TransformedParameter(U,T);
721 //=======================================================================
722 //function : ParametricTransformation
724 //=======================================================================
726 Standard_Real Geom2d_OffsetCurve::ParametricTransformation(const gp_Trsf2d& T) const
728 return basisCurve->ParametricTransformation(T);