0023367: New functionality restoring the middle path of pipe-like shape
[occt.git] / src / BRepOffsetAPI / BRepOffsetAPI_MakeOffset.cdl
1 -- Created on: 1995-09-18
2 -- Created by: Bruno DUMORTIER
3 -- Copyright (c) 1995-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
21
22
23 class MakeOffset from BRepOffsetAPI inherits MakeShape from BRepBuilderAPI
24
25         ---Purpose: Describes algorithms for offsetting wires from a set of
26         -- wires contained in a planar face.
27         -- A MakeOffset object provides a framework for:
28         -- - defining the construction of an offset,
29         -- - implementing the construction algorithm, and
30         -- - consulting the result. 
31
32 uses
33     Shape             from TopoDS,
34     Wire              from TopoDS,
35     Face              from TopoDS,
36     ListOfShape       from TopTools,
37     OffsetWire        from BRepFill, 
38     ListOfOffsetWire  from BRepFill,
39     JoinType          from GeomAbs
40     
41     
42 raises
43     NotDone from StdFail
44     
45 is
46     Create returns MakeOffset from BRepOffsetAPI;
47         ---Purpose: Constructs an algorithm for creating an empty offset
48     Create( Spine : Face from TopoDS;
49             Join  : JoinType from GeomAbs = GeomAbs_Arc)
50     returns MakeOffset from BRepOffsetAPI;
51         ---Purpose: Constructs an algorithm for creating an algorithm
52         -- to build parallels to the spine Spine   
53     Init( me    : in out;
54           Spine : Face     from TopoDS; 
55           Join  : JoinType from GeomAbs  =  GeomAbs_Arc)
56         ---Purpose: Initializes the algorithm to construct parallels to the spine Spine.
57         -- Join defines the type of parallel generated by the
58         -- salient vertices of the spine. The default type is
59         -- GeomAbs_Arc where the vertices generate sections
60         -- of a circle. At present, this is the only construction type implemented.
61     is static;
62     
63     Create( Spine : Wire from TopoDS;
64             Join  : JoinType from GeomAbs = GeomAbs_Arc)
65     returns MakeOffset from BRepOffsetAPI;
66     
67     Init( me    : in out;
68           Join  : JoinType from GeomAbs  =  GeomAbs_Arc)
69         ---Purpose: Initialize the evaluation of Offseting.
70     is static;
71
72     AddWire (me : in out;
73              Spine : Wire from TopoDS)
74         ---Purpose: Initializes the algorithm to construct parallels to the wire Spine.
75     is static;
76
77     Perform (me : in out; 
78              Offset : Real from Standard;
79              Alt    : Real from Standard = 0.0)
80         ---Purpose:  Computes a parallel to the spine at distance Offset and
81         -- at an altitude Alt from the plane of the spine in relation
82         -- to the normal to the spine.
83         -- Exceptions: StdFail_NotDone if the offset is not built.
84     raises
85         NotDone from StdFail
86     is static;
87
88         
89     Build(me : in out)
90     is redefined;
91         ---Purpose: Builds the resulting shape (redefined from MakeShape).
92         ---Level: Public    
93
94     Generated  (me: in out; S : Shape from TopoDS)
95         ---Purpose: returns a list of the created shapes
96         --          from the shape <S>.
97         ---C++:     return const &
98         ---Level: Public
99     returns ListOfShape from TopTools
100     is redefined;
101
102
103 fields
104
105     myIsInitialized : Boolean          from Standard;
106     myLastIsLeft    : Boolean          from Standard;
107     myJoin          : JoinType         from GeomAbs;    
108     myFace          : Face             from TopoDS;
109     myWires         : ListOfShape      from TopTools;   
110     myLeft          : ListOfOffsetWire from BRepFill;
111     myRight         : ListOfOffsetWire from BRepFill;
112     
113 end MakeOffset;