File indexing completed on 2025-01-18 10:05:00
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef _StdObject_gp_Curves_HeaderFile
0016 #define _StdObject_gp_Curves_HeaderFile
0017
0018
0019 #include <StdObject_gp_Axes.hxx>
0020
0021 #include <gp_Lin2d.hxx>
0022 #include <gp_Circ2d.hxx>
0023 #include <gp_Elips2d.hxx>
0024 #include <gp_Hypr2d.hxx>
0025 #include <gp_Parab2d.hxx>
0026 #include <gp_Circ.hxx>
0027 #include <gp_Elips.hxx>
0028 #include <gp_Hypr.hxx>
0029 #include <gp_Parab.hxx>
0030
0031
0032 inline StdObjMgt_ReadData& operator >>
0033 (StdObjMgt_ReadData& theReadData, gp_Lin2d& theLin)
0034 {
0035 gp_Ax2d anAx;
0036 theReadData >> anAx;
0037 theLin.SetPosition (anAx);
0038 return theReadData;
0039 }
0040
0041 inline StdObjMgt_WriteData& operator <<
0042 (StdObjMgt_WriteData& theWriteData, const gp_Lin2d& theLin)
0043 {
0044 const gp_Ax2d& anAx = theLin.Position();
0045 write (theWriteData, anAx);
0046 return theWriteData;
0047 }
0048
0049 inline StdObjMgt_ReadData& operator >>
0050 (StdObjMgt_ReadData& theReadData, gp_Circ2d& theCirc)
0051 {
0052 gp_Ax22d anAx;
0053 Standard_Real aRadius;
0054
0055 theReadData >> anAx >> aRadius;
0056
0057 theCirc.SetAxis (anAx);
0058 theCirc.SetRadius (aRadius);
0059
0060 return theReadData;
0061 }
0062
0063 inline StdObjMgt_WriteData& operator <<
0064 (StdObjMgt_WriteData& theWriteData, const gp_Circ2d& theCirc)
0065 {
0066 const gp_Ax22d& anAx = theCirc.Position();
0067 Standard_Real aRadius = theCirc.Radius();
0068 theWriteData << anAx << aRadius;
0069 return theWriteData;
0070 }
0071
0072 inline StdObjMgt_ReadData& operator >>
0073 (StdObjMgt_ReadData& theReadData, gp_Elips2d& theElips)
0074 {
0075 gp_Ax22d anAx;
0076 Standard_Real aMajorRadius, aMinorRadius;
0077
0078 theReadData >> anAx >> aMajorRadius >> aMinorRadius;
0079
0080 theElips.SetAxis (anAx);
0081 theElips.SetMajorRadius (aMajorRadius);
0082 theElips.SetMinorRadius (aMinorRadius);
0083
0084 return theReadData;
0085 }
0086
0087 inline StdObjMgt_WriteData& operator <<
0088 (StdObjMgt_WriteData& theWriteData, const gp_Elips2d& theElips)
0089 {
0090 const gp_Ax22d& anAx = theElips.Axis();
0091 Standard_Real aMajorRadius = theElips.MajorRadius();
0092 Standard_Real aMinorRadius = theElips.MinorRadius();
0093 theWriteData << anAx << aMajorRadius << aMinorRadius;
0094 return theWriteData;
0095 }
0096
0097 inline StdObjMgt_ReadData& operator >>
0098 (StdObjMgt_ReadData& theReadData, gp_Hypr2d& theHypr)
0099 {
0100 gp_Ax22d anAx;
0101 Standard_Real aMajorRadius, aMinorRadius;
0102
0103 theReadData >> anAx >> aMajorRadius >> aMinorRadius;
0104
0105 theHypr.SetAxis (anAx);
0106 theHypr.SetMajorRadius (aMajorRadius);
0107 theHypr.SetMinorRadius (aMinorRadius);
0108
0109 return theReadData;
0110 }
0111
0112 inline StdObjMgt_WriteData& operator <<
0113 (StdObjMgt_WriteData& theWriteData, const gp_Hypr2d& theHypr)
0114 {
0115 const gp_Ax22d& anAx = theHypr.Axis();
0116 Standard_Real aMajorRadius = theHypr.MajorRadius();
0117 Standard_Real aMinorRadius = theHypr.MinorRadius();
0118 theWriteData << anAx << aMajorRadius << aMinorRadius;
0119 return theWriteData;
0120 }
0121
0122 inline StdObjMgt_ReadData& operator >>
0123 (StdObjMgt_ReadData& theReadData, gp_Parab2d& theParab)
0124 {
0125 gp_Ax22d anAx;
0126 Standard_Real aFocalLength;
0127
0128 theReadData >> anAx >> aFocalLength;
0129
0130 theParab.SetAxis (anAx);
0131 theParab.SetFocal (aFocalLength);
0132
0133 return theReadData;
0134 }
0135
0136 inline StdObjMgt_WriteData& operator <<
0137 (StdObjMgt_WriteData& theWriteData, const gp_Parab2d& theParab)
0138 {
0139 const gp_Ax22d& anAx = theParab.Axis();
0140 Standard_Real aFocalLength = theParab.Focal();
0141 theWriteData << anAx << aFocalLength;
0142 return theWriteData;
0143 }
0144
0145 inline StdObjMgt_ReadData& operator >>
0146 (StdObjMgt_ReadData& theReadData, gp_Lin& theLin)
0147 {
0148 gp_Ax1 anAx;
0149 theReadData >> anAx;
0150 theLin.SetPosition (anAx);
0151 return theReadData;
0152 }
0153
0154 inline StdObjMgt_WriteData& operator <<
0155 (StdObjMgt_WriteData& theWriteData, const gp_Lin& theLin)
0156 {
0157 const gp_Ax1& anAx = theLin.Position();
0158 write (theWriteData, anAx);
0159 return theWriteData;
0160 }
0161
0162 inline StdObjMgt_ReadData& operator >>
0163 (StdObjMgt_ReadData& theReadData, gp_Circ& theCirc)
0164 {
0165 gp_Ax2 anAx;
0166 Standard_Real aRadius;
0167
0168 theReadData >> anAx >> aRadius;
0169
0170 theCirc.SetPosition (anAx);
0171 theCirc.SetRadius (aRadius);
0172
0173 return theReadData;
0174 }
0175
0176 inline StdObjMgt_WriteData& operator <<
0177 (StdObjMgt_WriteData& theWriteData, const gp_Circ& theCirc)
0178 {
0179 const gp_Ax2& anAx = theCirc.Position();
0180 Standard_Real aRadius = theCirc.Radius();
0181 theWriteData << anAx << aRadius;
0182 return theWriteData;
0183 }
0184
0185 inline StdObjMgt_ReadData& operator >>
0186 (StdObjMgt_ReadData& theReadData, gp_Elips& theElips)
0187 {
0188 gp_Ax2 anAx;
0189 Standard_Real aMajorRadius, aMinorRadius;
0190
0191 theReadData >> anAx >> aMajorRadius >> aMinorRadius;
0192
0193 theElips.SetPosition (anAx);
0194 theElips.SetMajorRadius (aMajorRadius);
0195 theElips.SetMinorRadius (aMinorRadius);
0196
0197 return theReadData;
0198 }
0199
0200 inline StdObjMgt_WriteData& operator <<
0201 (StdObjMgt_WriteData& theWriteData, const gp_Elips& theElips)
0202 {
0203 const gp_Ax2& anAx = theElips.Position();
0204 Standard_Real aMajorRadius = theElips.MajorRadius();
0205 Standard_Real aMinorRadius = theElips.MinorRadius();
0206 theWriteData << anAx << aMajorRadius << aMinorRadius;
0207 return theWriteData;
0208 }
0209
0210 inline StdObjMgt_ReadData& operator >>
0211 (StdObjMgt_ReadData& theReadData, gp_Hypr& theHypr)
0212 {
0213 gp_Ax2 anAx;
0214 Standard_Real aMajorRadius, aMinorRadius;
0215
0216 theReadData >> anAx >> aMajorRadius >> aMinorRadius;
0217
0218 theHypr.SetPosition (anAx);
0219 theHypr.SetMajorRadius (aMajorRadius);
0220 theHypr.SetMinorRadius (aMinorRadius);
0221
0222 return theReadData;
0223 }
0224
0225 inline StdObjMgt_WriteData& operator <<
0226 (StdObjMgt_WriteData& theWriteData, const gp_Hypr& theHypr)
0227 {
0228 const gp_Ax2& anAx = theHypr.Position();
0229 Standard_Real aMajorRadius = theHypr.MajorRadius();
0230 Standard_Real aMinorRadius = theHypr.MinorRadius();
0231 theWriteData << anAx << aMajorRadius << aMinorRadius;
0232 return theWriteData;
0233 }
0234
0235 inline StdObjMgt_ReadData& operator >>
0236 (StdObjMgt_ReadData& theReadData, gp_Parab& theParab)
0237 {
0238 gp_Ax2 anAx;
0239 Standard_Real aFocalLength;
0240
0241 theReadData >> anAx >> aFocalLength;
0242
0243 theParab.SetPosition (anAx);
0244 theParab.SetFocal (aFocalLength);
0245
0246 return theReadData;
0247 }
0248
0249 inline StdObjMgt_WriteData& operator <<
0250 (StdObjMgt_WriteData& theWriteData, const gp_Parab& theParab)
0251 {
0252 const gp_Ax2& anAx = theParab.Position();
0253 Standard_Real aFocalLength = theParab.Focal();
0254 theWriteData << anAx << aFocalLength;
0255 return theWriteData;
0256 }
0257
0258
0259 #endif