0024166: Unable to create file with "Save" menu of voxeldemo Qt sample
[occt.git] / src / ShapeCustom / ShapeCustom_ConvertToBSpline.cdl
CommitLineData
b311480e 1-- Created on: 1999-06-17
2-- Created by: data exchange team
3-- Copyright (c) 1999 Matra Datavision
4-- Copyright (c) 1999-2012 OPEN CASCADE SAS
5--
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.
10--
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.
13--
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.
20
7fd59977 21
22
23private class ConvertToBSpline from ShapeCustom inherits Modification from BRepTools
24
25 ---Purpose: implement a modification for BRepTools
26 -- Modifier algortihm. Converts Surface of
27 -- Linear Exctrusion, Revolution and Offset
28 -- surfaces into BSpline Surface according to
29 -- flags.
30
31uses
32
33 Face from TopoDS,
34 Edge from TopoDS,
35 Vertex from TopoDS,
36 Shape from GeomAbs,
37 Surface from Geom,
38 Curve from Geom,
39 Curve from Geom2d,
40 Pnt from gp,
41 Location from TopLoc
42is
43
44 Create returns mutable ConvertToBSpline from ShapeCustom;
45
46 SetExtrusionMode(me: mutable; extrMode: Boolean);
47 ---Purpose: Sets mode for convertion of Surfaces of Linear
48 -- extrusion.
49
50 SetRevolutionMode(me: mutable; revolMode: Boolean);
51 ---Purpose: Sets mode for convertion of Surfaces of Revolution.
52
53 SetOffsetMode(me: mutable; offsetMode: Boolean);
54 ---Purpose: Sets mode for convertion of Offset surfaces.
55
56 SetPlaneMode(me: mutable; planeMode: Boolean);
57 ---Purpose: Sets mode for convertion of Plane surfaces.
58
59 NewSurface(me: mutable; F : Face from TopoDS;
60 S : out Surface from Geom;
61 L : out Location from TopLoc;
62 Tol: out Real from Standard;
63 RevWires : out Boolean from Standard;
64 RevFace : out Boolean from Standard)
65 returns Boolean from Standard;
66 ---Purpose: Returns Standard_True if the face <F> has been
67 -- modified. In this case, <S> is the new geometric
68 -- support of the face, <L> the new location, <Tol>
69 -- the new tolerance. Otherwise, returns
70 -- Standard_False, and <S>, <L>, <Tol> are not
71 -- significant.
72
73 NewCurve(me: mutable; E : Edge from TopoDS;
74 C : out Curve from Geom;
75 L : out Location from TopLoc;
76 Tol: out Real from Standard)
77 returns Boolean from Standard;
78 ---Purpose: Returns Standard_True if the edge <E> has been
79 -- modified. In this case, <C> is the new geometric
80 -- support of the edge, <L> the new location, <Tol>
81 -- the new tolerance. Otherwise, returns
82 -- Standard_False, and <C>, <L>, <Tol> are not
83 -- significant.
84
85 NewPoint(me: mutable; V : Vertex from TopoDS;
86 P : out Pnt from gp;
87 Tol: out Real from Standard)
88 returns Boolean from Standard;
89 ---Purpose: Returns Standard_True if the vertex <V> has been
90 -- modified. In this case, <P> is the new geometric
91 -- support of the vertex, <Tol> the new tolerance.
92 -- Otherwise, returns Standard_False, and <P>, <Tol>
93 -- are not significant.
94
95 NewCurve2d(me: mutable; E : Edge from TopoDS;
96 F : Face from TopoDS;
97 NewE : Edge from TopoDS;
98 NewF : Face from TopoDS;
99 C : out Curve from Geom2d;
100 Tol : out Real from Standard)
101 returns Boolean from Standard;
102 ---Purpose: Returns Standard_True if the edge <E> has a new
103 -- curve on surface on the face <F>.In this case, <C>
104 -- is the new geometric support of the edge, <L> the
105 -- new location, <Tol> the new tolerance.
106 --
107 -- Otherwise, returns Standard_False, and <C>, <L>,
108 -- <Tol> are not significant.
109 --
110 -- <NewE> is the new edge created from <E>. <NewF>
111 -- is the new face created from <F>. They may be usefull.
112
113 NewParameter(me: mutable; V : Vertex from TopoDS;
114 E : Edge from TopoDS;
115 P : out Real from Standard;
116 Tol: out Real from Standard)
117 returns Boolean from Standard;
118 ---Purpose: Returns Standard_True if the Vertex <V> has a new
119 -- parameter on the edge <E>. In this case, <P> is
120 -- the parameter, <Tol> the new tolerance.
121 -- Otherwise, returns Standard_False, and <P>, <Tol>
122 -- are not significant.
123
124 Continuity(me: mutable; E : Edge from TopoDS;
125 F1,F2 : Face from TopoDS;
126 NewE : Edge from TopoDS;
127 NewF1,NewF2: Face from TopoDS)
128 returns Shape from GeomAbs;
129 ---Purpose: Returns the continuity of <NewE> between <NewF1>
130 -- and <NewF2>.
131 --
132 -- <NewE> is the new edge created from <E>. <NewF1>
133 -- (resp. <NewF2>) is the new face created from <F1>
134 -- (resp. <F2>).
135
136 IsToConvert(me; S : Surface from Geom;
137 SS:out Surface from Geom)
138 returns Boolean is private;
139
140fields
141
142 myExtrMode : Boolean;
143 myRevolMode : Boolean;
144 myOffsetMode: Boolean;
145 myPlaneMode : Boolean;
146
147end ConvertToBSpline;