Warning, /include/opencascade/ElSLib.lxx is written in an unsupported language. File is not indexed.
0001 // Created by: Jean-Claude Vauthier
0002 // Copyright (c) 1995-1999 Matra Datavision
0003 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015
0016 #include <gp_Pln.hxx>
0017 #include <gp_Sphere.hxx>
0018 #include <gp_Torus.hxx>
0019 #include <gp_Cylinder.hxx>
0020 #include <gp_Cone.hxx>
0021 #include <gp_Ax3.hxx>
0022
0023
0024 inline gp_Pnt ElSLib::Value (const Standard_Real U, const Standard_Real V, const gp_Pln& Pl) {
0025
0026 return ElSLib::PlaneValue (U, V, Pl.Position());
0027 }
0028
0029
0030 inline gp_Pnt ElSLib::Value (const Standard_Real U, const Standard_Real V, const gp_Cone& C) {
0031
0032 return ElSLib::ConeValue (U, V, C.Position(), C.RefRadius(), C.SemiAngle());
0033 }
0034
0035
0036 inline gp_Pnt ElSLib::Value (const Standard_Real U, const Standard_Real V, const gp_Cylinder& C) {
0037
0038 return ElSLib::CylinderValue (U, V, C.Position(), C.Radius());
0039 }
0040
0041
0042 inline gp_Pnt ElSLib::Value (const Standard_Real U, const Standard_Real V, const gp_Sphere& S) {
0043
0044 return ElSLib::SphereValue (U, V, S.Position(), S.Radius());
0045 }
0046
0047
0048 inline gp_Pnt ElSLib::Value (const Standard_Real U, const Standard_Real V, const gp_Torus& T) {
0049
0050 return ElSLib::TorusValue (U, V, T.Position(), T.MajorRadius(), T.MinorRadius());
0051 }
0052
0053
0054
0055 inline gp_Vec ElSLib::DN (const Standard_Real U, const Standard_Real V, const gp_Pln& Pl, const Standard_Integer Nu, const Standard_Integer Nv) {
0056
0057 return ElSLib::PlaneDN (U, V, Pl.Position(), Nu, Nv);
0058 }
0059
0060
0061 inline gp_Vec ElSLib::DN (const Standard_Real U, const Standard_Real V, const gp_Cone& C, const Standard_Integer Nu, const Standard_Integer Nv) {
0062
0063 return ElSLib::ConeDN (U, V, C.Position(), C.RefRadius(), C.SemiAngle(), Nu, Nv);
0064 }
0065
0066
0067 inline gp_Vec ElSLib::DN (const Standard_Real U, const Standard_Real V, const gp_Cylinder& C, const Standard_Integer Nu, const Standard_Integer Nv) {
0068
0069 return ElSLib::CylinderDN (U, V, C.Position(), C.Radius(), Nu, Nv);
0070 }
0071
0072
0073 inline gp_Vec ElSLib::DN (const Standard_Real U, const Standard_Real V, const gp_Sphere& S, const Standard_Integer Nu, const Standard_Integer Nv) {
0074
0075 return ElSLib::SphereDN (U, V, S.Position(), S.Radius(), Nu, Nv);
0076 }
0077
0078
0079 inline gp_Vec ElSLib::DN (const Standard_Real U, const Standard_Real V, const gp_Torus& T, const Standard_Integer Nu, const Standard_Integer Nv) {
0080
0081 return ElSLib::TorusDN (U, V, T.Position(), T.MajorRadius(), T.MinorRadius(), Nu, Nv);
0082 }
0083
0084
0085
0086
0087 inline void ElSLib::D0 (const Standard_Real U, const Standard_Real V, const gp_Pln& Pl, gp_Pnt& P) {
0088
0089 ElSLib::PlaneD0 (U, V, Pl.Position(), P);
0090 }
0091
0092 inline void ElSLib::D0 (const Standard_Real U, const Standard_Real V, const gp_Cone& C, gp_Pnt& P) {
0093
0094 ElSLib::ConeD0 (U, V, C.Position(), C.RefRadius(), C.SemiAngle(), P);
0095 }
0096
0097 inline void ElSLib::D0 (const Standard_Real U, const Standard_Real V, const gp_Cylinder& C, gp_Pnt& P) {
0098
0099 ElSLib::CylinderD0 (U, V, C.Position(), C.Radius(), P);
0100 }
0101
0102 inline void ElSLib::D0 (const Standard_Real U, const Standard_Real V, const gp_Sphere& S, gp_Pnt& P) {
0103
0104 ElSLib::SphereD0 (U, V, S.Position(), S.Radius(), P);
0105 }
0106
0107 inline void ElSLib::D0 (const Standard_Real U, const Standard_Real V, const gp_Torus& T, gp_Pnt& P) {
0108
0109 ElSLib::TorusD0 (U, V, T.Position(), T.MajorRadius(), T.MinorRadius(), P);
0110 }
0111
0112
0113
0114 inline void ElSLib::D1 (const Standard_Real U, const Standard_Real V, const gp_Pln& Pl, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv) {
0115
0116 ElSLib::PlaneD1 (U, V, Pl.Position(), P, Vu, Vv);
0117 }
0118
0119
0120 inline void ElSLib::D1 (const Standard_Real U, const Standard_Real V, const gp_Cone& C, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv) {
0121
0122 ElSLib::ConeD1 (U, V, C.Position(), C.RefRadius(), C.SemiAngle(), P, Vu, Vv);
0123 }
0124
0125
0126 inline void ElSLib::D1 (const Standard_Real U, const Standard_Real V, const gp_Cylinder& C, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv) {
0127
0128 ElSLib::CylinderD1 (U, V, C.Position(), C.Radius(), P, Vu, Vv);
0129 }
0130
0131
0132 inline void ElSLib::D1 (const Standard_Real U, const Standard_Real V, const gp_Sphere& S, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv) {
0133
0134 ElSLib::SphereD1 (U, V, S.Position(), S.Radius(), P, Vu, Vv);
0135 }
0136
0137
0138 inline void ElSLib::D1 (const Standard_Real U, const Standard_Real V, const gp_Torus& T, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv) {
0139
0140 ElSLib::TorusD1 (U, V, T.Position(), T.MajorRadius(), T.MinorRadius(), P, Vu, Vv);
0141 }
0142
0143
0144
0145 inline void ElSLib::D2 (const Standard_Real U, const Standard_Real V, const gp_Cone& C, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv, gp_Vec& Vuu, gp_Vec& Vvv, gp_Vec& Vuv) {
0146
0147 ElSLib::ConeD2 (U, V, C.Position(), C.RefRadius(), C.SemiAngle(), P, Vu, Vv, Vuu, Vvv, Vuv);
0148 }
0149
0150
0151 inline void ElSLib::D2 (const Standard_Real U, const Standard_Real V, const gp_Cylinder& C, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv, gp_Vec& Vuu, gp_Vec& Vvv, gp_Vec& Vuv) {
0152
0153 ElSLib::CylinderD2 (U, V, C.Position(), C.Radius(), P, Vu, Vv, Vuu, Vvv, Vuv);
0154 }
0155
0156
0157 inline void ElSLib::D2 (const Standard_Real U, const Standard_Real V, const gp_Sphere& S, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv, gp_Vec& Vuu, gp_Vec& Vvv, gp_Vec& Vuv) {
0158
0159 ElSLib::SphereD2 (U, V, S.Position(), S.Radius(), P, Vu, Vv, Vuu, Vvv, Vuv);
0160 }
0161
0162
0163 inline void ElSLib::D2 (const Standard_Real U, const Standard_Real V, const gp_Torus& T, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv, gp_Vec& Vuu, gp_Vec& Vvv, gp_Vec& Vuv) {
0164
0165 ElSLib::TorusD2 (U, V, T.Position(), T.MajorRadius(), T.MinorRadius(), P, Vu, Vv, Vuu, Vvv, Vuv);
0166 }
0167
0168
0169
0170
0171 inline void ElSLib::D3 (const Standard_Real U, const Standard_Real V, const gp_Cone& C, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv, gp_Vec& Vuu, gp_Vec& Vvv, gp_Vec& Vuv, gp_Vec& Vuuu, gp_Vec& Vvvv, gp_Vec& Vuuv, gp_Vec& Vuvv) {
0172
0173 ElSLib::ConeD3 (U, V, C.Position(), C.RefRadius(), C.SemiAngle(), P, Vu, Vv, Vuu, Vvv, Vuv, Vuuu, Vvvv, Vuuv, Vuvv);
0174 }
0175
0176
0177 inline void ElSLib::D3 (const Standard_Real U, const Standard_Real V, const gp_Cylinder& C, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv, gp_Vec& Vuu, gp_Vec& Vvv, gp_Vec& Vuv, gp_Vec& Vuuu, gp_Vec& Vvvv, gp_Vec& Vuuv, gp_Vec& Vuvv) {
0178
0179 ElSLib::CylinderD3 (U, V, C.Position(), C.Radius(), P, Vu, Vv, Vuu, Vvv, Vuv,Vuuu, Vvvv, Vuuv, Vuvv);
0180 }
0181
0182
0183 inline void ElSLib::D3 (const Standard_Real U, const Standard_Real V, const gp_Sphere& S, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv, gp_Vec& Vuu, gp_Vec& Vvv, gp_Vec& Vuv, gp_Vec& Vuuu, gp_Vec& Vvvv, gp_Vec& Vuuv, gp_Vec& Vuvv) {
0184
0185 ElSLib::SphereD3 (U, V, S.Position(), S.Radius(), P, Vu, Vv, Vuu, Vvv, Vuv, Vuuu, Vvvv, Vuuv, Vuvv);
0186 }
0187
0188
0189 inline void ElSLib::D3 (const Standard_Real U, const Standard_Real V, const gp_Torus& T, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv, gp_Vec& Vuu, gp_Vec& Vvv, gp_Vec& Vuv, gp_Vec& Vuuu, gp_Vec& Vvvv, gp_Vec& Vuuv, gp_Vec& Vuvv) {
0190
0191 ElSLib::TorusD3 (U, V, T.Position(), T.MajorRadius(), T.MinorRadius(), P, Vu, Vv, Vuu, Vvv, Vuv, Vuuu, Vvvv, Vuuv, Vuvv);
0192 }
0193
0194
0195
0196
0197 inline void ElSLib::Parameters(const gp_Pln& Pl,
0198 const gp_Pnt& P,
0199 Standard_Real& U,
0200 Standard_Real& V) {
0201
0202 ElSLib::PlaneParameters(Pl.Position(),P,U,V);
0203 }
0204
0205
0206 inline void ElSLib::Parameters(const gp_Cylinder& C,
0207 const gp_Pnt& P,
0208 Standard_Real& U,
0209 Standard_Real& V) {
0210
0211 ElSLib::CylinderParameters(C.Position(),C.Radius(),P,U,V);
0212 }
0213
0214
0215 inline void ElSLib::Parameters(const gp_Cone& C,
0216 const gp_Pnt& P,
0217 Standard_Real& U,
0218 Standard_Real& V) {
0219
0220 ElSLib::ConeParameters(C.Position(),C.RefRadius(),C.SemiAngle(),P,U,V);
0221 }
0222
0223
0224 inline void ElSLib::Parameters(const gp_Sphere& S,
0225 const gp_Pnt& P,
0226 Standard_Real& U,
0227 Standard_Real& V) {
0228
0229 ElSLib::SphereParameters(S.Position(),S.Radius(),P,U,V);
0230 }
0231
0232
0233 inline void ElSLib::Parameters(const gp_Torus& T,
0234 const gp_Pnt& P,
0235 Standard_Real& U,
0236 Standard_Real& V) {
0237
0238 ElSLib::TorusParameters(T.Position(),T.MajorRadius(),T.MinorRadius(),P,U,V);
0239 }
0240
0241