summaryrefslogtreecommitdiff
path: root/src/TopOpeBRepDS/TopOpeBRepDS_InterferenceTool.cxx
blob: 02254f3209ffe33385618d40cb535c9835db76bc (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
// File:	TopOpeBRepDS_InterferenceTool.cxx
// Created:	Thu Jun 24 19:06:17 1993
// Author:	Jean Yves LEBEY
//		<jyl@zerox>

#include <TopOpeBRepDS_SolidSurfaceInterference.hxx>
#include <TopOpeBRepDS_CurvePointInterference.hxx>
#include <TopOpeBRepDS_SurfaceCurveInterference.hxx>
#include <TopOpeBRepDS_EdgeVertexInterference.hxx>
#include <TopOpeBRepDS_FaceEdgeInterference.hxx>
#include <TopAbs.hxx>
#include <IntSurf_TypeTrans.hxx>
#include <IntSurf_Situation.hxx>
#include <TopOpeBRepDS_define.hxx>
#include <TopOpeBRepDS_InterferenceTool.ixx>

//=======================================================================
//function : MakeEdgeInterference
//purpose  : 
//=======================================================================
Handle(TopOpeBRepDS_Interference) TopOpeBRepDS_InterferenceTool::MakeEdgeInterference
(const TopOpeBRepDS_Transition& T,const TopOpeBRepDS_Kind SK,const Standard_Integer SI,const TopOpeBRepDS_Kind GK,const Standard_Integer GI,const Standard_Real P)
{
  return new TopOpeBRepDS_CurvePointInterference(T,SK,SI,GK,GI,P);
}

//=======================================================================
//function : MakeCurveInterference
//purpose  : 
//=======================================================================
Handle(TopOpeBRepDS_Interference) TopOpeBRepDS_InterferenceTool::MakeCurveInterference
(const TopOpeBRepDS_Transition& T,const TopOpeBRepDS_Kind SK,const Standard_Integer SI,const TopOpeBRepDS_Kind GK,const Standard_Integer GI,const Standard_Real P)
{
  return new TopOpeBRepDS_CurvePointInterference(T,SK,SI,GK,GI,P);
}

//=======================================================================
//function : DuplicateCurvePointInterference
//purpose  : 
//=======================================================================
Handle(TopOpeBRepDS_Interference) TopOpeBRepDS_InterferenceTool::DuplicateCurvePointInterference(const Handle(TopOpeBRepDS_Interference)& I)
{
  return new TopOpeBRepDS_CurvePointInterference
    (I->Transition().Complement(),
     I->SupportType(),I->Support(),
     I->GeometryType(),I->Geometry(),
     TopOpeBRepDS_InterferenceTool::Parameter(I));
}


//=======================================================================
//function : MakeFaceCurveInterference
//purpose  : 
//=======================================================================
Handle(TopOpeBRepDS_Interference) TopOpeBRepDS_InterferenceTool::MakeFaceCurveInterference
(const TopOpeBRepDS_Transition& Transition,const Standard_Integer FaceI,const Standard_Integer CurveI,const Handle(Geom2d_Curve)& PC)
{
  return new TopOpeBRepDS_SurfaceCurveInterference
    (Transition,
     TopOpeBRepDS_FACE,FaceI,
     TopOpeBRepDS_CURVE,CurveI,
     PC);
}


//=======================================================================
//function : MakeSolidSurfaceInterference
//purpose  : 
//=======================================================================
Handle(TopOpeBRepDS_Interference) TopOpeBRepDS_InterferenceTool::MakeSolidSurfaceInterference
(const TopOpeBRepDS_Transition& Transition,const Standard_Integer SolidI,const Standard_Integer SurfaceI)
{
  return new TopOpeBRepDS_SolidSurfaceInterference
    (Transition,
     TopOpeBRepDS_SOLID,SolidI,
     TopOpeBRepDS_SURFACE,SurfaceI);
}


//=======================================================================
//function : MakeEdgeVertexInterference
//purpose  : 
//=======================================================================
Handle(TopOpeBRepDS_Interference) TopOpeBRepDS_InterferenceTool::MakeEdgeVertexInterference
(const TopOpeBRepDS_Transition& Transition,
 const Standard_Integer EdgeI, 
 const Standard_Integer VertexI,
 const Standard_Boolean VertexIsBound,
 const TopOpeBRepDS_Config C,
 const Standard_Real param)
{
  // soit I l'EVI creee : 
  return new TopOpeBRepDS_EdgeVertexInterference
    (Transition,       // transition en cheminant sur l'arete accedante a I
     EdgeI,            // arete croisee par l'arete accedante, en V
     VertexI,          // vertex geometrie de I
     VertexIsBound,    // vertex est il un sommet de l'arete accedante de I
     C,                // orient. relative des aretes accedante et croisee.
     param);           // parametre de V sur arete accedante de I
}

//=======================================================================
//function : MakeFaceEdgeInterference
//purpose  : 
//=======================================================================
Handle(TopOpeBRepDS_Interference) TopOpeBRepDS_InterferenceTool::MakeFaceEdgeInterference
(const TopOpeBRepDS_Transition& Transition,
 const Standard_Integer FaceI, 
 const Standard_Integer EdgeI,
 const Standard_Boolean EdgeIsBound,
 const TopOpeBRepDS_Config C)
{
  return new TopOpeBRepDS_FaceEdgeInterference
    (Transition,
     FaceI,
     EdgeI,
     EdgeIsBound,
     C);
}

//=======================================================================
//function : Parameter
//purpose  : only on I = CurvePointInterference
//=======================================================================
Standard_Real TopOpeBRepDS_InterferenceTool::Parameter(const Handle(TopOpeBRepDS_Interference)& I)
{
  return (*((Handle(TopOpeBRepDS_CurvePointInterference)*)&I))->Parameter();
}

//=======================================================================
//function : Parameter
//purpose  : only on I = CurvePointInterference
//=======================================================================
void TopOpeBRepDS_InterferenceTool::Parameter(const Handle(TopOpeBRepDS_Interference)& I,const Standard_Real Par)
{
  (*((Handle(TopOpeBRepDS_CurvePointInterference)*)&I))->Parameter(Par);
}