blob: bf197a93ce0aa1df3a04c89d974b155d4dbe8ed3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
-- File: CircleToBSplineCurve.cdl
-- Created: Thu Oct 10 14:22:44 1991
-- Author: Jean Claude VAUTHIER
---Copyright: Matra Datavision 1991, 1992
class CircleToBSplineCurve from Convert inherits ConicToBSplineCurve
--- Purpose :
-- This algorithm converts a circle into a rational B-spline curve.
-- The circle is a Circ2d from package gp and its parametrization is :
-- P (U) = Loc + R * (Cos(U) * Xdir + Sin(U) * YDir) where Loc is the
-- center of the circle Xdir and Ydir are the normalized directions
-- of the local cartesian coordinate system of the circle.
-- The parametrization range for the circle is U [0, 2Pi].
--
--- Warnings :
-- The parametrization range for the B-spline curve is not [0, 2Pi].
--
--- KeyWords :
-- Convert, Circle, BSplineCurve, 2D .
uses Circ2d from gp,
ParameterisationType from Convert
raises DomainError from Standard
is
Create (C : Circ2d;
Parameterisation : ParameterisationType from Convert
= Convert_TgtThetaOver2)
returns CircleToBSplineCurve;
--- Purpose :
-- The equivalent B-spline curve has the same orientation
-- as the circle C.
Create (C : Circ2d; U1, U2 : Real ;
Parameterisation : ParameterisationType from Convert
= Convert_TgtThetaOver2)
returns CircleToBSplineCurve
--- Purpose :
-- The circle C is limited between the parametric values U1, U2
-- in radians. U1 and U2 [0.0, 2*Pi] .
-- The equivalent B-spline curve is oriented from U1 to U2 and has
-- the same orientation as the circle C.
raises DomainError;
--- Purpose :
-- Raised if U1 = U2 or U1 = U2 + 2.0 * Pi
end CircleToBSplineCurve;
|