summaryrefslogtreecommitdiff
path: root/inc/TopTrans_SurfaceTransition.hxx
blob: 6d226f4f25112af538805d5cad8b578eb05fe17b (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
149
150
151
152
153
154
155
156
// 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 _TopTrans_SurfaceTransition_HeaderFile
#define _TopTrans_SurfaceTransition_HeaderFile

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

#ifndef _gp_Dir_HeaderFile
#include <gp_Dir.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _TColStd_Array2OfReal_HeaderFile
#include <TColStd_Array2OfReal.hxx>
#endif
#ifndef _TopTrans_Array2OfOrientation_HeaderFile
#include <TopTrans_Array2OfOrientation.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _TopAbs_Orientation_HeaderFile
#include <TopAbs_Orientation.hxx>
#endif
#ifndef _TopAbs_State_HeaderFile
#include <TopAbs_State.hxx>
#endif
class gp_Dir;


//! This algorithm  is used to  compute the transition <br>
//!          of a 3D surface intersecting a topological surfacic <br>
//!          boundary on a 3D curve ( intersection curve ). <br>
//!          The  boundary is  described  by a  set of faces <br>
//!          each face is described by <br>
//!          - its support surface, <br>
//!          - an orientation defining its matter side. <br>
//!          The geometric elements are described locally at the <br>
//!          intersection point by a second order development. <br>
//!          A surface is described by the normal vector, the <br>
//!          principal directions and the principal curvatures. <br>
//!          A curve is described  by the  tangent, the normal <br>
//!          and the curvature. <br>
//!          The  algorithm  keeps track of the two faces elements <br>
//!          closest to the part of the curve "before" and "after" <br>
//!          the intersection,  these  two elements are updated <br>
//!          for each new face. <br>
//!          The position of the  curve can be computed when at <br>
//!          least  one surface  element has   been given, this <br>
//!          position is "In","Out" or "On" for the part of the <br>
//!          curve "Before" or "After" the intersection. <br>
class TopTrans_SurfaceTransition  {
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); 
  }

  //! Create an empty Surface Transition. <br>
  Standard_EXPORT   TopTrans_SurfaceTransition();
  //! Initialize  a  Surface Transition with the local <br>
//!          description of the intersection curve and of the <br>
//!          reference surface. <br>
//!          PREQUESITORY : Norm oriented OUTSIDE "geometric matter" <br>
  Standard_EXPORT     void Reset(const gp_Dir& Tgt,const gp_Dir& Norm,const gp_Dir& MaxD,const gp_Dir& MinD,const Standard_Real MaxCurv,const Standard_Real MinCurv) ;
  //! Initialize  a  Surface Transition  with the  local <br>
//!          description of a straight line. <br>
  Standard_EXPORT     void Reset(const gp_Dir& Tgt,const gp_Dir& Norm) ;
  //! Add a face element to the boundary. <br>
//! <br>
//!          - S defines topological orientation for the face : <br>
//!          S FORWARD means: along the intersection curve on the <br>
//!          reference surface, transition states while crossing <br>
//!          the face are OUT,IN. <br>
//!          S REVERSED means states are IN,OUT. <br>
//!          S INTERNAL means states are IN,IN. <br>
//! <br>
//!          - O defines curve's position on face : <br>
//!          O FORWARD means the face is before the intersection <br>
//!          O REVERSED means the face is AFTER <br>
//!          O INTERNAL means the curve intersection is in the face. <br>
//!          PREQUESITORY : Norm oriented OUTSIDE "geometric matter" <br>
  Standard_EXPORT     void Compare(const Standard_Real Tole,const gp_Dir& Norm,const gp_Dir& MaxD,const gp_Dir& MinD,const Standard_Real MaxCurv,const Standard_Real MinCurv,const TopAbs_Orientation S,const TopAbs_Orientation O) ;
  //! Add a plane or a cylindric face to the boundary. <br>
  Standard_EXPORT     void Compare(const Standard_Real Tole,const gp_Dir& Norm,const TopAbs_Orientation S,const TopAbs_Orientation O) ;
  //! Returns the state of the reference surface before <br>
//!          the interference, this is the position relative to <br>
//!          the surface of a  point very close to the intersection <br>
//!          on the negative side of the tangent. <br>
  Standard_EXPORT     TopAbs_State StateBefore() const;
  //! Returns the state of the reference surface after <br>
//!          interference, this is the position relative to the <br>
//!          surface of a point very  close to the intersection <br>
//!          on the positive side of the tangent. <br>
  Standard_EXPORT     TopAbs_State StateAfter() const;
  
  Standard_EXPORT   static  TopAbs_State GetBefore(const TopAbs_Orientation Tran) ;
  
  Standard_EXPORT   static  TopAbs_State GetAfter(const TopAbs_Orientation Tran) ;





protected:





private:

  
  Standard_EXPORT     void UpdateReference(const Standard_Real Tole,const Standard_Boolean isInfRef,Standard_Real& CosInf,Standard_Real& CosSup,const TopAbs_Orientation Tran,TopAbs_Orientation& TranRef) ;
  
  Standard_EXPORT     Standard_Real ComputeCos(const Standard_Real Tole,const gp_Dir& Norm,const TopAbs_Orientation O,Standard_Boolean& isleft) const;


gp_Dir myTgt;
gp_Dir myNorm;
gp_Dir beafter;
Standard_Real myCurvRef;
TColStd_Array2OfReal myAng;
TColStd_Array2OfReal myCurv;
TopTrans_Array2OfOrientation myOri;
Standard_Boolean myTouchFlag;


};





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


#endif