b311480e |
1 | -- Created on: 1998-02-18 |
2 | -- Created by: Pierre BARRAS |
3 | -- Copyright (c) 1998-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 | |
7fd59977 |
21 | |
22 | class FaceDivide from ShapeUpgrade |
23 | |
24 | inherits Tool from ShapeUpgrade |
25 | ---Purpose: Divides a Face (both edges in the wires, by splitting |
26 | -- curves and pcurves, and the face itself, by splitting |
27 | -- supporting surface) according to splitting criteria. |
28 | -- * The domain of the face to divide is defined by the PCurves |
29 | -- of the wires on the Face. |
30 | -- |
31 | -- * all the PCurves are supposed to be defined (in the parametric |
32 | -- space of the supporting surface). |
33 | -- |
34 | -- The result is available after the call to the Build method. |
35 | -- It is a Shell containing all the resulting Faces. |
36 | -- |
37 | -- All the modifications made during splitting are recorded in the |
38 | -- external context (ShapeBuild_ReShape). |
39 | |
40 | uses |
41 | Face from TopoDS, |
42 | Shape from TopoDS, |
43 | Status from ShapeExtend, |
44 | SplitSurface from ShapeUpgrade, |
45 | WireDivide from ShapeUpgrade |
46 | |
47 | |
48 | is |
49 | |
50 | Create returns FaceDivide from ShapeUpgrade; |
51 | ---Purpose: Creates empty constructor. |
52 | |
53 | Create (F : Face from TopoDS) |
54 | returns FaceDivide from ShapeUpgrade; |
55 | --- Purpose : Initialize by a Face. |
56 | |
57 | Init (me: mutable; F : Face from TopoDS); |
58 | ---Purpose: Initialize by a Face. |
59 | |
60 | SetSurfaceSegmentMode(me: mutable; Segment: Boolean); |
61 | ---Purpose: Purpose sets mode for trimming (segment) surface by |
62 | -- wire UV bounds. |
63 | |
64 | Perform (me: mutable) |
65 | returns Boolean is virtual; |
66 | ---Purpose: Performs splitting and computes the resulting shell |
67 | -- The context is used to keep track of former splittings |
68 | -- in order to keep sharings. It is updated according to |
69 | -- modifications made. |
70 | SplitSurface (me: mutable) |
71 | returns Boolean is virtual; |
72 | ---Purpose: Performs splitting of surface and computes the shell |
73 | -- from source face. |
74 | |
75 | SplitCurves (me: mutable) |
76 | returns Boolean is virtual; |
77 | ---Purpose: Performs splitting of curves of all the edges in the |
78 | -- shape and divides these edges. |
79 | |
80 | Result (me) returns Shape from TopoDS; |
81 | ---Purpose: Gives the resulting Shell, or Face, or Null shape if not done. |
82 | |
83 | Status (me; status: Status from ShapeExtend) returns Boolean; |
84 | ---Purpose: Queries the status of last call to Perform |
85 | -- OK : no splitting was done (or no call to Perform) |
86 | -- DONE1: some edges were splitted |
87 | -- DONE2: surface was splitted |
88 | -- DONE3: surface was modified without splitting |
89 | -- FAIL1: some fails encountered during splitting wires |
90 | -- FAIL2: face cannot be splitted |
91 | |
92 | ---Level: Internal |
93 | |
94 | SetSplitSurfaceTool (me: mutable; splitSurfaceTool: SplitSurface from ShapeUpgrade); |
95 | ---Purpose: Sets the tool for splitting surfaces. |
96 | |
97 | SetWireDivideTool (me: mutable; wireDivideTool: WireDivide from ShapeUpgrade); |
98 | ---Purpose: Sets the tool for dividing edges on Face. |
99 | |
100 | GetSplitSurfaceTool (me) returns SplitSurface from ShapeUpgrade |
101 | is virtual protected; |
102 | ---Purpose: Returns the tool for splitting surfaces. |
103 | -- This tool must be already initialized. |
104 | |
105 | GetWireDivideTool (me) returns WireDivide from ShapeUpgrade |
106 | is virtual; |
107 | ---Purpose: Returns the tool for dividing edges on Face. |
108 | -- This tool must be already initialized. |
109 | |
110 | fields |
111 | |
112 | mySplitSurfaceTool: SplitSurface from ShapeUpgrade; |
113 | myWireDivideTool : WireDivide from ShapeUpgrade; |
114 | myFace : Face from TopoDS is protected; |
115 | myResult : Shape from TopoDS is protected; |
116 | mySegmentMode: Boolean is protected; |
117 | myStatus : Integer is protected; |
118 | |
119 | end; |
120 | |