Warning, /include/opencascade/AppBlend_AppSurf.lxx is written in an unsupported language. File is not indexed.
0001 // Copyright (c) 1995-1999 Matra Datavision
0002 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0003 //
0004 // This file is part of Open CASCADE Technology software library.
0005 //
0006 // This library is free software; you can redistribute it and/or modify it under
0007 // the terms of the GNU Lesser General Public License version 2.1 as published
0008 // by the Free Software Foundation, with special exception defined in the file
0009 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0010 // distribution for complete text of the license and disclaimer of any warranty.
0011 //
0012 // Alternatively, this file may be used under the terms of Open CASCADE
0013 // commercial license or contractual agreement.
0014
0015 #include <StdFail_NotDone.hxx>
0016 #include <gp_Pnt.hxx>
0017 #include <NCollection_Array2.hxx>
0018 #include <NCollection_HArray2.hxx>
0019 #include <gp_Pnt2d.hxx>
0020 #include <NCollection_Array1.hxx>
0021 #include <NCollection_HArray1.hxx>
0022 #include <Standard_Integer.hxx>
0023
0024 inline bool AppBlend_AppSurf::IsDone() const
0025 {
0026 return done;
0027 }
0028
0029 inline int AppBlend_AppSurf::UDegree() const
0030 {
0031 if (!done)
0032 {
0033 throw StdFail_NotDone();
0034 }
0035 return udeg;
0036 }
0037
0038 inline int AppBlend_AppSurf::VDegree() const
0039 {
0040 if (!done)
0041 {
0042 throw StdFail_NotDone();
0043 }
0044 return vdeg;
0045 }
0046
0047 inline const NCollection_Array2<gp_Pnt>& AppBlend_AppSurf::SurfPoles() const
0048 {
0049 if (!done)
0050 {
0051 throw StdFail_NotDone();
0052 }
0053 return tabPoles->Array2();
0054 }
0055
0056 inline const NCollection_Array2<double>& AppBlend_AppSurf::SurfWeights() const
0057 {
0058 if (!done)
0059 {
0060 throw StdFail_NotDone();
0061 }
0062 return tabWeights->Array2();
0063 }
0064
0065 inline const NCollection_Array1<double>& AppBlend_AppSurf::SurfUKnots() const
0066 {
0067 if (!done)
0068 {
0069 throw StdFail_NotDone();
0070 }
0071 return tabUKnots->Array1();
0072 }
0073
0074 inline const NCollection_Array1<double>& AppBlend_AppSurf::SurfVKnots() const
0075 {
0076 if (!done)
0077 {
0078 throw StdFail_NotDone();
0079 }
0080 return tabVKnots->Array1();
0081 }
0082
0083 inline const NCollection_Array1<int>& AppBlend_AppSurf::SurfUMults() const
0084 {
0085 if (!done)
0086 {
0087 throw StdFail_NotDone();
0088 }
0089 return tabUMults->Array1();
0090 }
0091
0092 inline const NCollection_Array1<int>& AppBlend_AppSurf::SurfVMults() const
0093 {
0094 if (!done)
0095 {
0096 throw StdFail_NotDone();
0097 }
0098 return tabVMults->Array1();
0099 }
0100
0101 inline int AppBlend_AppSurf::NbCurves2d() const
0102 {
0103 if (!done)
0104 {
0105 throw StdFail_NotDone();
0106 }
0107 return seqPoles2d.Length();
0108 }
0109
0110 inline int AppBlend_AppSurf::Curves2dDegree() const
0111 {
0112 if (!done)
0113 {
0114 throw StdFail_NotDone();
0115 }
0116 if (seqPoles2d.Length() == 0)
0117 {
0118 throw Standard_DomainError();
0119 }
0120 return vdeg;
0121 }
0122
0123 inline const NCollection_Array1<gp_Pnt2d>& AppBlend_AppSurf::Curve2dPoles(const int Index) const
0124 {
0125 if (!done)
0126 {
0127 throw StdFail_NotDone();
0128 }
0129 if (seqPoles2d.Length() == 0)
0130 {
0131 throw Standard_DomainError();
0132 }
0133 return seqPoles2d(Index)->Array1();
0134 }
0135
0136 inline const NCollection_Array1<double>& AppBlend_AppSurf::Curves2dKnots() const
0137 {
0138 if (!done)
0139 {
0140 throw StdFail_NotDone();
0141 }
0142 if (seqPoles2d.Length() == 0)
0143 {
0144 throw Standard_DomainError();
0145 }
0146 return tabVKnots->Array1();
0147 }
0148
0149 inline const NCollection_Array1<int>& AppBlend_AppSurf::Curves2dMults() const
0150 {
0151 if (!done)
0152 {
0153 throw StdFail_NotDone();
0154 }
0155 if (seqPoles2d.Length() == 0)
0156 {
0157 throw Standard_DomainError();
0158 }
0159 return tabVMults->Array1();
0160 }
0161
0162 inline void AppBlend_AppSurf::TolReached(double& Tol3d, double& Tol2d) const
0163 {
0164 if (!done)
0165 {
0166 throw StdFail_NotDone();
0167 }
0168 Tol3d = tol3dreached;
0169 Tol2d = tol2dreached;
0170 }