4af0660cc7474a48d703ce7344820d9e731004b0
[occt.git] / src / BRepFeat / BRepFeat_MakeDPrism.cdl
1 -- Created on: 1996-09-03
2 -- Created by: Olga PILLOT
3 -- Copyright (c) 1996-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
8 -- This library is free software; you can redistribute it and / or modify it
9 -- under the terms of the GNU Lesser General Public 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.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class MakeDPrism from BRepFeat inherits Form from BRepFeat
18
19         ---Purpose: Describes functions to build draft
20         -- prism topologies from basis shape surfaces. These can be depressions or protrusions.
21         -- The semantics of draft prism feature creation is based on the
22         -- construction of shapes:
23         -- -          along a length
24         -- -          up to a limiting face
25         -- -          from a limiting face to a height.
26         -- The shape defining construction of the draft prism feature can be
27         -- either the supporting edge or the concerned area of a face.
28         -- In case of the supporting edge, this contour can be attached to a
29         -- face of the basis shape by binding. When the contour is bound to this
30         -- face, the information that the contour will slide on the face
31         -- becomes available to the relevant class methods.
32         -- In case of the concerned area of a face, you could, for example, cut
33         -- it out and move it to a different height which will define the
34         -- limiting face of a protrusion or depression.
35
36 uses Shape                     from TopoDS,
37      Face                      from TopoDS,
38      Wire                      from TopoDS,
39      Edge                      from TopoDS,
40      DataMapOfShapeListOfShape from TopTools,
41      DataMapOfShapeShape       from TopTools,
42      SequenceOfCurve           from TColGeom,
43      Curve                     from Geom,
44      ListOfShape               from TopTools,
45      StatusError               from BRepFeat
46
47 raises ConstructionError from Standard
48
49 is
50
51
52     Create(Sbase     : Shape   from TopoDS;
53            Pbase     : Face    from TopoDS;
54            Skface    : Face    from TopoDS;
55            Angle     : Real    from Standard;
56            Fuse      : Integer from Standard;
57            Modify    : Boolean from Standard)
58
59            
60         ---Purpose: A face Pbase is selected in the shape
61         --   Sbase to serve as the basis for the draft prism. The
62         --   draft will be defined by the angle Angle and Fuse offers a choice between:
63         -- - removing matter with a Boolean cut using the setting 0
64         -- - adding matter with Boolean fusion using the setting 1.
65         --    The sketch face Skface serves to determine the type of
66         -- operation. If it is inside the basis shape, a local
67         -- operation such as glueing can be performed.
68                 ---C++: inline
69                 returns MakeDPrism from BRepFeat;
70
71     Create
72         ---Purpose: Initializes the draft prism class
73                 ---C++: inline
74                 returns MakeDPrism from BRepFeat;
75
76
77
78
79     Init(me: in out; Sbase     : Shape   from TopoDS;
80                      Pbase     : Face    from TopoDS;
81                      Skface    : Face    from TopoDS;
82                      Angle     : Real    from Standard;
83                      Fuse      : Integer from Standard;
84                      Modify    : Boolean from Standard)
85         is static;
86         ---Purpose: Initializes this algorithm for building draft prisms along surfaces.
87         -- A face Pbase is selected in the basis shape Sbase to
88         -- serve as the basis from the draft prism. The draft will be
89         -- defined by the angle Angle and Fuse offers a choice between:
90         -- -   removing matter with a Boolean cut using the setting 0
91         -- -   adding matter with Boolean fusion using the setting  1.
92         --   The sketch face Skface serves to determine the type of
93         -- operation. If it is inside the basis shape, a local
94         -- operation such as glueing can be performed.
95
96     Add(me: in out; E: Edge from TopoDS; OnFace: Face from TopoDS)
97
98         ---Purpose: Indicates that the edge <E> will slide on the face
99         --          <OnFace>. 
100         -- Raises ConstructionError if the  face does not belong to the
101         -- basis shape, or the edge to the prismed shape.
102         raises ConstructionError from Standard
103         
104         is static;
105
106
107     Perform(me: in out; Height: Real from Standard)
108      
109         is static;
110
111
112     Perform(me: in out; Until: Shape from TopoDS)
113     
114         is static;
115
116
117     Perform(me: in out; From : Shape from TopoDS;
118                         Until: Shape from TopoDS)
119     
120         is static;
121         ---Purpose: Assigns one of the following semantics
122         -- -   to a height Height
123         -- -   to a face Until
124         -- -   from a face From to a height Until.
125         -- Reconstructs the feature topologically according to the semantic option chosen.
126     
127     PerformUntilEnd(me: in out)
128         ---Purpose: Realizes a semi-infinite prism, limited by the position of the prism base.   
129         is static;
130
131     PerformFromEnd(me: in out; FUntil: Shape from TopoDS)
132         ---Purpose: Realizes a semi-infinite prism, limited by the face Funtil. 
133         is static;
134
135     PerformThruAll(me: in out)
136         ---Purpose: Builds an infinite prism. The infinite descendants will not be kept in the result.    
137         is static;
138
139     PerformUntilHeight(me: in out; Until :  Shape from TopoDS;
140                         Height:  Real  from Standard)
141         ---Purpose: Assigns both a limiting shape, Until from
142         -- TopoDS_Shape, and a height, Height at which to stop
143         -- generation of the prism feature.    
144         is static;
145
146
147     Curves(me: in out; S : in out SequenceOfCurve from TColGeom);
148     
149
150     BarycCurve(me: in out)    
151         returns Curve from Geom;
152         
153         
154     BossEdges(me: in out; sig: Integer from Standard)
155         ---Purpose: Determination of TopEdges and LatEdges.
156         --          sig = 1 -> TopEdges = FirstShape of the DPrism
157         --          sig = 2 -> TOpEdges = LastShape of the DPrism
158         is static;
159
160         
161     TopEdges(me: in out)
162         ---Purpose: Returns the list of TopoDS Edges of the top of the boss.
163     returns ListOfShape from TopTools
164         ---C++: return const&
165         is static;
166
167
168     LatEdges(me: in out)
169         ---Purpose: Returns the list of TopoDS Edges of the bottom of the boss.
170     returns ListOfShape from TopTools
171         ---C++: return const&
172         is static;
173
174
175 fields
176
177     myPbase  : Face                      from TopoDS;
178     mySlface : DataMapOfShapeListOfShape from TopTools;
179     myAngle  : Real                      from Standard;
180     myCurves : SequenceOfCurve           from TColGeom;
181     myBCurve : Curve                     from Geom;    
182     myTopEdges    : ListOfShape          from TopTools;
183     myLatEdges    : ListOfShape          from TopTools; 
184     myStatusError : StatusError          from BRepFeat;
185
186 end MakeDPrism;
187
188
189
190