summaryrefslogtreecommitdiff
path: root/inc/ShapeUpgrade_ShapeDivide.hxx
blob: 0ec0319dc0ada539ce80cf4b736e09e596290721 (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
// 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 _ShapeUpgrade_ShapeDivide_HeaderFile
#define _ShapeUpgrade_ShapeDivide_HeaderFile

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

#ifndef _Handle_ShapeUpgrade_FaceDivide_HeaderFile
#include <Handle_ShapeUpgrade_FaceDivide.hxx>
#endif
#ifndef _Handle_ShapeBuild_ReShape_HeaderFile
#include <Handle_ShapeBuild_ReShape.hxx>
#endif
#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _ShapeExtend_Status_HeaderFile
#include <ShapeExtend_Status.hxx>
#endif
class ShapeUpgrade_FaceDivide;
class ShapeBuild_ReShape;
class TopoDS_Shape;


//! Divides a all faces in shell with given criteria Shell. <br>
class ShapeUpgrade_ShapeDivide  {
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); 
  }

  
  Standard_EXPORT   ShapeUpgrade_ShapeDivide();
  //! Initialize by a Shape. <br>
  Standard_EXPORT   ShapeUpgrade_ShapeDivide(const TopoDS_Shape& S);
  //! Initialize by a Shape. <br>
  Standard_EXPORT     void Init(const TopoDS_Shape& S) ;
  
  Standard_EXPORT   virtual  void Delete() ;
Standard_EXPORT virtual ~ShapeUpgrade_ShapeDivide(){Delete();}
  //! Defines the spatial precision used for splitting <br>
  Standard_EXPORT     void SetPrecision(const Standard_Real Prec) ;
  //! Sets maximal allowed tolerance <br>
  Standard_EXPORT     void SetMaxTolerance(const Standard_Real maxtol) ;
  //! Sets minimal allowed tolerance <br>
  Standard_EXPORT     void SetMinTolerance(const Standard_Real mintol) ;
  //! Purpose sets mode for trimming (segment) surface by <br>
//!          wire UV bounds. <br>
  Standard_EXPORT     void SetSurfaceSegmentMode(const Standard_Boolean Segment) ;
  //! Performs splitting and computes the resulting shape <br>
//!          If newContext is True (default), the internal context <br>
//!          will be cleared at start, else previous substitutions <br>
//!          will be acting. <br>
  Standard_EXPORT   virtual  Standard_Boolean Perform(const Standard_Boolean newContext = Standard_True) ;
  //! Gives the resulting Shape, or Null shape if not done. <br>
  Standard_EXPORT     TopoDS_Shape Result() const;
  //! Returns context with all the modifications made during <br>
//!          last call(s) to Perform() recorded <br>
  Standard_EXPORT     Handle_ShapeBuild_ReShape GetContext() const;
  //! Sets context with recorded modifications to be applied <br>
//!          during next call(s) to Perform(shape,Standard_False) <br>
  Standard_EXPORT     void SetContext(const Handle(ShapeBuild_ReShape)& context) ;
  //! Queries the status of last call to Perform <br>
//! OK   : no splitting was done (or no call to Perform) <br>
//! DONE1: some edges were splitted <br>
//! DONE2: surface was splitted <br>
//! FAIL1: some errors occured <br>
  Standard_EXPORT     Standard_Boolean Status(const ShapeExtend_Status status) const;
  //! Sets the tool for splitting faces. <br>
  Standard_EXPORT     void SetSplitFaceTool(const Handle(ShapeUpgrade_FaceDivide)& splitFaceTool) ;
  //!Sets mode for splitting 3d curves from edges. <br>
//! 0 - only curve 3d from free edges. <br>
//! 1 - only curve 3d from shared edges. <br>
//! 2 -  all curve 3d. <br>
  Standard_EXPORT     void SetEdgeMode(const Standard_Integer aEdgeMode) ;





protected:

  //! Returns the tool for splitting faces. <br>
  Standard_EXPORT   virtual  Handle_ShapeUpgrade_FaceDivide GetSplitFaceTool() const;


Handle_ShapeBuild_ReShape myContext;
TopoDS_Shape myShape;
TopoDS_Shape myResult;
Standard_Real myPrecision;
Standard_Real myMinTol;
Standard_Real myMaxTol;
Standard_Boolean mySegmentMode;
Standard_Integer myStatus;
Standard_Integer myEdgeMode;


private:



Handle_ShapeUpgrade_FaceDivide mySplitFaceTool;


};





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


#endif