| 1 | // Copyright (c) 2015 OPEN CASCADE SAS |
| 2 | // |
| 3 | // This file is part of Open CASCADE Technology software library. |
| 4 | // |
| 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 |
| 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. |
| 10 | // |
| 11 | // Alternatively, this file may be used under the terms of Open CASCADE |
| 12 | // commercial license or contractual agreement. |
| 13 | |
| 14 | |
| 15 | #ifndef _StdObject_gp_Surfaces_HeaderFile |
| 16 | #define _StdObject_gp_Surfaces_HeaderFile |
| 17 | |
| 18 | |
| 19 | #include <StdObject_gp_Axes.hxx> |
| 20 | |
| 21 | #include <gp_Cone.hxx> |
| 22 | #include <gp_Cylinder.hxx> |
| 23 | #include <gp_Sphere.hxx> |
| 24 | #include <gp_Torus.hxx> |
| 25 | |
| 26 | |
| 27 | inline StdObjMgt_ReadData& operator >> |
| 28 | (StdObjMgt_ReadData::Object theReadData, gp_Cone& theCone) |
| 29 | { |
| 30 | gp_Ax3 anAx; |
| 31 | Standard_Real aRadius, aSemiAngle; |
| 32 | |
| 33 | theReadData >> anAx >> aRadius >> aSemiAngle; |
| 34 | |
| 35 | theCone.SetPosition (anAx); |
| 36 | theCone.SetRadius (aRadius); |
| 37 | theCone.SetSemiAngle (aSemiAngle); |
| 38 | |
| 39 | return theReadData; |
| 40 | } |
| 41 | |
| 42 | inline StdObjMgt_ReadData& operator >> |
| 43 | (StdObjMgt_ReadData::Object theReadData, gp_Cylinder& theCyl) |
| 44 | { |
| 45 | gp_Ax3 anAx; |
| 46 | Standard_Real aRadius; |
| 47 | |
| 48 | theReadData >> anAx >> aRadius; |
| 49 | |
| 50 | theCyl.SetPosition (anAx); |
| 51 | theCyl.SetRadius (aRadius); |
| 52 | |
| 53 | return theReadData; |
| 54 | } |
| 55 | |
| 56 | inline StdObjMgt_ReadData& operator >> |
| 57 | (StdObjMgt_ReadData::Object theReadData, gp_Sphere& theSph) |
| 58 | { |
| 59 | gp_Ax3 anAx; |
| 60 | Standard_Real aRadius; |
| 61 | |
| 62 | theReadData >> anAx >> aRadius; |
| 63 | |
| 64 | theSph.SetPosition (anAx); |
| 65 | theSph.SetRadius (aRadius); |
| 66 | |
| 67 | return theReadData; |
| 68 | } |
| 69 | |
| 70 | inline StdObjMgt_ReadData& operator >> |
| 71 | (StdObjMgt_ReadData::Object theReadData, gp_Torus& theTorus) |
| 72 | { |
| 73 | gp_Ax3 anAx; |
| 74 | Standard_Real aMajorRadius, aMinorRadius; |
| 75 | |
| 76 | theReadData >> anAx >> aMajorRadius >> aMinorRadius; |
| 77 | |
| 78 | theTorus.SetPosition (anAx); |
| 79 | theTorus.SetMajorRadius (aMajorRadius); |
| 80 | theTorus.SetMinorRadius (aMinorRadius); |
| 81 | |
| 82 | return theReadData; |
| 83 | } |
| 84 | |
| 85 | |
| 86 | #endif |