0023024: Update headers of OCCT files
[occt.git] / src / BRepPrimAPI / BRepPrimAPI_MakeOneAxis.cxx
CommitLineData
b311480e 1// Created on: 1993-07-23
2// Created by: Remi LEQUETTE
3// Copyright (c) 1993-1999 Matra Datavision
4// Copyright (c) 1999-2012 OPEN CASCADE SAS
5//
6// The content of this file is subject to the Open CASCADE Technology Public
7// License Version 6.5 (the "License"). You may not use the content of this file
8// except in compliance with the License. Please obtain a copy of the License
9// at http://www.opencascade.org and read it completely before using this file.
10//
11// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13//
14// The Original Code and all software distributed under the License is
15// distributed on an "AS IS" basis, without warranty of any kind, and the
16// Initial Developer hereby disclaims all such warranties, including without
17// limitation, any warranties of merchantability, fitness for a particular
18// purpose or non-infringement. Please see the License for the specific terms
19// and conditions governing the rights and limitations under the License.
20
7fd59977 21
22
23#include <BRepPrimAPI_MakeOneAxis.ixx>
24#include <BRepBuilderAPI.hxx>
25#include <BRepPrim_OneAxis.hxx>
26#include <TopoDS.hxx>
27
28//=======================================================================
29//function : Face
30//purpose :
31//=======================================================================
32
33const TopoDS_Face& BRepPrimAPI_MakeOneAxis::Face()
34{
35 Build();
36 return ((BRepPrim_OneAxis*) OneAxis())->LateralFace();
37}
38
39
40//=======================================================================
41//function : Shell
42//purpose :
43//=======================================================================
44
45const TopoDS_Shell& BRepPrimAPI_MakeOneAxis::Shell()
46{
47 Build();
48 return ((BRepPrim_OneAxis*) OneAxis())->Shell();
49}
50
51//=======================================================================
52//function : Build
53//purpose :
54//=======================================================================
55
56void BRepPrimAPI_MakeOneAxis::Build()
57{
58 BRep_Builder B;
59 B.MakeSolid(TopoDS::Solid(myShape));
60 B.Add(myShape,((BRepPrim_OneAxis*) OneAxis())->Shell());
61 myShape.Closed(Standard_True);
62 Done();
63}
64
65//=======================================================================
66//function : Solid
67//purpose :
68//=======================================================================
69
70const TopoDS_Solid& BRepPrimAPI_MakeOneAxis::Solid()
71{
72 Build();
73 return TopoDS::Solid(myShape);
74}
75
76
77
78//=======================================================================
79//function : operator
80//purpose :
81//=======================================================================
82
83BRepPrimAPI_MakeOneAxis::operator TopoDS_Face()
84{
85 return Face();
86}
87
88//=======================================================================
89//function : operator
90//purpose :
91//=======================================================================
92
93BRepPrimAPI_MakeOneAxis::operator TopoDS_Shell()
94{
95 return Shell();
96}
97
98
99//=======================================================================
100//function : operator
101//purpose :
102//=======================================================================
103
104BRepPrimAPI_MakeOneAxis::operator TopoDS_Solid()
105{
106 return Solid();
107}
108