/usr/include/opencascade/ElSLib.hxx is in libopencascade-foundation-dev 6.5.0.dfsg-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 | // This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to
// this header file considered to be the "object code" form of the original source.
#ifndef _ElSLib_HeaderFile
#define _ElSLib_HeaderFile
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _gp_Pnt_HeaderFile
#include <gp_Pnt.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _gp_Vec_HeaderFile
#include <gp_Vec.hxx>
#endif
class gp_Pnt;
class gp_Pln;
class gp_Cone;
class gp_Cylinder;
class gp_Sphere;
class gp_Torus;
class gp_Vec;
class gp_Ax3;
class gp_Lin;
class gp_Circ;
//! Provides functions for basic geometric computation on <br>
//! elementary surfaces. <br>
//! This includes: <br>
//! - calculation of a point or derived vector on a surface <br>
//! where the surface is provided by the gp package, or <br>
//! defined in canonical form (as in the gp package), and <br>
//! the point is defined with a parameter, <br>
//! - evaluation of the parameters corresponding to a <br>
//! point on an elementary surface from gp, <br>
//! - calculation of isoparametric curves on an elementary <br>
//! surface defined in canonical form (as in the gp package). <br>
//! Notes: <br>
//! - ElSLib stands for Elementary Surfaces Library. <br>
//! - If the surfaces provided by the gp package are not <br>
//! explicitly parameterized, they still have an implicit <br>
//! parameterization, similar to that which they infer on <br>
//! the equivalent Geom surfaces. <br>
//! Note: ElSLib stands for Elementary Surfaces Library. <br>
class ElSLib {
public:
void* operator new(size_t,void* anAddress)
{
return anAddress;
}
void* operator new(size_t size)
{
return Standard::Allocate(size);
}
void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
//! For elementary surfaces from the gp package (planes, <br>
//! cones, cylinders, spheres and tori), computes the point <br>
//! of parameters (U, V). <br>
Standard_EXPORT static gp_Pnt Value(const Standard_Real U,const Standard_Real V,const gp_Pln& Pl) ;
static gp_Pnt Value(const Standard_Real U,const Standard_Real V,const gp_Cone& C) ;
static gp_Pnt Value(const Standard_Real U,const Standard_Real V,const gp_Cylinder& C) ;
static gp_Pnt Value(const Standard_Real U,const Standard_Real V,const gp_Sphere& S) ;
static gp_Pnt Value(const Standard_Real U,const Standard_Real V,const gp_Torus& T) ;
//! For elementary surfaces from the gp package (planes, <br>
//! cones, cylinders, spheres and tori), computes the <br>
//! derivative vector of order Nu and Nv in the u and v <br>
//! parametric directions respectively, at the point of <br>
//! parameters (U, V). <br>
Standard_EXPORT static gp_Vec DN(const Standard_Real U,const Standard_Real V,const gp_Pln& Pl,const Standard_Integer Nu,const Standard_Integer Nv) ;
static gp_Vec DN(const Standard_Real U,const Standard_Real V,const gp_Cone& C,const Standard_Integer Nu,const Standard_Integer Nv) ;
static gp_Vec DN(const Standard_Real U,const Standard_Real V,const gp_Cylinder& C,const Standard_Integer Nu,const Standard_Integer Nv) ;
static gp_Vec DN(const Standard_Real U,const Standard_Real V,const gp_Sphere& S,const Standard_Integer Nu,const Standard_Integer Nv) ;
static gp_Vec DN(const Standard_Real U,const Standard_Real V,const gp_Torus& T,const Standard_Integer Nu,const Standard_Integer Nv) ;
//! For elementary surfaces from the gp package (planes, <br>
//! cones, cylinders, spheres and tori), computes the point P <br>
//! of parameters (U, V).inline <br>
Standard_EXPORT static void D0(const Standard_Real U,const Standard_Real V,const gp_Pln& Pl,gp_Pnt& P) ;
static void D0(const Standard_Real U,const Standard_Real V,const gp_Cone& C,gp_Pnt& P) ;
static void D0(const Standard_Real U,const Standard_Real V,const gp_Cylinder& C,gp_Pnt& P) ;
static void D0(const Standard_Real U,const Standard_Real V,const gp_Sphere& S,gp_Pnt& P) ;
static void D0(const Standard_Real U,const Standard_Real V,const gp_Torus& T,gp_Pnt& P) ;
//! For elementary surfaces from the gp package (planes, <br>
//! cones, cylinders, spheres and tori), computes: <br>
//! - the point P of parameters (U, V), and <br>
//! - the first derivative vectors Vu and Vv at this point in <br>
//! the u and v parametric directions respectively. <br>
Standard_EXPORT static void D1(const Standard_Real U,const Standard_Real V,const gp_Pln& Pl,gp_Pnt& P,gp_Vec& Vu,gp_Vec& Vv) ;
static void D1(const Standard_Real U,const Standard_Real V,const gp_Cone& C,gp_Pnt& P,gp_Vec& Vu,gp_Vec& Vv) ;
static void D1(const Standard_Real U,const Standard_Real V,const gp_Cylinder& C,gp_Pnt& P,gp_Vec& Vu,gp_Vec& Vv) ;
static void D1(const Standard_Real U,const Standard_Real V,const gp_Sphere& S,gp_Pnt& P,gp_Vec& Vu,gp_Vec& Vv) ;
static void D1(const Standard_Real U,const Standard_Real V,const gp_Torus& T,gp_Pnt& P,gp_Vec& Vu,gp_Vec& Vv) ;
//! For elementary surfaces from the gp package (cones, <br>
//! cylinders, spheres and tori), computes: <br>
//! - the point P of parameters (U, V), and <br>
//! - the first derivative vectors Vu and Vv at this point in <br>
//! the u and v parametric directions respectively, and <br>
//! - the second derivative vectors Vuu, Vvv and Vuv at this point. <br>
Standard_EXPORT static void 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) ;
static void 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) ;
static void 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) ;
static void 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) ;
//! For elementary surfaces from the gp package (cones, <br>
//! cylinders, spheres and tori), computes: <br>
//! - the point P of parameters (U,V), and <br>
//! - the first derivative vectors Vu and Vv at this point in <br>
//! the u and v parametric directions respectively, and <br>
//! - the second derivative vectors Vuu, Vvv and Vuv at <br>
//! this point, and <br>
//! - the third derivative vectors Vuuu, Vvvv, Vuuv and <br>
//! Vuvv at this point. <br>
Standard_EXPORT static void 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) ;
static void 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) ;
static void 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) ;
//! Surface evaluation <br>
//! The following functions compute the point and the <br>
//! derivatives on elementary surfaces defined with their <br>
//! geometric characterisitics. <br>
//! You don't need to create the surface to use these functions. <br>
//! These functions are called by the previous ones. <br>
//! Example : <br>
//! A cylinder is defined with its position and its radius. <br>
static void 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) ;
Standard_EXPORT static gp_Pnt PlaneValue(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos) ;
Standard_EXPORT static gp_Pnt CylinderValue(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,const Standard_Real Radius) ;
Standard_EXPORT static gp_Pnt ConeValue(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,const Standard_Real Radius,const Standard_Real SAngle) ;
Standard_EXPORT static gp_Pnt SphereValue(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,const Standard_Real Radius) ;
Standard_EXPORT static gp_Pnt TorusValue(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,const Standard_Real MajorRadius,const Standard_Real MinorRadius) ;
Standard_EXPORT static gp_Vec PlaneDN(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,const Standard_Integer Nu,const Standard_Integer Nv) ;
Standard_EXPORT static gp_Vec CylinderDN(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,const Standard_Real Radius,const Standard_Integer Nu,const Standard_Integer Nv) ;
Standard_EXPORT static gp_Vec ConeDN(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,const Standard_Real Radius,const Standard_Real SAngle,const Standard_Integer Nu,const Standard_Integer Nv) ;
Standard_EXPORT static gp_Vec SphereDN(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,const Standard_Real Radius,const Standard_Integer Nu,const Standard_Integer Nv) ;
Standard_EXPORT static gp_Vec TorusDN(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,const Standard_Real MajorRadius,const Standard_Real MinorRadius,const Standard_Integer Nu,const Standard_Integer Nv) ;
Standard_EXPORT static void PlaneD0(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,gp_Pnt& P) ;
Standard_EXPORT static void ConeD0(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,const Standard_Real Radius,const Standard_Real SAngle,gp_Pnt& P) ;
Standard_EXPORT static void CylinderD0(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,const Standard_Real Radius,gp_Pnt& P) ;
Standard_EXPORT static void SphereD0(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,const Standard_Real Radius,gp_Pnt& P) ;
Standard_EXPORT static void TorusD0(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,const Standard_Real MajorRadius,const Standard_Real MinorRadius,gp_Pnt& P) ;
Standard_EXPORT static void PlaneD1(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,gp_Pnt& P,gp_Vec& Vu,gp_Vec& Vv) ;
Standard_EXPORT static void ConeD1(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,const Standard_Real Radius,const Standard_Real SAngle,gp_Pnt& P,gp_Vec& Vu,gp_Vec& Vv) ;
Standard_EXPORT static void CylinderD1(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,const Standard_Real Radius,gp_Pnt& P,gp_Vec& Vu,gp_Vec& Vv) ;
Standard_EXPORT static void SphereD1(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,const Standard_Real Radius,gp_Pnt& P,gp_Vec& Vu,gp_Vec& Vv) ;
Standard_EXPORT static void TorusD1(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,const Standard_Real MajorRadius,const Standard_Real MinorRadius,gp_Pnt& P,gp_Vec& Vu,gp_Vec& Vv) ;
Standard_EXPORT static void ConeD2(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,const Standard_Real Radius,const Standard_Real SAngle,gp_Pnt& P,gp_Vec& Vu,gp_Vec& Vv,gp_Vec& Vuu,gp_Vec& Vvv,gp_Vec& Vuv) ;
Standard_EXPORT static void CylinderD2(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,const Standard_Real Radius,gp_Pnt& P,gp_Vec& Vu,gp_Vec& Vv,gp_Vec& Vuu,gp_Vec& Vvv,gp_Vec& Vuv) ;
Standard_EXPORT static void SphereD2(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,const Standard_Real Radius,gp_Pnt& P,gp_Vec& Vu,gp_Vec& Vv,gp_Vec& Vuu,gp_Vec& Vvv,gp_Vec& Vuv) ;
Standard_EXPORT static void TorusD2(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,const Standard_Real MajorRadius,const Standard_Real MinorRadius,gp_Pnt& P,gp_Vec& Vu,gp_Vec& Vv,gp_Vec& Vuu,gp_Vec& Vvv,gp_Vec& Vuv) ;
Standard_EXPORT static void ConeD3(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,const Standard_Real Radius,const Standard_Real SAngle,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) ;
Standard_EXPORT static void CylinderD3(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,const Standard_Real Radius,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) ;
Standard_EXPORT static void SphereD3(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,const Standard_Real Radius,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) ;
//! The following functions compute the parametric values <br>
//! corresponding to a given point on a elementary surface. <br>
//! The point should be on the surface. <br>
Standard_EXPORT static void TorusD3(const Standard_Real U,const Standard_Real V,const gp_Ax3& Pos,const Standard_Real MajorRadius,const Standard_Real MinorRadius,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) ;
//! parametrization <br>
//! P (U, V) = <br>
//! Pl.Location() + U * Pl.XDirection() + V * Pl.YDirection() <br>
static void Parameters(const gp_Pln& Pl,const gp_Pnt& P,Standard_Real& U,Standard_Real& V) ;
//! parametrization <br>
//! P (U, V) = Location + V * ZDirection + <br>
//! Radius * (Cos(U) * XDirection + Sin (U) * YDirection) <br>
static void Parameters(const gp_Cylinder& C,const gp_Pnt& P,Standard_Real& U,Standard_Real& V) ;
//! parametrization <br>
//! P (U, V) = Location + V * ZDirection + <br>
//! (Radius + V * Tan (SemiAngle)) * <br>
//! (Cos(U) * XDirection + Sin(U) * YDirection) <br>
static void Parameters(const gp_Cone& C,const gp_Pnt& P,Standard_Real& U,Standard_Real& V) ;
//! parametrization <br>
//! P (U, V) = Location + <br>
//! Radius * Cos (V) * (Cos (U) * XDirection + Sin (U) * YDirection) + <br>
//! Radius * Sin (V) * ZDirection <br>
static void Parameters(const gp_Sphere& S,const gp_Pnt& P,Standard_Real& U,Standard_Real& V) ;
//! parametrization <br>
//! P (U, V) = Location + <br>
//! (MajorRadius + MinorRadius * Cos(U)) * <br>
//! (Cos(V) * XDirection - Sin(V) * YDirection) + <br>
//! MinorRadius * Sin(U) * ZDirection <br>
static void Parameters(const gp_Torus& T,const gp_Pnt& P,Standard_Real& U,Standard_Real& V) ;
//! parametrization <br>
//! P (U, V) = <br>
//! Pl.Location() + U * Pl.XDirection() + V * Pl.YDirection() <br>
Standard_EXPORT static void PlaneParameters(const gp_Ax3& Pos,const gp_Pnt& P,Standard_Real& U,Standard_Real& V) ;
//! parametrization <br>
//! P (U, V) = Location + V * ZDirection + <br>
//! Radius * (Cos(U) * XDirection + Sin (U) * YDirection) <br>
Standard_EXPORT static void CylinderParameters(const gp_Ax3& Pos,const Standard_Real Radius,const gp_Pnt& P,Standard_Real& U,Standard_Real& V) ;
//! parametrization <br>
//! P (U, V) = Location + V * ZDirection + <br>
//! (Radius + V * Tan (SemiAngle)) * <br>
//! (Cos(U) * XDirection + Sin(U) * YDirection) <br>
Standard_EXPORT static void ConeParameters(const gp_Ax3& Pos,const Standard_Real Radius,const Standard_Real SAngle,const gp_Pnt& P,Standard_Real& U,Standard_Real& V) ;
//! parametrization <br>
//! P (U, V) = Location + <br>
//! Radius * Cos (V) * (Cos (U) * XDirection + Sin (U) * YDirection) + <br>
//! Radius * Sin (V) * ZDirection <br>
Standard_EXPORT static void SphereParameters(const gp_Ax3& Pos,const Standard_Real Radius,const gp_Pnt& P,Standard_Real& U,Standard_Real& V) ;
//! parametrization <br>
//! P (U, V) = Location + <br>
//! (MajorRadius + MinorRadius * Cos(U)) * <br>
//! (Cos(V) * XDirection - Sin(V) * YDirection) + <br>
//! MinorRadius * Sin(U) * ZDirection <br>
Standard_EXPORT static void TorusParameters(const gp_Ax3& Pos,const Standard_Real MajorRadius,const Standard_Real MinorRadius,const gp_Pnt& P,Standard_Real& U,Standard_Real& V) ;
Standard_EXPORT static gp_Lin PlaneUIso(const gp_Ax3& Pos,const Standard_Real U) ;
Standard_EXPORT static gp_Lin CylinderUIso(const gp_Ax3& Pos,const Standard_Real Radius,const Standard_Real U) ;
Standard_EXPORT static gp_Lin ConeUIso(const gp_Ax3& Pos,const Standard_Real Radius,const Standard_Real SAngle,const Standard_Real U) ;
Standard_EXPORT static gp_Circ SphereUIso(const gp_Ax3& Pos,const Standard_Real Radius,const Standard_Real U) ;
Standard_EXPORT static gp_Circ TorusUIso(const gp_Ax3& Pos,const Standard_Real MajorRadius,const Standard_Real MinorRadius,const Standard_Real U) ;
Standard_EXPORT static gp_Lin PlaneVIso(const gp_Ax3& Pos,const Standard_Real V) ;
Standard_EXPORT static gp_Circ CylinderVIso(const gp_Ax3& Pos,const Standard_Real Radius,const Standard_Real V) ;
Standard_EXPORT static gp_Circ ConeVIso(const gp_Ax3& Pos,const Standard_Real Radius,const Standard_Real SAngle,const Standard_Real V) ;
Standard_EXPORT static gp_Circ SphereVIso(const gp_Ax3& Pos,const Standard_Real Radius,const Standard_Real V) ;
Standard_EXPORT static gp_Circ TorusVIso(const gp_Ax3& Pos,const Standard_Real MajorRadius,const Standard_Real MinorRadius,const Standard_Real V) ;
protected:
private:
};
#include <ElSLib.lxx>
// other Inline functions and methods (like "C++: function call" methods)
#endif
|