1 -- Created on: 1998-08-12
2 -- Created by: DATA EXCHANGE TEAM
3 -- Copyright (c) 1998-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class Shape from ShapeFix inherits Root from ShapeFix
19 ---Purpose: Fixing shape in general
29 Status from ShapeExtend,
30 MapOfShape from TopTools,
31 BasicMsgRegistrator from ShapeExtend,
32 ProgressIndicator from Message
36 Create returns Shape from ShapeFix;
37 ---Purpose: Empty Constructor
39 Create (shape: Shape from TopoDS)
40 returns Shape from ShapeFix;
41 ---Purpose: Initislises by shape.
43 Init (me: mutable; shape: Shape from TopoDS);
44 ---Purpose: Initislises by shape.
46 Perform (me : mutable;
47 theProgress : ProgressIndicator from Message = 0) returns Boolean;
48 ---Purpose: Iterates on sub- shape and performs fixes
50 SameParameter (me : mutable;
51 shape : Shape from TopoDS;
53 theProgress : ProgressIndicator from Message = 0) is protected;
54 ---Purpose: Fixes same parameterization problem on the passed shape
55 -- by updating tolerances of the corresponding topological
58 Shape (me) returns Shape from TopoDS;
59 ---Purpose: Returns resulting shape
61 FixSolidTool (me) returns Solid from ShapeFix;
62 ---Purpose: Returns tool for fixing solids.
65 FixShellTool (me) returns Shell from ShapeFix;
66 ---Purpose: Returns tool for fixing shells.
69 FixFaceTool (me) returns Face from ShapeFix;
70 ---Purpose: Returns tool for fixing faces.
73 FixWireTool (me) returns Wire from ShapeFix;
74 ---Purpose: Returns tool for fixing wires.
77 FixEdgeTool (me) returns Edge from ShapeFix;
78 ---Purpose: Returns tool for fixing edges.
81 Status (me; status : Status from ShapeExtend) returns Boolean;
82 ---Purpose: Returns the status of the last Fix.
83 -- This can be a combination of the following flags:
84 -- ShapeExtend_DONE1: some free edges were fixed
85 -- ShapeExtend_DONE2: some free wires were fixed
86 -- ShapeExtend_DONE3: some free faces were fixed
87 -- ShapeExtend_DONE4: some free shells were fixed
88 -- ShapeExtend_DONE5: some free solids were fixed
89 -- ShapeExtend_DONE6: shapes in compound(s) were fixed
91 SetMsgRegistrator (me: mutable; msgreg: BasicMsgRegistrator from ShapeExtend) is redefined;
92 ---Purpose: Sets message registrator
94 SetPrecision (me: mutable; preci: Real) is redefined;
95 ---Purpose: Sets basic precision value (also to FixSolidTool)
97 SetMinTolerance (me: mutable; mintol: Real) is redefined;
98 ---Purpose: Sets minimal allowed tolerance (also to FixSolidTool)
100 SetMaxTolerance (me: mutable; maxtol: Real) is redefined;
101 ---Purpose: Sets maximal allowed tolerance (also to FixSolidTool)
103 FixSolidMode (me: mutable) returns Integer;
106 ---Purpose: Returns (modifiable) the mode for applying fixes of
107 -- ShapeFix_Solid, by default True.
109 FixFreeShellMode (me: mutable) returns Integer;
112 ---Purpose: Returns (modifiable) the mode for applying fixes of
113 -- ShapeFix_Shell, by default True.
115 FixFreeFaceMode (me: mutable) returns Integer;
118 ---Purpose: Returns (modifiable) the mode for applying fixes of
119 -- ShapeFix_Face, by default True.
121 FixFreeWireMode (me: mutable) returns Integer;
124 ---Purpose: Returns (modifiable) the mode for applying fixes of
125 -- ShapeFix_Wire, by default True.
127 FixSameParameterMode (me: mutable) returns Integer;
130 ---Purpose: Returns (modifiable) the mode for applying
131 -- ShapeFix::SameParameter after all fixes, by default True.
133 FixVertexPositionMode (me: mutable) returns Integer;
136 ---Purpose: Returns (modifiable) the mode for applying
137 -- ShapeFix::FixVertexPosition before all fixes, by default False.
139 FixVertexTolMode (me: mutable) returns Integer;
142 ---Purpose: Returns (modifiable) the mode for fixing tolerances of vertices on whole shape
143 -- after performing all fixes
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 myFixVertexTolMode : Integer is protected;
157 myStatus : Integer is protected;