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
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
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class MakeDPrism from BRepFeat inherits Form from BRepFeat
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:
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.
36 uses Shape from TopoDS,
40 DataMapOfShapeListOfShape from TopTools,
41 DataMapOfShapeShape from TopTools,
42 SequenceOfCurve from TColGeom,
44 ListOfShape from TopTools,
45 StatusError from BRepFeat
47 raises ConstructionError from Standard
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)
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.
69 returns MakeDPrism from BRepFeat;
72 ---Purpose: Initializes the draft prism class
74 returns MakeDPrism from BRepFeat;
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)
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.
96 Add(me: in out; E: Edge from TopoDS; OnFace: Face from TopoDS)
98 ---Purpose: Indicates that the edge <E> will slide on the face
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
107 Perform(me: in out; Height: Real from Standard)
112 Perform(me: in out; Until: Shape from TopoDS)
117 Perform(me: in out; From : Shape from TopoDS;
118 Until: Shape from TopoDS)
121 ---Purpose: Assigns one of the following semantics
122 -- - to a height Height
124 -- - from a face From to a height Until.
125 -- Reconstructs the feature topologically according to the semantic option chosen.
127 PerformUntilEnd(me: in out)
128 ---Purpose: Realizes a semi-infinite prism, limited by the position of the prism base.
131 PerformFromEnd(me: in out; FUntil: Shape from TopoDS)
132 ---Purpose: Realizes a semi-infinite prism, limited by the face Funtil.
135 PerformThruAll(me: in out)
136 ---Purpose: Builds an infinite prism. The infinite descendants will not be kept in the result.
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.
147 Curves(me: in out; S : in out SequenceOfCurve from TColGeom);
150 BarycCurve(me: in out)
151 returns Curve from Geom;
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
162 ---Purpose: Returns the list of TopoDS Edges of the top of the boss.
163 returns ListOfShape from TopTools
164 ---C++: return const&
169 ---Purpose: Returns the list of TopoDS Edges of the bottom of the boss.
170 returns ListOfShape from TopTools
171 ---C++: return const&
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;