summaryrefslogtreecommitdiff
path: root/inc/ShapeFix_FreeBounds.hxx
blob: 68b5302ae66ca9b6d710b1af9b29ef281ac68273 (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
// 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_FreeBounds_HeaderFile
#define _ShapeFix_FreeBounds_HeaderFile

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

#ifndef _TopoDS_Compound_HeaderFile
#include <TopoDS_Compound.hxx>
#endif
#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
class TopoDS_Shape;
class TopoDS_Compound;


//! This class is intended to output free bounds of the shape <br>
//!          (free bounds are the wires consisting of edges referenced by the <br>
//!          only face). <br>
//!          For building free bounds it uses ShapeAnalysis_FreeBounds class. <br>
//!          This class complements it with the feature to reduce the number <br>
//!          of open wires. <br>
//!          This reduction is performed with help of connecting several <br>
//!          adjacent open wires one to another what can lead to: <br>
//!          1. making an open wire with greater length out of several <br>
//!             open wires <br>
//!          2. making closed wire out of several open wires <br>
class ShapeFix_FreeBounds  {
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); 
  }

  //! Empty constructor <br>
  Standard_EXPORT   ShapeFix_FreeBounds();
  //! Builds forecasting free bounds of the <shape> and connects <br>
//!          open wires with tolerance <closetoler>. <br>
//!          <shape> should be a compound of faces. <br>
//!          Tolerance <closetoler> should be greater than tolerance <br>
//!          <sewtoler> used for initializing sewing analyzer, otherwise <br>
//!          connection of open wires is not performed. <br>
  Standard_EXPORT   ShapeFix_FreeBounds(const TopoDS_Shape& shape,const Standard_Real sewtoler,const Standard_Real closetoler,const Standard_Boolean splitclosed,const Standard_Boolean splitopen);
  //! Builds actual free bounds of the <shape> and connects <br>
//!          open wires with tolerance <closetoler>. <br>
//!          <shape> should be a compound of shells. <br>
  Standard_EXPORT   ShapeFix_FreeBounds(const TopoDS_Shape& shape,const Standard_Real closetoler,const Standard_Boolean splitclosed,const Standard_Boolean splitopen);
  //! Returns compound of closed wires out of free edges. <br>
       const TopoDS_Compound& GetClosedWires() const;
  //! Returns compound of open wires out of free edges. <br>
       const TopoDS_Compound& GetOpenWires() const;
  //! Returns modified source shape. <br>
       const TopoDS_Shape& GetShape() const;





protected:





private:

  
  Standard_EXPORT     Standard_Boolean Perform() ;


TopoDS_Compound myWires;
TopoDS_Compound myEdges;
TopoDS_Shape myShape;
Standard_Boolean myShared;
Standard_Real mySewToler;
Standard_Real myCloseToler;
Standard_Boolean mySplitClosed;
Standard_Boolean mySplitOpen;


};


#include <ShapeFix_FreeBounds.lxx>



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


#endif