0025520: To provide info on what has been done by Shape Process and Shape Fix
[occt.git] / src / ShapeUpgrade / ShapeUpgrade_ShapeDivide.cdl
1 -- Created on: 1999-04-26
2 -- Created by: Pavel DURANDIN
3 -- Copyright (c) 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 ShapeDivide from ShapeUpgrade
18
19         ---Purpose: Divides a all faces in shell with given criteria Shell.
20
21 uses
22     Shape   from TopoDS,
23     Status  from ShapeExtend,
24     ReShape from ShapeBuild,
25     FaceDivide from ShapeUpgrade,
26     Msg from Message,
27     Gravity from Message,
28     BasicMsgRegistrator from ShapeExtend
29
30 is
31     Create returns ShapeDivide from ShapeUpgrade;
32         ---Purpose:
33     
34     Create (S: Shape from TopoDS)
35     returns ShapeDivide from ShapeUpgrade;
36         ---Purpose: Initialize by a Shape.
37     
38     Init (me: in out; S: Shape from TopoDS);
39         ---Purpose: Initialize by a Shape.
40         
41     Delete(me:out) is virtual;
42     ---C++: alias "Standard_EXPORT virtual ~ShapeUpgrade_ShapeDivide(){Delete();}"
43     
44     SetPrecision (me: in out; Prec: Real);
45         ---Purpose: Defines the spatial precision used for splitting
46     
47     SetMaxTolerance(me: in out; maxtol: Real);
48         ---Purpose: Sets maximal allowed tolerance
49     
50     SetMinTolerance (me: in out; mintol: Real);
51         ---Purpose: Sets minimal allowed tolerance
52     
53     SetSurfaceSegmentMode(me: in out; Segment: Boolean);
54         ---Purpose: Purpose sets mode for trimming (segment) surface by
55         --          wire UV bounds.
56     
57     Perform (me: in out; newContext: Boolean = Standard_True) 
58     returns Boolean is virtual;
59         ---Purpose: Performs splitting and computes the resulting shape
60         --          If newContext is True (default), the internal context
61         --          will be cleared at start, else previous substitutions
62         --          will be acting.
63     
64     Result (me) returns Shape from TopoDS;
65         ---Purpose: Gives the resulting Shape, or Null shape if not done.
66     
67     GetContext (me) returns ReShape from ShapeBuild;
68         ---Purpose: Returns context with all the modifications made during
69         --          last call(s) to Perform() recorded
70     
71     SetContext (me: in out; context: ReShape from ShapeBuild);
72         ---Purpose: Sets context with recorded modifications to be applied
73         --          during next call(s) to Perform(shape,Standard_False)
74
75     SetMsgRegistrator (me: in out; msgreg: BasicMsgRegistrator from ShapeExtend) is virtual;
76         ---Purpose: Sets message registrator
77
78     MsgRegistrator (me) returns BasicMsgRegistrator from ShapeExtend;
79         ---Purpose: Returns message registrator
80
81     SendMsg (me; shape  : Shape from TopoDS;
82                  message: Msg from Message;
83                  gravity: Gravity from Message = Message_Info);
84         ---Purpose: Sends a message to be attached to the shape.
85         --          Calls corresponding message of message registrator.
86
87     Status (me; status: Status from ShapeExtend) returns Boolean;
88         ---Purpose: Queries the status of last call to Perform
89         -- OK   : no splitting was done (or no call to Perform)
90         -- DONE1: some edges were splitted
91         -- DONE2: surface was splitted
92         -- FAIL1: some errors occured
93     
94     ---Level: Internal
95     
96     SetSplitFaceTool (me: in out; splitFaceTool: FaceDivide from ShapeUpgrade);
97         ---Purpose: Sets the tool for splitting faces.
98     
99     GetSplitFaceTool (me) returns FaceDivide from ShapeUpgrade
100     is virtual protected;
101         ---Purpose: Returns the tool for splitting faces. 
102         
103     SetEdgeMode(me: in out; aEdgeMode : Integer); 
104         ---Purpose:Sets mode for splitting 3d curves from edges.
105         -- 0 - only curve 3d from free edges.
106         -- 1 - only curve 3d from shared edges.
107         -- 2 -  all curve 3d. 
108     
109     GetFaceMsg (me) returns Msg from Message is virtual protected;
110     GetWireMsg (me) returns Msg from Message is virtual protected;
111     GetEdgeMsg (me) returns Msg from Message is virtual protected;
112         ---Purpose: Returns a message decsribing modification of a shape.
113
114 fields
115
116     mySplitFaceTool: FaceDivide from ShapeUpgrade; 
117     myContext    : ReShape from ShapeBuild is protected;
118     myMsgReg     : BasicMsgRegistrator from ShapeExtend is protected;
119     myShape      : Shape from TopoDS  is protected;
120     myResult     : Shape from TopoDS is protected;
121     myPrecision  : Real is protected;
122     myMinTol     : Real is protected;       
123     myMaxTol     : Real is protected;
124     mySegmentMode: Boolean is protected;
125     myStatus     : Integer is protected;
126     myEdgeMode: Integer is protected;
127     
128 end ShapeDivide;
129