Commit | Line | Data |
---|---|---|
b311480e | 1 | -- Created on: 1998-06-03 |
2 | -- Created by: data exchange team | |
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 | |
7fd59977 | 17 | package ShapeFix |
18 | ||
b485ee79 KD |
19 | ---Purpose: This package provides algorithms for fixing |
20 | -- problematic (violating Open CASCADE requirements) shapes. | |
21 | -- Tools from package ShapeAnalysis are used for detecting the problems. The | |
22 | -- detecting and fixing is done taking in account various | |
23 | -- criteria implemented in BRepCheck package. | |
24 | -- Each class of package ShapeFix deals with one | |
7fd59977 | 25 | -- certain type of shapes or with some family of problems. |
26 | ||
27 | uses | |
28 | ||
29 | gp, | |
30 | Geom, | |
31 | Geom2d, | |
32 | Geom2dAPI, | |
33 | GeomAbs, | |
34 | Adaptor3d, | |
35 | TCollection, | |
36 | TColStd, | |
37 | TopAbs, | |
38 | TopLoc, | |
39 | TopoDS, | |
40 | TopTools, | |
41 | Message, | |
42 | ShapeExtend, | |
43 | ShapeAnalysis, | |
44 | ShapeConstruct, | |
45 | ShapeBuild, | |
46 | Bnd | |
47 | ||
48 | is | |
49 | ||
50 | -- classes | |
51 | class Root; | |
52 | ||
53 | class EdgeProjAux; | |
54 | ||
55 | class Edge; | |
ff8178ef | 56 | |
7fd59977 | 57 | class Wire; |
7fd59977 | 58 | |
59 | class Face; | |
ff8178ef | 60 | |
7fd59977 | 61 | class FixSmallFace; |
7fd59977 | 62 | |
63 | class WireVertex; | |
7fd59977 | 64 | |
65 | class Wireframe; | |
ff8178ef | 66 | |
7fd59977 | 67 | class FreeBounds; |
7fd59977 | 68 | |
69 | class FaceConnect; | |
ff8178ef | 70 | |
7fd59977 | 71 | class Shell; |
7fd59977 | 72 | |
73 | class Solid; | |
ff8178ef | 74 | |
7fd59977 | 75 | class ShapeTolerance; |
7fd59977 | 76 | |
77 | class Shape; | |
7fd59977 | 78 | |
79 | class EdgeConnect; | |
7fd59977 | 80 | |
81 | class ComposeShell; | |
7fd59977 | 82 | |
83 | class SplitCommonVertex; | |
7fd59977 | 84 | |
85 | class WireSegment; | |
ff8178ef | 86 | |
7fd59977 | 87 | class IntersectionTool; |
ff8178ef | 88 | |
7fd59977 | 89 | class SplitTool; |
ff8178ef | 90 | |
7fd59977 | 91 | class SequenceOfWireSegment instantiates Sequence from TCollection |
92 | (WireSegment from ShapeFix); | |
93 | ||
94 | class DataMapOfShapeBox2d instantiates DataMap from TCollection | |
95 | (Shape from TopoDS, Box2d from Bnd, ShapeMapHasher from TopTools); | |
96 | ||
97 | ||
b485ee79 KD |
98 | SameParameter (shape : Shape from TopoDS; |
99 | enforce : Boolean; | |
100 | preci : Real = 0.0; | |
101 | theProgress : ProgressIndicator from Message = 0) | |
7fd59977 | 102 | returns Boolean; |
103 | ---Purpose : Runs SameParameter from BRepLib with these adaptations : | |
104 | -- <enforce> forces computations, else they are made only on | |
105 | -- Edges with flag SameParameter false | |
106 | -- <preci>, if not precised, is taken for each EDge as its own | |
107 | -- Tolerance | |
108 | -- Returns True when done, False if an exception has been raised | |
109 | -- In case of exception anyway, as many edges as possible have | |
b485ee79 KD |
110 | -- been processed. The passed progress indicator allows user |
111 | -- to consult the current progress stage and abort algorithm | |
112 | -- if needed. | |
7fd59977 | 113 | |
114 | EncodeRegularity (shape: Shape from TopoDS; tolang: Real = 1.0e-10); | |
115 | ---Purpose : Runs EncodeRegularity from BRepLib taking into account | |
b485ee79 KD |
116 | -- shared components of assemblies, so that each component |
117 | -- is processed only once | |
7fd59977 | 118 | |
119 | RemoveSmallEdges (shape: in out Shape from TopoDS; Tolerance: Real; context: in out ReShape from ShapeBuild) | |
120 | returns Shape from TopoDS; | |
b485ee79 KD |
121 | ---Purpose: Removes edges which are less than given tolerance from shape |
122 | -- with help of ShapeFix_Wire::FixSmall() | |
7fd59977 | 123 | |
124 | FixVertexPosition(theshape: in out Shape from TopoDS; | |
125 | theTolerance: Real; | |
126 | thecontext: ReShape from ShapeBuild) returns Boolean; | |
b485ee79 | 127 | ---Purpose: Fix position of the vertices having tolerance more tnan specified one.; |
7fd59977 | 128 | |
129 | LeastEdgeSize(theshape: in out Shape from TopoDS) returns Real; | |
b485ee79 | 130 | ---Purpose: Calculate size of least edge; |
7fd59977 | 131 | |
132 | ||
133 | end ShapeFix; |