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