0024023: Revamp the OCCT Handle -- ambiguity
[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-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 under
9 -- the terms of the GNU Lesser General Public License 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 MakeOffset from BRepOffsetAPI inherits MakeShape from BRepBuilderAPI
18
19         ---Purpose: Describes algorithms for offsetting wires from a set of
20         -- wires contained in a planar face.
21         -- A MakeOffset object provides a framework for:
22         -- - defining the construction of an offset,
23         -- - implementing the construction algorithm, and
24         -- - consulting the result. 
25
26 uses
27     Shape             from TopoDS,
28     Wire              from TopoDS,
29     Face              from TopoDS,
30     ListOfShape       from TopTools,
31     OffsetWire        from BRepFill, 
32     ListOfOffsetWire  from BRepFill,
33     JoinType          from GeomAbs
34     
35     
36 raises
37     NotDone from StdFail
38     
39 is
40     Create returns MakeOffset from BRepOffsetAPI;
41         ---Purpose: Constructs an algorithm for creating an empty offset
42     Create( Spine : Face from TopoDS;
43             Join  : JoinType from GeomAbs = GeomAbs_Arc;
44             IsOpenResult : Boolean from Standard = Standard_False)
45     returns MakeOffset from BRepOffsetAPI;
46         ---Purpose: Constructs an algorithm for creating an algorithm
47         -- to build parallels to the spine Spine   
48     Init( me    : in out;
49           Spine : Face     from TopoDS; 
50           Join  : JoinType from GeomAbs  =  GeomAbs_Arc;
51           IsOpenResult : Boolean from Standard = Standard_False)
52         ---Purpose: Initializes the algorithm to construct parallels to the spine Spine.
53         -- Join defines the type of parallel generated by the
54         -- salient vertices of the spine.
55         -- The default type is GeomAbs_Arc where the vertices generate
56         -- sections of a circle.
57         -- If join type is GeomAbs_Intersection, the edges that
58         -- intersect in a salient vertex generate the edges
59         -- prolonged until intersection.
60     is static;
61     
62     Create( Spine : Wire from TopoDS;
63             Join  : JoinType from GeomAbs = GeomAbs_Arc;
64             IsOpenResult : Boolean from Standard = Standard_False)
65     returns MakeOffset from BRepOffsetAPI;
66     
67     Init( me    : in out;
68           Join  : JoinType from GeomAbs  =  GeomAbs_Arc;
69           IsOpenResult : Boolean from Standard = Standard_False)
70         ---Purpose: Initialize the evaluation of Offseting.
71     is static;
72
73     AddWire (me : in out;
74              Spine : Wire from TopoDS)
75         ---Purpose: Initializes the algorithm to construct parallels to the wire Spine.
76     is static;
77
78     Perform (me : in out; 
79              Offset : Real from Standard;
80              Alt    : Real from Standard = 0.0)
81         ---Purpose:  Computes a parallel to the spine at distance Offset and
82         -- at an altitude Alt from the plane of the spine in relation
83         -- to the normal to the spine.
84         -- Exceptions: StdFail_NotDone if the offset is not built.
85     raises
86         NotDone from StdFail
87     is static;
88
89         
90     Build(me : in out)
91     is redefined;
92         ---Purpose: Builds the resulting shape (redefined from MakeShape).
93         ---Level: Public    
94
95     Generated  (me: in out; S : Shape from TopoDS)
96         ---Purpose: returns a list of the created shapes
97         --          from the shape <S>.
98         ---C++:     return const &
99         ---Level: Public
100     returns ListOfShape from TopTools
101     is redefined;
102
103
104 fields
105
106     myIsInitialized : Boolean          from Standard;
107     myLastIsLeft    : Boolean          from Standard;
108     myJoin          : JoinType         from GeomAbs;    
109     myIsOpenResult  : Boolean          from Standard;   
110     myFace          : Face             from TopoDS;
111     myWires         : ListOfShape      from TopTools;   
112     myLeft          : ListOfOffsetWire from BRepFill;
113     myRight         : ListOfOffsetWire from BRepFill;
114     
115 end MakeOffset;