File: ShapeUpgrade_ShapeDivide.hxx

package info (click to toggle)
oce 0.18.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 301,548 kB
  • sloc: cpp: 1,190,609; ansic: 67,225; sh: 11,630; tcl: 7,954; cs: 5,221; python: 2,867; java: 1,522; makefile: 342; xml: 292; perl: 37
file content (148 lines) | stat: -rw-r--r-- 4,751 bytes parent folder | download | duplicates (3)
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 _ShapeUpgrade_ShapeDivide_HeaderFile
#define _ShapeUpgrade_ShapeDivide_HeaderFile

#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Macro.hxx>

#include <Handle_ShapeUpgrade_FaceDivide.hxx>
#include <Handle_ShapeBuild_ReShape.hxx>
#include <Handle_ShapeExtend_BasicMsgRegistrator.hxx>
#include <TopoDS_Shape.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Integer.hxx>
#include <Message_Gravity.hxx>
#include <ShapeExtend_Status.hxx>
class ShapeUpgrade_FaceDivide;
class ShapeBuild_ReShape;
class ShapeExtend_BasicMsgRegistrator;
class TopoDS_Shape;
class Message_Msg;


//! Divides a all faces in shell with given criteria Shell.
class ShapeUpgrade_ShapeDivide 
{
public:

  DEFINE_STANDARD_ALLOC

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




protected:

  
  //! Returns the tool for splitting faces.
  Standard_EXPORT virtual   Handle(ShapeUpgrade_FaceDivide) GetSplitFaceTool()  const;
  
  Standard_EXPORT virtual   Message_Msg GetFaceMsg()  const;
  
  Standard_EXPORT virtual   Message_Msg GetWireMsg()  const;
  
  //! Returns a message decsribing modification of a shape.
  Standard_EXPORT virtual   Message_Msg GetEdgeMsg()  const;


  Handle(ShapeBuild_ReShape) myContext;
  Handle(ShapeExtend_BasicMsgRegistrator) myMsgReg;
  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;


};







#endif // _ShapeUpgrade_ShapeDivide_HeaderFile