Commit | Line | Data |
---|---|---|
b311480e | 1 | -- Created on: 1998-08-12 |
2 | -- Created by: Galina KULIKOVA | |
3 | -- Copyright (c) 1998-1999 Matra Datavision | |
973c2be1 | 4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e | 5 | -- |
973c2be1 | 6 | -- This file is part of Open CASCADE Technology software library. |
b311480e | 7 | -- |
d5f74e42 | 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 | |
973c2be1 | 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. | |
b311480e | 13 | -- |
973c2be1 | 14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. | |
7fd59977 | 16 | |
17 | class Shell from ShapeFix inherits Root from ShapeFix | |
18 | ||
19 | ---Purpose: Fixing orientation of faces in shell | |
20 | ||
21 | uses | |
22 | ||
23 | Compound from TopoDS, | |
24 | Shell from TopoDS, | |
25 | Shape from TopoDS, | |
26 | Status from ShapeExtend, | |
27 | BasicMsgRegistrator from ShapeExtend, | |
b485ee79 KD |
28 | Face from ShapeFix, |
29 | ProgressIndicator from Message | |
30 | ||
7fd59977 | 31 | is |
32 | ||
33 | Create returns Shell from ShapeFix; | |
34 | ---Purpose: Empty constructor | |
35 | ||
36 | Create (shape: Shell from TopoDS) | |
37 | returns Shell from ShapeFix; | |
38 | ---Purpose: Initializes by shell. | |
39 | ||
40 | Init (me: mutable; shell: Shell from TopoDS); | |
41 | ---Purpose: Initializes by shell. | |
42 | ||
b485ee79 KD |
43 | Perform (me: mutable; |
44 | theProgress : ProgressIndicator from Message = 0) returns Boolean; | |
45 | ---Purpose: Iterates on subshapes and performs fixes | |
46 | -- (for each face calls ShapeFix_Face::Perform and | |
47 | -- then calls FixFaceOrientation). The passed progress | |
48 | -- indicator allows user to consult the current progress | |
49 | -- stage and abort algorithm if needed. | |
7fd59977 | 50 | |
51 | FixFaceOrientation (me : mutable; shell : Shell from TopoDS; | |
52 | isAccountMultiConex : Boolean = Standard_True; | |
53 | NonManifold : Boolean = Standard_False ) returns Boolean; | |
b485ee79 KD |
54 | ---Purpose: Fixes orientation of faces in shell. |
55 | -- Changes orientation of face in the shell, if it is oriented opposite | |
56 | -- to neigbouring faces. If it is not possible to orient all faces in the | |
57 | -- shell (like in case of mebious band), this method orients only subset | |
58 | -- of faces. Other faces are stored in Error compound. | |
59 | -- Modes : | |
60 | -- isAccountMultiConex - mode for account cases of multiconnexity. | |
61 | -- If this mode is equal to Standard_True, separate shells will be created | |
62 | -- in the cases of multiconnexity. If this mode is equal to Standard_False, | |
63 | -- one shell will be created without account of multiconnexity.By defautt - Standard_True; | |
64 | -- NonManifold - mode for creation of non-manifold shells. | |
65 | -- If this mode is equal to Standard_True one non-manifold will be created from shell | |
66 | -- contains multishared edges. Else if this mode is equal to Standard_False only | |
67 | -- manifold shells will be created. By default - Standard_False. | |
68 | -- | |
69 | ---Returns: If resulting shell is ok returns TRUE, else returns FALSE. | |
70 | ---Status : OK - faces in shall were oriented correcty. | |
71 | -- DONE - faces in shell oriented succesfully | |
72 | -- FAIL - faces orientation process has been failed | |
7fd59977 | 73 | |
74 | Shell(me : mutable) returns Shell from TopoDS; | |
75 | ---Purpose: Returns fixed shell (or subset of oriented faces). | |
76 | ||
77 | Shape(me : mutable) returns Shape from TopoDS; | |
78 | ---Purpose: In case of multiconnexity returns compound of fixed shells | |
79 | -- else returns one shell.. | |
80 | NbShells(me) returns Integer; | |
81 | ---Purpose: Returns Number of obtainrd shells; | |
82 | ||
83 | ErrorFaces(me) returns Compound from TopoDS; | |
84 | ---Purpose: Returns not oriented subset of faces. | |
85 | ||
86 | Status (me; status : Status from ShapeExtend) returns Boolean; | |
87 | ---Purpose: Returns the status of the last Fix. | |
88 | ||
89 | FixFaceTool (me:mutable) returns Face from ShapeFix; | |
90 | ---Purpose: Returns tool for fixing faces. | |
b485ee79 | 91 | ---C++:inline |
7fd59977 | 92 | |
93 | SetMsgRegistrator (me: mutable; msgreg: BasicMsgRegistrator from ShapeExtend) is redefined; | |
b485ee79 | 94 | ---Purpose: Sets message registrator |
7fd59977 | 95 | |
96 | SetPrecision (me: mutable; preci: Real) is redefined; | |
97 | ---Purpose: Sets basic precision value (also to FixWireTool) | |
98 | ||
99 | SetMinTolerance (me: mutable; mintol: Real) is redefined; | |
100 | ---Purpose: Sets minimal allowed tolerance (also to FixWireTool) | |
101 | ||
102 | SetMaxTolerance (me: mutable; maxtol: Real) is redefined; | |
103 | ---Purpose: Sets maximal allowed tolerance (also to FixWireTool) | |
104 | ||
105 | FixFaceMode (me: mutable) returns Integer; | |
106 | ---C++: return & | |
b485ee79 KD |
107 | ---C++: inline |
108 | ---Purpose: Returns (modifiable) the mode for applying fixes of | |
109 | -- ShapeFix_Face, by default True. | |
7fd59977 | 110 | |
111 | FixOrientationMode (me: mutable) returns Integer; | |
112 | ---C++: return & | |
b485ee79 KD |
113 | ---C++: inline |
114 | ---Purpose: Returns (modifiable) the mode for applying | |
115 | -- FixFaceOrientation, by default True. | |
7fd59977 | 116 | |
117 | fields | |
118 | ||
119 | myShell : Shell from TopoDS is protected; | |
120 | myErrFaces : Compound from TopoDS is protected; | |
121 | myStatus : Integer is protected; | |
122 | myFixFace : Face from ShapeFix is protected; | |
123 | myFixFaceMode : Integer is protected; | |
124 | myFixOrientationMode : Integer is protected; | |
b485ee79 KD |
125 | myNbShells : Integer is protected; |
126 | ||
7fd59977 | 127 | end Shell; |