Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/opencascade/HLRBRep_BSurfaceTool.lxx is written in an unsupported language. File is not indexed.

0001 // Created by: Laurent BUCHARD
0002 // Copyright (c) 1993-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_Pnt.hxx>
0017 #include <gp_Vec.hxx>
0018 #include <gp_Pln.hxx>
0019 #include <gp_Cylinder.hxx>
0020 #include <gp_Cone.hxx>
0021 #include <gp_Torus.hxx>
0022 #include <gp_Sphere.hxx>
0023 #include <gp_Ax1.hxx>
0024 #include <gp_Dir.hxx>
0025 #include <Geom_BezierSurface.hxx>
0026 #include <Geom_BSplineSurface.hxx>
0027 #include <Adaptor3d_Surface.hxx>
0028 #include <Adaptor3d_Curve.hxx>
0029 #include <BRepAdaptor_Surface.hxx>
0030 
0031 //=======================================================================
0032 // function : FirstUParameter
0033 // purpose  :
0034 //=======================================================================
0035 
0036 inline Standard_Real HLRBRep_BSurfaceTool::FirstUParameter(const BRepAdaptor_Surface& Surf)
0037 {
0038   return Surf.FirstUParameter();
0039 }
0040 
0041 //=======================================================================
0042 // function : FirstVParameter
0043 // purpose  :
0044 //=======================================================================
0045 
0046 inline Standard_Real HLRBRep_BSurfaceTool::FirstVParameter(const BRepAdaptor_Surface& Surf)
0047 {
0048   return Surf.FirstVParameter();
0049 }
0050 
0051 //=======================================================================
0052 // function : LastUParameter
0053 // purpose  :
0054 //=======================================================================
0055 
0056 inline Standard_Real HLRBRep_BSurfaceTool::LastUParameter(const BRepAdaptor_Surface& Surf)
0057 {
0058   return Surf.LastUParameter();
0059 }
0060 
0061 //=======================================================================
0062 // function : LastVParameter
0063 // purpose  :
0064 //=======================================================================
0065 
0066 inline Standard_Real HLRBRep_BSurfaceTool::LastVParameter(const BRepAdaptor_Surface& Surf)
0067 {
0068   return Surf.LastVParameter();
0069 }
0070 
0071 //=======================================================================
0072 // function : NbUIntervals
0073 // purpose  :
0074 //=======================================================================
0075 
0076 inline Standard_Integer HLRBRep_BSurfaceTool::NbUIntervals(const BRepAdaptor_Surface& Surf,
0077                                                            const GeomAbs_Shape        S)
0078 {
0079   return Surf.NbUIntervals(S);
0080 }
0081 
0082 //=======================================================================
0083 // function : NbVIntervals
0084 // purpose  :
0085 //=======================================================================
0086 
0087 inline Standard_Integer HLRBRep_BSurfaceTool::NbVIntervals(const BRepAdaptor_Surface& Surf,
0088                                                            const GeomAbs_Shape        S)
0089 {
0090   return Surf.NbVIntervals(S);
0091 }
0092 
0093 //=======================================================================
0094 // function : UIntervals
0095 // purpose  :
0096 //=======================================================================
0097 
0098 inline void HLRBRep_BSurfaceTool::UIntervals(const BRepAdaptor_Surface& Surf,
0099                                              TColStd_Array1OfReal&      Tab,
0100                                              const GeomAbs_Shape        S)
0101 {
0102   Surf.UIntervals(Tab, S);
0103 }
0104 
0105 //=======================================================================
0106 // function : VIntervals
0107 // purpose  :
0108 //=======================================================================
0109 
0110 inline void HLRBRep_BSurfaceTool::VIntervals(const BRepAdaptor_Surface& Surf,
0111                                              TColStd_Array1OfReal&      Tab,
0112                                              const GeomAbs_Shape        S)
0113 {
0114   Surf.VIntervals(Tab, S);
0115 }
0116 
0117 //=======================================================================
0118 // function : UTrim
0119 // purpose  :
0120 //=======================================================================
0121 
0122 inline Handle(Adaptor3d_Surface) HLRBRep_BSurfaceTool::UTrim(const BRepAdaptor_Surface& Surf,
0123                                                              const Standard_Real        F,
0124                                                              const Standard_Real        L,
0125                                                              const Standard_Real        Tol)
0126 {
0127   return Surf.UTrim(F, L, Tol);
0128 }
0129 
0130 //=======================================================================
0131 // function : VTrim
0132 // purpose  :
0133 //=======================================================================
0134 
0135 inline Handle(Adaptor3d_Surface) HLRBRep_BSurfaceTool::VTrim(const BRepAdaptor_Surface& Surf,
0136                                                              const Standard_Real        F,
0137                                                              const Standard_Real        L,
0138                                                              const Standard_Real        Tol)
0139 {
0140   return Surf.VTrim(F, L, Tol);
0141 }
0142 
0143 //=======================================================================
0144 // function : IsUClosed
0145 // purpose  :
0146 //=======================================================================
0147 
0148 inline Standard_Boolean HLRBRep_BSurfaceTool::IsUClosed(const BRepAdaptor_Surface& S)
0149 {
0150   return S.IsUClosed();
0151 }
0152 
0153 //=======================================================================
0154 // function : IsVClosed
0155 // purpose  :
0156 //=======================================================================
0157 
0158 inline Standard_Boolean HLRBRep_BSurfaceTool::IsVClosed(const BRepAdaptor_Surface& S)
0159 {
0160   return S.IsVClosed();
0161 }
0162 
0163 //=======================================================================
0164 // function : IsUPeriodic
0165 // purpose  :
0166 //=======================================================================
0167 
0168 inline Standard_Boolean HLRBRep_BSurfaceTool::IsUPeriodic(const BRepAdaptor_Surface& S)
0169 {
0170   return S.IsUPeriodic();
0171 }
0172 
0173 //=======================================================================
0174 // function : UPeriod
0175 // purpose  :
0176 //=======================================================================
0177 
0178 inline Standard_Real HLRBRep_BSurfaceTool::UPeriod(const BRepAdaptor_Surface& S)
0179 {
0180   return S.UPeriod();
0181 }
0182 
0183 //=======================================================================
0184 // function : IsVPeriodic
0185 // purpose  :
0186 //=======================================================================
0187 
0188 inline Standard_Boolean HLRBRep_BSurfaceTool::IsVPeriodic(const BRepAdaptor_Surface& S)
0189 {
0190   return S.IsVPeriodic();
0191 }
0192 
0193 //=======================================================================
0194 // function : VPeriod
0195 // purpose  :
0196 //=======================================================================
0197 
0198 inline Standard_Real HLRBRep_BSurfaceTool::VPeriod(const BRepAdaptor_Surface& S)
0199 {
0200   return S.VPeriod();
0201 }
0202 
0203 //=======================================================================
0204 // function : Value
0205 // purpose  :
0206 //=======================================================================
0207 
0208 inline gp_Pnt HLRBRep_BSurfaceTool::Value(const BRepAdaptor_Surface& S,
0209                                           const Standard_Real        U,
0210                                           const Standard_Real        V)
0211 {
0212   return S.Value(U, V);
0213 }
0214 
0215 //=======================================================================
0216 // function : D0
0217 // purpose  :
0218 //=======================================================================
0219 
0220 inline void HLRBRep_BSurfaceTool::D0(const BRepAdaptor_Surface& S,
0221                                      const Standard_Real        U,
0222                                      const Standard_Real        V,
0223                                      gp_Pnt&                    P)
0224 {
0225   S.D0(U, V, P);
0226 }
0227 
0228 //=======================================================================
0229 // function : D1
0230 // purpose  :
0231 //=======================================================================
0232 
0233 inline void HLRBRep_BSurfaceTool::D1(const BRepAdaptor_Surface& S,
0234                                      const Standard_Real        U,
0235                                      const Standard_Real        V,
0236                                      gp_Pnt&                    P,
0237                                      gp_Vec&                    D1U,
0238                                      gp_Vec&                    D1V)
0239 {
0240   S.D1(U, V, P, D1U, D1V);
0241 }
0242 
0243 //=======================================================================
0244 // function : D2
0245 // purpose  :
0246 //=======================================================================
0247 
0248 inline void HLRBRep_BSurfaceTool::D2(const BRepAdaptor_Surface& S,
0249                                      const Standard_Real        U,
0250                                      const Standard_Real        V,
0251                                      gp_Pnt&                    P,
0252                                      gp_Vec&                    D1U,
0253                                      gp_Vec&                    D1V,
0254                                      gp_Vec&                    D2U,
0255                                      gp_Vec&                    D2V,
0256                                      gp_Vec&                    D2UV)
0257 {
0258   S.D2(U, V, P, D1U, D1V, D2U, D2V, D2UV);
0259 }
0260 
0261 //=======================================================================
0262 // function : D3
0263 // purpose  :
0264 //=======================================================================
0265 
0266 inline void HLRBRep_BSurfaceTool::D3(const BRepAdaptor_Surface& S,
0267                                      const Standard_Real        U,
0268                                      const Standard_Real        V,
0269                                      gp_Pnt&                    P,
0270                                      gp_Vec&                    D1U,
0271                                      gp_Vec&                    D1V,
0272                                      gp_Vec&                    D2U,
0273                                      gp_Vec&                    D2V,
0274                                      gp_Vec&                    D2UV,
0275                                      gp_Vec&                    D3U,
0276                                      gp_Vec&                    D3V,
0277                                      gp_Vec&                    D3UUV,
0278                                      gp_Vec&                    D3UVV)
0279 {
0280   S.D3(U, V, P, D1U, D1V, D2U, D2V, D2UV, D3U, D3V, D3UUV, D3UVV);
0281 }
0282 
0283 //=======================================================================
0284 // function : DN
0285 // purpose  :
0286 //=======================================================================
0287 
0288 inline gp_Vec HLRBRep_BSurfaceTool::DN(const BRepAdaptor_Surface& S,
0289                                        const Standard_Real        U,
0290                                        const Standard_Real        V,
0291                                        const Standard_Integer     Nu,
0292                                        const Standard_Integer     Nv)
0293 {
0294   return S.DN(U, V, Nu, Nv);
0295 }
0296 
0297 //=======================================================================
0298 // function : UResolution
0299 // purpose  :
0300 //=======================================================================
0301 
0302 inline Standard_Real HLRBRep_BSurfaceTool::UResolution(const BRepAdaptor_Surface& S,
0303                                                        const Standard_Real        R3d)
0304 {
0305   return S.UResolution(R3d);
0306 }
0307 
0308 //=======================================================================
0309 // function : VResolution
0310 // purpose  :
0311 //=======================================================================
0312 
0313 inline Standard_Real HLRBRep_BSurfaceTool::VResolution(const BRepAdaptor_Surface& S,
0314                                                        const Standard_Real        R3d)
0315 {
0316   return S.VResolution(R3d);
0317 }
0318 
0319 //=======================================================================
0320 // function : GetType
0321 // purpose  :
0322 //=======================================================================
0323 
0324 inline GeomAbs_SurfaceType HLRBRep_BSurfaceTool::GetType(const BRepAdaptor_Surface& S)
0325 {
0326   return S.GetType();
0327 }
0328 
0329 //=======================================================================
0330 // function : Plane
0331 // purpose  :
0332 //=======================================================================
0333 
0334 inline gp_Pln HLRBRep_BSurfaceTool::Plane(const BRepAdaptor_Surface& S)
0335 {
0336   return S.Plane();
0337 }
0338 
0339 //=======================================================================
0340 // function : Cylinder
0341 // purpose  :
0342 //=======================================================================
0343 
0344 inline gp_Cylinder HLRBRep_BSurfaceTool::Cylinder(const BRepAdaptor_Surface& S)
0345 {
0346   return S.Cylinder();
0347 }
0348 
0349 //=======================================================================
0350 // function : Cone
0351 // purpose  :
0352 //=======================================================================
0353 
0354 inline gp_Cone HLRBRep_BSurfaceTool::Cone(const BRepAdaptor_Surface& S)
0355 {
0356   return S.Cone();
0357 }
0358 
0359 //=======================================================================
0360 // function : Sphere
0361 // purpose  :
0362 //=======================================================================
0363 
0364 inline gp_Sphere HLRBRep_BSurfaceTool::Sphere(const BRepAdaptor_Surface& S)
0365 {
0366   return S.Sphere();
0367 }
0368 
0369 //=======================================================================
0370 // function : Torus
0371 // purpose  :
0372 //=======================================================================
0373 
0374 inline gp_Torus HLRBRep_BSurfaceTool::Torus(const BRepAdaptor_Surface& S)
0375 {
0376   return S.Torus();
0377 }
0378 
0379 //=======================================================================
0380 // function : Bezier
0381 // purpose  :
0382 //=======================================================================
0383 
0384 inline Handle(Geom_BezierSurface) HLRBRep_BSurfaceTool::Bezier(const BRepAdaptor_Surface& S)
0385 {
0386   return (S.Bezier());
0387 }
0388 
0389 //=======================================================================
0390 // function : BSpline
0391 // purpose  :
0392 //=======================================================================
0393 
0394 inline Handle(Geom_BSplineSurface) HLRBRep_BSurfaceTool::BSpline(const BRepAdaptor_Surface& S)
0395 {
0396   return (S.BSpline());
0397 }
0398 
0399 //=======================================================================
0400 // function : AxeOfRevolution
0401 // purpose  :
0402 //=======================================================================
0403 
0404 inline gp_Ax1 HLRBRep_BSurfaceTool::AxeOfRevolution(const BRepAdaptor_Surface& S)
0405 {
0406   return (S.AxeOfRevolution());
0407 }
0408 
0409 //=======================================================================
0410 // function : Direction
0411 // purpose  :
0412 //=======================================================================
0413 
0414 inline gp_Dir HLRBRep_BSurfaceTool::Direction(const BRepAdaptor_Surface& S)
0415 {
0416   return (S.Direction());
0417 }
0418 
0419 //=======================================================================
0420 // function : BasisCurve
0421 // purpose  :
0422 //=======================================================================
0423 
0424 inline Handle(Adaptor3d_Curve) HLRBRep_BSurfaceTool::BasisCurve(const BRepAdaptor_Surface& S)
0425 {
0426   return (S.BasisCurve());
0427 }
0428 
0429 //=======================================================================
0430 // function : UContinuity
0431 // purpose  :
0432 //=======================================================================
0433 
0434 inline GeomAbs_Shape HLRBRep_BSurfaceTool::UContinuity(const BRepAdaptor_Surface& S)
0435 {
0436   return (S.UContinuity());
0437 }
0438 
0439 //=======================================================================
0440 // function : VContinuity
0441 // purpose  :
0442 //=======================================================================
0443 
0444 inline GeomAbs_Shape HLRBRep_BSurfaceTool::VContinuity(const BRepAdaptor_Surface& S)
0445 {
0446   return (S.VContinuity());
0447 }
0448 
0449 //=======================================================================
0450 // function : UDegree
0451 // purpose  :
0452 //=======================================================================
0453 
0454 inline Standard_Integer HLRBRep_BSurfaceTool::UDegree(const BRepAdaptor_Surface& S)
0455 {
0456   return (S.UDegree());
0457 }
0458 
0459 //=======================================================================
0460 // function : NbUPoles
0461 // purpose  :
0462 //=======================================================================
0463 
0464 inline Standard_Integer HLRBRep_BSurfaceTool::NbUPoles(const BRepAdaptor_Surface& S)
0465 {
0466   return (S.NbUPoles());
0467 }
0468 
0469 //=======================================================================
0470 // function : NbUKnots
0471 // purpose  :
0472 //=======================================================================
0473 
0474 inline Standard_Integer HLRBRep_BSurfaceTool::NbUKnots(const BRepAdaptor_Surface& S)
0475 {
0476   return (S.NbUKnots());
0477 }
0478 
0479 //=======================================================================
0480 // function : IsURational
0481 // purpose  :
0482 //=======================================================================
0483 
0484 inline Standard_Boolean HLRBRep_BSurfaceTool::IsURational(const BRepAdaptor_Surface& S)
0485 {
0486   return (S.IsURational());
0487 }
0488 
0489 //=======================================================================
0490 // function : VDegree
0491 // purpose  :
0492 //=======================================================================
0493 
0494 inline Standard_Integer HLRBRep_BSurfaceTool::VDegree(const BRepAdaptor_Surface& S)
0495 {
0496   return (S.VDegree());
0497 }
0498 
0499 //=======================================================================
0500 // function : NbVPoles
0501 // purpose  :
0502 //=======================================================================
0503 
0504 inline Standard_Integer HLRBRep_BSurfaceTool::NbVPoles(const BRepAdaptor_Surface& S)
0505 {
0506   return (S.NbVPoles());
0507 }
0508 
0509 //=======================================================================
0510 // function : NbVKnots
0511 // purpose  :
0512 //=======================================================================
0513 
0514 inline Standard_Integer HLRBRep_BSurfaceTool::NbVKnots(const BRepAdaptor_Surface& S)
0515 {
0516   return (S.NbVKnots());
0517 }
0518 
0519 //=======================================================================
0520 // function : IsVRational
0521 // purpose  :
0522 //=======================================================================
0523 
0524 inline Standard_Boolean HLRBRep_BSurfaceTool::IsVRational(const BRepAdaptor_Surface& S)
0525 {
0526   return (S.IsVRational());
0527 }