973c2be1 |
1 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
2 | // |
973c2be1 |
3 | // This file is part of Open CASCADE Technology software library. |
b311480e |
4 | // |
d5f74e42 |
5 | // This library is free software; you can redistribute it and/or modify it under |
6 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
7 | // by the Free Software Foundation, with special exception defined in the file |
8 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
9 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
10 | // |
973c2be1 |
11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. |
b311480e |
13 | |
7fd59977 |
14 | |
42cf5bc1 |
15 | #include <Standard_Type.hxx> |
16 | #include <Standard_TypeMismatch.hxx> |
17 | #include <TopoDS.hxx> |
18 | #include <TopoDS_Compound.hxx> |
19 | #include <TopoDS_CompSolid.hxx> |
20 | #include <TopoDS_Edge.hxx> |
21 | #include <TopoDS_Face.hxx> |
22 | #include <TopoDS_Shape.hxx> |
23 | #include <TopoDS_Shell.hxx> |
24 | #include <TopoDS_Solid.hxx> |
25 | #include <TopoDS_Vertex.hxx> |
26 | #include <TopoDS_Wire.hxx> |
27 | #include <TransferBRep_ShapeBinder.hxx> |
7fd59977 |
28 | |
92efcf78 |
29 | IMPLEMENT_STANDARD_RTTIEXT(TransferBRep_ShapeBinder,TransferBRep_BinderOfShape) |
30 | |
b311480e |
31 | TransferBRep_ShapeBinder::TransferBRep_ShapeBinder () { } |
7fd59977 |
32 | |
33 | TransferBRep_ShapeBinder::TransferBRep_ShapeBinder (const TopoDS_Shape& shape) |
34 | : TransferBRep_BinderOfShape (shape) { } |
35 | |
36 | TopAbs_ShapeEnum TransferBRep_ShapeBinder::ShapeType () const |
37 | { |
38 | if (!HasResult()) return TopAbs_SHAPE; |
39 | return Result().ShapeType(); |
40 | } |
41 | |
42 | TopoDS_Vertex TransferBRep_ShapeBinder::Vertex() const |
43 | { return TopoDS::Vertex(Result()); } |
44 | |
45 | TopoDS_Edge TransferBRep_ShapeBinder::Edge() const |
46 | { return TopoDS::Edge(Result()); } |
47 | |
48 | TopoDS_Wire TransferBRep_ShapeBinder::Wire() const |
49 | { return TopoDS::Wire(Result()); } |
50 | |
51 | TopoDS_Face TransferBRep_ShapeBinder::Face() const |
52 | { return TopoDS::Face(Result()); } |
53 | |
54 | TopoDS_Shell TransferBRep_ShapeBinder::Shell() const |
55 | { return TopoDS::Shell(Result()); } |
56 | |
57 | TopoDS_Solid TransferBRep_ShapeBinder::Solid() const |
58 | { return TopoDS::Solid(Result()); } |
59 | |
60 | TopoDS_CompSolid TransferBRep_ShapeBinder::CompSolid() const |
61 | { return TopoDS::CompSolid(Result()); } |
62 | |
63 | TopoDS_Compound TransferBRep_ShapeBinder::Compound() const |
64 | { return TopoDS::Compound(Result()); } |