1 -- Created on: 1996-03-08
2 -- Created by: Jacques GOUSSARD
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.
23 class Gluer from BRepFeat inherits MakeShape from BRepBuilderAPI
25 ---Purpose: One of the most significant aspects
26 -- of BRepFeat functionality is the use of local operations as opposed
27 -- to global ones. In a global operation, you would first
28 -- construct a form of the type you wanted in your final feature, and
29 -- then remove matter so that it could fit into your initial basis object.
30 -- In a local operation, however, you specify the domain of the feature
31 -- construction with aspects of the shape on which the feature is being
32 -- created. These semantics are expressed in terms of a member
33 -- shape of the basis shape from which - or up to which - matter will be
34 -- added or removed. As a result, local operations make calculations
35 -- simpler and faster than global operations.
36 -- Glueing uses wires or edges of a face in the basis shape. These are
37 -- to become a part of the feature. They are first cut out and then
38 -- projected to a plane outside or inside the basis shape. By
39 -- rebuilding the initial shape incorporating the edges and the
40 -- faces of the tool, protrusion features can be constructed.
43 uses Shape from TopoDS,
46 ListOfShape from TopTools,
49 Operation from LocOpe,
51 ShapeModification from BRepBuilderAPI
58 ---Purpose: Initializes an empty constructor
59 returns Gluer from BRepFeat;
63 Create(Snew: Shape from TopoDS;
64 Sbase : Shape from TopoDS)
65 ---Purpose: Initializes the shapes to be glued, the new shape
66 -- Snew and the basis shape Sbase.
67 returns Gluer from BRepFeat;
71 Init(me: in out; Snew: Shape from TopoDS;
72 Sbase : Shape from TopoDS)
73 ---Purpose: Initializes the new shape Snew and the basis shape
74 -- Sbase for the local glueing operation.
79 Bind(me: in out; Fnew : Face from TopoDS;
80 Fbase : Face from TopoDS)
81 ---Purpose: Defines a contact between Fnew on the new shape
82 -- Snew and Fbase on the basis shape Sbase. Informs
83 -- other methods that Fnew in the new shape Snew is
84 -- connected to the face Fbase in the basis shape Sbase.
85 -- The contact faces of the glued shape must not have
86 -- parts outside the contact faces of the basis shape.
87 -- This indicates that glueing is possible.
92 Bind(me: in out; Enew : Edge from TopoDS;
93 Ebase: Edge from TopoDS)
94 ---Purpose: nforms other methods that the edge Enew in the new
95 -- shape is the same as the edge Ebase in the basis
96 -- shape and is therefore attached to the basis shape. This
97 -- indicates that glueing is possible.
105 returns Operation from LocOpe
106 ---Purpose: Determine which operation type to use glueing or sliding.
113 returns Shape from TopoDS
114 ---Purpose: Returns the basis shape of the compound shape.
115 ---C++: return const&
122 returns Shape from TopoDS
123 ---C++: return const&
125 --- Purpose: Returns the resulting compound shape.
129 -- Methods redefined from BRepBuilderAPI_MakeShape
132 ---Purpose: This is called by Shape(). It does nothing but
138 -----------------------------------------------------------
139 --- the following methods do nothing and must be redefined
140 --- for faces modifications and creations.
142 IsDeleted(me: in out; F: Shape from TopoDS)
143 ---Purpose: returns the status of the Face after
144 -- the shape creation.
146 returns Boolean from Standard
150 Modified(me: in out; F: Shape from TopoDS)
151 ---Purpose: returns the list of generated Faces.
152 ---C++: return const &
154 returns ListOfShape from TopTools
160 myGluer: Gluer from LocOpe;