summaryrefslogtreecommitdiff
path: root/inc/ShapeFix.hxx
blob: 0ef5072c854ec9e01663650eaaaa5fb812636037 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _ShapeFix_HeaderFile
#define _ShapeFix_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif

#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Handle_ShapeBuild_ReShape_HeaderFile
#include <Handle_ShapeBuild_ReShape.hxx>
#endif
class TopoDS_Shape;
class ShapeBuild_ReShape;
class ShapeFix_Root;
class ShapeFix_EdgeProjAux;
class ShapeFix_Edge;
class ShapeFix_Wire;
class ShapeFix_Face;
class ShapeFix_FixSmallFace;
class ShapeFix_WireVertex;
class ShapeFix_Wireframe;
class ShapeFix_FreeBounds;
class ShapeFix_FaceConnect;
class ShapeFix_Shell;
class ShapeFix_Solid;
class ShapeFix_ShapeTolerance;
class ShapeFix_Shape;
class ShapeFix_EdgeConnect;
class ShapeFix_ComposeShell;
class ShapeFix_SplitCommonVertex;
class ShapeFix_WireSegment;
class ShapeFix_IntersectionTool;
class ShapeFix_SplitTool;
class ShapeFix_SequenceOfWireSegment;
class ShapeFix_DataMapOfShapeBox2d;
class ShapeFix_SequenceNodeOfSequenceOfWireSegment;
class ShapeFix_DataMapNodeOfDataMapOfShapeBox2d;
class ShapeFix_DataMapIteratorOfDataMapOfShapeBox2d;


//!  This package provides algorithms for fixing <br>
//! problematic (violating Open CASCADE requirements) shapes. <br>
//! Tools from package ShapeAnalysis are used for detecting the problems. The <br>
//! detecting and fixing is done taking in account various <br>
//! criteria implemented in BRepCheck package. <br>
//! Each class of package ShapeFix deals with one <br>
//! certain type of shapes or with some family of problems. <br>
class ShapeFix  {
public:

  void* operator new(size_t,void* anAddress) 
  {
    return anAddress;
  }
  void* operator new(size_t size) 
  {
    return Standard::Allocate(size); 
  }
  void  operator delete(void *anAddress) 
  {
    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
  }

  //! Runs SameParameter from BRepLib with these adaptations : <br>
//!           <enforce> forces computations, else they are made only on <br>
//!             Edges with flag SameParameter false <br>
//!           <preci>, if not precised, is taken for each EDge as its own <br>
//!           Tolerance <br>
//!           Returns True when done, False if an exception has been raised <br>
//!           In case of exception anyway, as many edges as possible have <br>
//!           been processed <br>
  Standard_EXPORT   static  Standard_Boolean SameParameter(const TopoDS_Shape& shape,const Standard_Boolean enforce,const Standard_Real preci = 0.0) ;
  //! Runs EncodeRegularity from BRepLib taking into account <br>
//!           shared components of assemblies, so that each component <br>
//!           is processed only once <br>
  Standard_EXPORT   static  void EncodeRegularity(const TopoDS_Shape& shape,const Standard_Real tolang = 1.0e-10) ;
  //! Removes edges which are less than given tolerance from shape <br>
//!          with help of ShapeFix_Wire::FixSmall() <br>
  Standard_EXPORT   static  TopoDS_Shape RemoveSmallEdges(TopoDS_Shape& shape,const Standard_Real Tolerance,Handle(ShapeBuild_ReShape)& context) ;
  //! Fix position of the vertices having tolerance more tnan specified one.; <br>
  Standard_EXPORT   static  Standard_Boolean FixVertexPosition(TopoDS_Shape& theshape,const Standard_Real theTolerance,const Handle(ShapeBuild_ReShape)& thecontext) ;
  //! Calculate size of least edge; <br>
  Standard_EXPORT   static  Standard_Real LeastEdgeSize(TopoDS_Shape& theshape) ;





protected:





private:




friend class ShapeFix_Root;
friend class ShapeFix_EdgeProjAux;
friend class ShapeFix_Edge;
friend class ShapeFix_Wire;
friend class ShapeFix_Face;
friend class ShapeFix_FixSmallFace;
friend class ShapeFix_WireVertex;
friend class ShapeFix_Wireframe;
friend class ShapeFix_FreeBounds;
friend class ShapeFix_FaceConnect;
friend class ShapeFix_Shell;
friend class ShapeFix_Solid;
friend class ShapeFix_ShapeTolerance;
friend class ShapeFix_Shape;
friend class ShapeFix_EdgeConnect;
friend class ShapeFix_ComposeShell;
friend class ShapeFix_SplitCommonVertex;
friend class ShapeFix_WireSegment;
friend class ShapeFix_IntersectionTool;
friend class ShapeFix_SplitTool;
friend class ShapeFix_SequenceOfWireSegment;
friend class ShapeFix_DataMapOfShapeBox2d;
friend class ShapeFix_SequenceNodeOfSequenceOfWireSegment;
friend class ShapeFix_DataMapNodeOfDataMapOfShapeBox2d;
friend class ShapeFix_DataMapIteratorOfDataMapOfShapeBox2d;

};





// other Inline functions and methods (like "C++: function call" methods)


#endif