summaryrefslogtreecommitdiff
path: root/src/BRepPrimAPI/BRepPrimAPI_MakeWedge.cxx
blob: 49e1b4dd73dd05a83f37cb5018870054ee7b3bc3 (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
// File:	BRepPrimAPI_MakeWedge.cxx
// Created:	Fri Jul 23 15:51:56 1993
// Author:	Remi LEQUETTE
//		<rle@nonox>


#include <BRepPrimAPI_MakeWedge.ixx>
#include <TopoDS.hxx>


//=======================================================================
//function : BRepPrimAPI_MakeWedge
//purpose  : 
//=======================================================================

BRepPrimAPI_MakeWedge::BRepPrimAPI_MakeWedge(const Standard_Real dx, 
				     const Standard_Real dy,
				     const Standard_Real dz,
				     const Standard_Real ltx) :
       myWedge(gp_Ax2(gp_Pnt(0,0,0),gp_Dir(0,0,1),gp_Dir(1,0,0)),
	       dx,dy,dz,ltx)
{
}


//=======================================================================
//function : BRepPrimAPI_MakeWedge
//purpose  : 
//=======================================================================

BRepPrimAPI_MakeWedge::BRepPrimAPI_MakeWedge(const gp_Ax2& Axes,
				     const Standard_Real dx, 
				     const Standard_Real dy,
				     const Standard_Real dz, 
				     const Standard_Real ltx) :
       myWedge(Axes,
	       dx,dy,dz,ltx)
{
}


//=======================================================================
//function : BRepPrimAPI_MakeWedge
//purpose  : 
//=======================================================================

BRepPrimAPI_MakeWedge::BRepPrimAPI_MakeWedge(const Standard_Real dx, 
				     const Standard_Real dy, 
				     const Standard_Real dz, 
				     const Standard_Real xmin,
				     const Standard_Real zmin,
				     const Standard_Real xmax,
				     const Standard_Real zmax) :
       myWedge(gp_Ax2(gp_Pnt(0,0,0),gp_Dir(0,0,1),gp_Dir(1,0,0)),
	       0,0,0,zmin,xmin,dx,dy,dz,zmax,xmax)
{
}


//=======================================================================
//function : BRepPrimAPI_MakeWedge
//purpose  : 
//=======================================================================

BRepPrimAPI_MakeWedge::BRepPrimAPI_MakeWedge(const gp_Ax2& Axes,
				     const Standard_Real dx,
				     const Standard_Real dy, 
				     const Standard_Real dz,
				     const Standard_Real xmin,
				     const Standard_Real zmin, 
				     const Standard_Real xmax, 
				     const Standard_Real zmax) :
       myWedge(Axes,
	       0,0,0,zmin,xmin,dx,dy,dz,zmax,xmax)
{
}


//=======================================================================
//function : Wedge
//purpose  : 
//=======================================================================

BRepPrim_Wedge&  BRepPrimAPI_MakeWedge::Wedge()
{
  return myWedge;
}


//=======================================================================
//function : Shell
//purpose  : 
//=======================================================================

const TopoDS_Shell&  BRepPrimAPI_MakeWedge::Shell()
{
  Build();
  return myWedge.Shell();
}


//=======================================================================
//function : Build
//purpose  : 
//=======================================================================

void BRepPrimAPI_MakeWedge::Build()
{
  BRep_Builder B;
  B.MakeSolid(TopoDS::Solid(myShape));
  B.Add(myShape,myWedge.Shell());
  myShape.Closed(Standard_True);
  Done();
}

//=======================================================================
//function : Solid
//purpose  : 
//=======================================================================

const TopoDS_Solid&  BRepPrimAPI_MakeWedge::Solid()
{
  Build();
  return TopoDS::Solid(myShape);
}


//=======================================================================
//function : operator
//purpose  : 
//=======================================================================

BRepPrimAPI_MakeWedge::operator TopoDS_Shell()
{
  return Shell();
}


//=======================================================================
//function : operator
//purpose  : 
//=======================================================================

BRepPrimAPI_MakeWedge::operator TopoDS_Solid()
{
  return Solid();
}