1 -- Created on: 1993-01-09
2 -- Created by: CKY / Contract Toubro-Larsen (Kiran)
3 -- Copyright (c) 1993-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 under
9 -- the terms of the GNU Lesser General Public License 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 class ConicArc from IGESGeom inherits IGESEntity
19 ---Purpose: defines IGESConicArc, Type <104> Form <0-3> in package IGESGeom
20 -- A conic arc is a bounded connected portion of a parent
21 -- conic curve which consists of more than one point. The
22 -- parent conic curve is either an ellipse, a parabola, or
23 -- a hyperbola. The definition space coordinate system is
24 -- always chosen so that the conic arc lies in a plane either
25 -- coincident with or parallel to XT, YT plane. Within such
26 -- a plane a conic is defined by the six coefficients in the
27 -- following equation.
28 -- A*XT^2 + B*XT*YT + C*YT^2 + D*XT + E*YT + F = 0
39 Create returns ConicArc;
41 -- Specific Methods pertaining to the class
44 A, B, C, D, E, F, ZT : Real;
46 ---Purpose : This method is used to set the fields of the class
48 -- - A, B, C, D, E, F : Coefficients of the equation
50 -- - ZT : Parallel ZT displacement of the arc
52 -- - aStart : Starting point of the conic arc
53 -- - anEnd : End point of the conic arc
55 OwnCorrect (me : mutable) returns Boolean;
56 ---Purpose : sets the Form Number equal to ComputedFormNumber,
57 -- returns True if changed
59 ComputedFormNumber (me) returns Integer;
60 ---Purpose : Computes the Form Number according to the equation
61 -- 1 for Ellipse, 2 for Hyperbola, 3 for Parabola
63 Equation (me; A, B, C, D, E, F : out Real);
64 -- returns the basic equation defining the arc
65 -- A, B, C, D, E, F are the coefficients of the equation
67 ZPlane (me) returns Real;
68 ---Purpose : returns the Z displacement of the arc from XT, YT plane
70 StartPoint (me) returns Pnt2d;
71 ---Purpose : returns the starting point of the arc
73 TransformedStartPoint (me) returns Pnt;
74 ---Purpose : returns the starting point of the arc after applying
77 EndPoint (me) returns Pnt2d;
78 ---Purpose : returns the end point of the arc
80 TransformedEndPoint (me) returns Pnt;
81 ---Purpose : returns the end point of the arc after applying
84 IsFromEllipse (me) returns Boolean;
85 ---Purpose : returns True if parent conic curve is an ellipse
87 IsFromParabola (me) returns Boolean;
88 ---Purpose : returns True if parent conic curve is a parabola
90 IsFromHyperbola (me) returns Boolean;
91 ---Purpose : returns True if parent conic curve is a hyperbola
93 IsClosed (me) returns Boolean;
94 ---Purpose : returns True if StartPoint = EndPoint
98 ---Purpose : Z-Axis of conic (i.e. [0,0,1])
100 TransformedAxis (me) returns Dir;
101 ---Purpose : Z-Axis after applying Trans. Matrix
103 Definition (me; Center : out Pnt; MainAxis : out Dir;
104 rmin, rmax : out Real);
105 ---Purpose : Returns a Definition computed from equation, easier to use
106 -- <Center> : the center of the the conic (meaningless for
107 -- a parabola) (defined with Z displacement)
108 -- <MainAxis> : the Main Axis of the conic (for a Circle,
109 -- arbitrary the X Axis)
110 -- <Rmin,Rmax> : Minor and Major Radii of the conic
111 -- For a Circle, Rmin = Rmax,
112 -- For a Parabola, Rmin = Rmax = the Focal
113 -- Warning : the basic definition (by equation) is not very stable,
114 -- limit cases may be approximative
116 TransformedDefinition (me; Center : out Pnt; MainAxis : out Dir;
117 rmin, rmax : out Real);
118 ---Purpose : Same as Definition, but the Location is applied on the
119 -- Center and the MainAxis
121 ComputedDefinition (me; Xcen,Ycen, Xax, Yax, Rmin,Rmax : out Real);
122 ---Purpose : Computes and returns the coordinates of the definition of
123 -- a comic from its equation. Used by Definition &
124 -- TransformedDefinition, or may be called directly if needed
129 -- Class : IGESGeom_ConicArc
131 -- Purpose : Declaration of variables specific to the definition
132 -- of the Class ConicArc.
134 -- Reminder : A ConicArc instance is defined by :
135 -- The six coefficients in the following equation.
136 -- A*XT^2 + B*XT*YT + C*YT^2 + D*XT + E*YT + F = 0
137 -- The parent curve could be a parabola or a hyperbola
138 -- or an ellipse. The arc has one start and one end point.
146 -- Conic coefficients