0022934: Wrong delete operator in IGESSelect_SelectFromDrawing.cxx / IGESSelect_Selec...
[occt.git] / src / IGESSelect / IGESSelect_SplineToBSpline.cdl
1 -- File:        IGESSelect_SplineToBSpline.cdl
2 -- Created:     Thu Jun  2 18:18:34 1994
3 -- Author:      Christian CAILLET
4 --              <cky@bravox>
5 ---Copyright:    Matra Datavision 1994
6
7
8 class SplineToBSpline  from IGESSelect  inherits Transformer
9
10     ---Purpose : This type of Transformer allows to convert Spline Curves (IGES
11     --           type 112) and Surfaces (IGES Type 126) to BSpline Curves (IGES
12     --           type 114) and Surfac (IGES Type 128). All other entities are
13     --           rebuilt as identical but on the basis of this conversion.
14     --           
15     --           It also gives an option to, either convert as such (i.e. each
16     --           starting part of the spline becomes a segment of the bspline,
17     --           with continuity C0 between segments), or try to increase
18     --           continuity as far as possible to C1 or to C2.
19     --           
20     --           It does nothing if the starting model contains no Spline
21     --           Curve (IGES Type 112) or Surface (IGES Type 126). Else,
22     --           converting and rebuilding implies copying of entities.
23
24 uses AsciiString from TCollection,
25      CheckIterator, Graph, CopyControl, Protocol from Interface, InterfaceModel
26
27 is
28
29     Create (tryC2 : Boolean) returns mutable SplineToBSpline;
30     ---Purpose : Creates a Transformer SplineToBSpline. If <tryC2> is True,
31     --           it will in addition try to upgrade continuity up to C2.
32
33     OptionTryC2 (me) returns Boolean;
34     ---Purpose : Returns the option TryC2 given at creation time
35
36     Perform (me : mutable; G : Graph; protocol : Protocol from Interface;
37              checks : in out CheckIterator;
38              newmod : out mutable InterfaceModel)  returns Boolean;
39     ---Purpose : Performs the transformation, if there is at least one Spline
40     --           Curve (112) or Surface (126). Does nothing if there is none.
41
42     Updated (me; entfrom : Transient; entto : out mutable Transient)
43         returns Boolean;
44     ---Purpose : Returns the transformed entities.
45     --           If original data contained no Spline Curve or Surface,
46     --           the result is identity : <entto> = <entfrom>
47     --           Else, the copied counterpart is returned : for a Spline Curve
48     --           or Surface, it is a converted BSpline Curve or Surface. Else,
49     --           it is the result of general service Copy (rebuilt as necessary
50     --           by BSPlines replacing Splines).
51
52     Label (me) returns AsciiString from TCollection;
53     ---Purpose : Returns a text which defines the way a Transformer works :
54     --           "Conversion Spline to BSpline" and as opted,
55     --           " trying to upgrade continuity"
56
57 fields
58
59     thetryc2 : Boolean;
60     thefound : Boolean;        -- at least one Spline found and converted
61     themap   : CopyControl;
62
63 end SplineToBSpline;