1 -- Created on: 1998-08-12
2 -- Created by: DATA EXCHANGE TEAM
3 -- Copyright (c) 1998-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
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.
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.
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.
23 class Shape from ShapeFix inherits Root from ShapeFix
25 ---Purpose: Fixing shape in general
35 Status from ShapeExtend,
36 MapOfShape from TopTools,
37 BasicMsgRegistrator from ShapeExtend,
38 ProgressIndicator from Message
42 Create returns Shape from ShapeFix;
43 ---Purpose: Empty Constructor
45 Create (shape: Shape from TopoDS)
46 returns Shape from ShapeFix;
47 ---Purpose: Initislises by shape.
49 Init (me: mutable; shape: Shape from TopoDS);
50 ---Purpose: Initislises by shape.
52 Perform (me : mutable;
53 theProgress : ProgressIndicator from Message = 0) returns Boolean;
54 ---Purpose: Iterates on sub- shape and performs fixes
56 SameParameter (me : mutable;
57 shape : Shape from TopoDS;
59 theProgress : ProgressIndicator from Message = 0) is protected;
60 ---Purpose: Fixes same parameterization problem on the passed shape
61 -- by updating tolerances of the corresponding topological
64 Shape (me) returns Shape from TopoDS;
65 ---Purpose: Returns resulting shape
67 FixSolidTool (me) returns Solid from ShapeFix;
68 ---Purpose: Returns tool for fixing solids.
71 FixShellTool (me) returns Shell from ShapeFix;
72 ---Purpose: Returns tool for fixing shells.
75 FixFaceTool (me) returns Face from ShapeFix;
76 ---Purpose: Returns tool for fixing faces.
79 FixWireTool (me) returns Wire from ShapeFix;
80 ---Purpose: Returns tool for fixing wires.
83 FixEdgeTool (me) returns Edge from ShapeFix;
84 ---Purpose: Returns tool for fixing edges.
87 Status (me; status : Status from ShapeExtend) returns Boolean;
88 ---Purpose: Returns the status of the last Fix.
89 -- This can be a combination of the following flags:
90 -- ShapeExtend_DONE1: some free edges were fixed
91 -- ShapeExtend_DONE2: some free wires were fixed
92 -- ShapeExtend_DONE3: some free faces were fixed
93 -- ShapeExtend_DONE4: some free shells were fixed
94 -- ShapeExtend_DONE5: some free solids were fixed
95 -- ShapeExtend_DONE6: shapes in compound(s) were fixed
97 SetMsgRegistrator (me: mutable; msgreg: BasicMsgRegistrator from ShapeExtend) is redefined;
98 ---Purpose: Sets message registrator
100 SetPrecision (me: mutable; preci: Real) is redefined;
101 ---Purpose: Sets basic precision value (also to FixSolidTool)
103 SetMinTolerance (me: mutable; mintol: Real) is redefined;
104 ---Purpose: Sets minimal allowed tolerance (also to FixSolidTool)
106 SetMaxTolerance (me: mutable; maxtol: Real) is redefined;
107 ---Purpose: Sets maximal allowed tolerance (also to FixSolidTool)
109 FixSolidMode (me: mutable) returns Integer;
112 ---Purpose: Returns (modifiable) the mode for applying fixes of
113 -- ShapeFix_Solid, by default True.
115 FixFreeShellMode (me: mutable) returns Integer;
118 ---Purpose: Returns (modifiable) the mode for applying fixes of
119 -- ShapeFix_Shell, by default True.
121 FixFreeFaceMode (me: mutable) returns Integer;
124 ---Purpose: Returns (modifiable) the mode for applying fixes of
125 -- ShapeFix_Face, by default True.
127 FixFreeWireMode (me: mutable) returns Integer;
130 ---Purpose: Returns (modifiable) the mode for applying fixes of
131 -- ShapeFix_Wire, by default True.
133 FixSameParameterMode (me: mutable) returns Integer;
136 ---Purpose: Returns (modifiable) the mode for applying
137 -- ShapeFix::SameParameter after all fixes, by default True.
139 FixVertexPositionMode (me: mutable) returns Integer;
142 ---Purpose: Returns (modifiable) the mode for applying
143 -- ShapeFix::FixVertexPosition before all fixes, by default False.
146 myResult : Shape from TopoDS is protected;
147 myFixSolid : Solid from ShapeFix is protected;
148 myMapFixingShape : MapOfShape from TopTools is protected;
150 myFixSolidMode : Integer is protected;
151 myFixShellMode : Integer is protected;
152 myFixFaceMode : Integer is protected;
153 myFixWireMode : Integer is protected;
154 myFixSameParameterMode : Integer is protected;
155 myFixVertexPositionMode : Integer is protected;
156 myStatus : Integer is protected;