1 -- Created on: 1996-09-03
2 -- Created by: Olga PILLOT
3 -- Copyright (c) 1996-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
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.
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.
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.
25 class MakeDPrism from BRepFeat inherits Form from BRepFeat
27 ---Purpose: Describes functions to build draft
28 -- prism topologies from basis shape surfaces. These can be depressions or protrusions.
29 -- The semantics of draft prism feature creation is based on the
30 -- construction of shapes:
32 -- - up to a limiting face
33 -- - from a limiting face to a height.
34 -- The shape defining construction of the draft prism feature can be
35 -- either the supporting edge or the concerned area of a face.
36 -- In case of the supporting edge, this contour can be attached to a
37 -- face of the basis shape by binding. When the contour is bound to this
38 -- face, the information that the contour will slide on the face
39 -- becomes available to the relevant class methods.
40 -- In case of the concerned area of a face, you could, for example, cut
41 -- it out and move it to a different height which will define the
42 -- limiting face of a protrusion or depression.
44 uses Shape from TopoDS,
48 DataMapOfShapeListOfShape from TopTools,
49 DataMapOfShapeShape from TopTools,
50 SequenceOfCurve from TColGeom,
52 ListOfShape from TopTools,
53 StatusError from BRepFeat
55 raises ConstructionError from Standard
60 Create(Sbase : Shape from TopoDS;
61 Pbase : Face from TopoDS;
62 Skface : Face from TopoDS;
63 Angle : Real from Standard;
64 Fuse : Integer from Standard;
65 Modify : Boolean from Standard)
68 ---Purpose: A face Pbase is selected in the shape
69 -- Sbase to serve as the basis for the draft prism. The
70 -- draft will be defined by the angle Angle and Fuse offers a choice between:
71 -- - removing matter with a Boolean cut using the setting 0
72 -- - adding matter with Boolean fusion using the setting 1.
73 -- The sketch face Skface serves to determine the type of
74 -- operation. If it is inside the basis shape, a local
75 -- operation such as glueing can be performed.
77 returns MakeDPrism from BRepFeat;
80 ---Purpose: Initializes the draft prism class
82 returns MakeDPrism from BRepFeat;
87 Init(me: in out; Sbase : Shape from TopoDS;
88 Pbase : Face from TopoDS;
89 Skface : Face from TopoDS;
90 Angle : Real from Standard;
91 Fuse : Integer from Standard;
92 Modify : Boolean from Standard)
94 ---Purpose: Initializes this algorithm for building draft prisms along surfaces.
95 -- A face Pbase is selected in the basis shape Sbase to
96 -- serve as the basis from the draft prism. The draft will be
97 -- defined by the angle Angle and Fuse offers a choice between:
98 -- - removing matter with a Boolean cut using the setting 0
99 -- - adding matter with Boolean fusion using the setting 1.
100 -- The sketch face Skface serves to determine the type of
101 -- operation. If it is inside the basis shape, a local
102 -- operation such as glueing can be performed.
104 Add(me: in out; E: Edge from TopoDS; OnFace: Face from TopoDS)
106 ---Purpose: Indicates that the edge <E> will slide on the face
108 -- Raises ConstructionError if the face does not belong to the
109 -- basis shape, or the edge to the prismed shape.
110 raises ConstructionError from Standard
115 Perform(me: in out; Height: Real from Standard)
120 Perform(me: in out; Until: Shape from TopoDS)
125 Perform(me: in out; From : Shape from TopoDS;
126 Until: Shape from TopoDS)
129 ---Purpose: Assigns one of the following semantics
130 -- - to a height Height
132 -- - from a face From to a height Until.
133 -- Reconstructs the feature topologically according to the semantic option chosen.
135 PerformUntilEnd(me: in out)
136 ---Purpose: Realizes a semi-infinite prism, limited by the position of the prism base.
139 PerformFromEnd(me: in out; FUntil: Shape from TopoDS)
140 ---Purpose: Realizes a semi-infinite prism, limited by the face Funtil.
143 PerformThruAll(me: in out)
144 ---Purpose: Builds an infinite prism. The infinite descendants will not be kept in the result.
147 PerformUntilHeight(me: in out; Until : Shape from TopoDS;
148 Height: Real from Standard)
149 ---Purpose: Assigns both a limiting shape, Until from
150 -- TopoDS_Shape, and a height, Height at which to stop
151 -- generation of the prism feature.
155 Curves(me: in out; S : in out SequenceOfCurve from TColGeom);
158 BarycCurve(me: in out)
159 returns Curve from Geom;
162 BossEdges(me: in out; sig: Integer from Standard)
163 ---Purpose: Determination of TopEdges and LatEdges.
164 -- sig = 1 -> TopEdges = FirstShape of the DPrism
165 -- sig = 2 -> TOpEdges = LastShape of the DPrism
170 ---Purpose: Returns the list of TopoDS Edges of the top of the boss.
171 returns ListOfShape from TopTools
172 ---C++: return const&
177 ---Purpose: Returns the list of TopoDS Edges of the bottom of the boss.
178 returns ListOfShape from TopTools
179 ---C++: return const&
185 myPbase : Face from TopoDS;
186 mySlface : DataMapOfShapeListOfShape from TopTools;
187 myAngle : Real from Standard;
188 myCurves : SequenceOfCurve from TColGeom;
189 myBCurve : Curve from Geom;
190 myTopEdges : ListOfShape from TopTools;
191 myLatEdges : ListOfShape from TopTools;
192 myStatusError : StatusError from BRepFeat;