Warning, /include/opencascade/Contap_HCurve2dTool.lxx is written in an unsupported language. File is not indexed.
0001 // Created on: 1992-10-22
0002 // Created by: Laurent BUCHARD
0003 // Copyright (c) 1992-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016
0017 #include <Adaptor2d_Curve2d.hxx>
0018
0019 #include <GeomAbs_CurveType.hxx>
0020 #include <GeomAbs_Shape.hxx>
0021
0022 #include <gp_Vec2d.hxx>
0023 #include <gp_Lin2d.hxx>
0024 #include <gp_Circ2d.hxx>
0025 #include <gp_Elips2d.hxx>
0026 #include <gp_Parab2d.hxx>
0027 #include <gp_Hypr2d.hxx>
0028
0029 #include <Geom2d_BezierCurve.hxx>
0030 #include <Geom2d_BSplineCurve.hxx>
0031
0032 #include <NCollection_Array1.hxx>
0033
0034 //============================================================
0035 inline double Contap_HCurve2dTool::FirstParameter(const occ::handle<Adaptor2d_Curve2d>& C)
0036 {
0037 return (C->FirstParameter());
0038 }
0039
0040 //============================================================
0041 inline double Contap_HCurve2dTool::LastParameter(const occ::handle<Adaptor2d_Curve2d>& C)
0042 {
0043 return (C->LastParameter());
0044 }
0045
0046 //============================================================
0047 inline GeomAbs_Shape Contap_HCurve2dTool::Continuity(const occ::handle<Adaptor2d_Curve2d>& C)
0048 {
0049 return (C->Continuity());
0050 }
0051
0052 //============================================================
0053 inline int Contap_HCurve2dTool::NbIntervals(const occ::handle<Adaptor2d_Curve2d>& C,
0054 const GeomAbs_Shape Sh)
0055 {
0056 return (C->NbIntervals(Sh));
0057 }
0058
0059 //============================================================
0060 inline void Contap_HCurve2dTool::Intervals(const occ::handle<Adaptor2d_Curve2d>& C,
0061 NCollection_Array1<double>& Tab,
0062 const GeomAbs_Shape Sh)
0063 {
0064 C->Intervals(Tab, Sh);
0065 }
0066
0067 //============================================================
0068 inline bool Contap_HCurve2dTool::IsClosed(const occ::handle<Adaptor2d_Curve2d>& C)
0069 {
0070 return (C->IsClosed());
0071 }
0072
0073 //============================================================
0074 inline bool Contap_HCurve2dTool::IsPeriodic(const occ::handle<Adaptor2d_Curve2d>& C)
0075 {
0076 return (C->IsPeriodic());
0077 }
0078
0079 //============================================================
0080 inline double Contap_HCurve2dTool::Period(const occ::handle<Adaptor2d_Curve2d>& C)
0081 {
0082 return (C->Period());
0083 }
0084
0085 //============================================================
0086 inline gp_Pnt2d Contap_HCurve2dTool::Value(const occ::handle<Adaptor2d_Curve2d>& C, const double U)
0087 {
0088 return (C->Value(U));
0089 }
0090
0091 //============================================================
0092 inline void Contap_HCurve2dTool::D0(const occ::handle<Adaptor2d_Curve2d>& C,
0093 const double U,
0094 gp_Pnt2d& P)
0095 {
0096 C->D0(U, P);
0097 }
0098
0099 //============================================================
0100 inline void Contap_HCurve2dTool::D1(const occ::handle<Adaptor2d_Curve2d>& C,
0101 const double U,
0102 gp_Pnt2d& P,
0103 gp_Vec2d& T)
0104 {
0105 C->D1(U, P, T);
0106 }
0107
0108 //============================================================
0109 inline void Contap_HCurve2dTool::D2(const occ::handle<Adaptor2d_Curve2d>& C,
0110 const double U,
0111 gp_Pnt2d& P,
0112 gp_Vec2d& T,
0113 gp_Vec2d& N)
0114 {
0115
0116 C->D2(U, P, T, N);
0117 }
0118
0119 //============================================================
0120 inline void Contap_HCurve2dTool::D3(const occ::handle<Adaptor2d_Curve2d>& C,
0121 const double U,
0122 gp_Pnt2d& P,
0123 gp_Vec2d& V1,
0124 gp_Vec2d& V2,
0125 gp_Vec2d& V3)
0126 {
0127
0128 C->D3(U, P, V1, V2, V3);
0129 }
0130
0131 //============================================================
0132 inline gp_Vec2d Contap_HCurve2dTool::DN(const occ::handle<Adaptor2d_Curve2d>& C,
0133 const double U,
0134 const int N)
0135 {
0136
0137 return (C->DN(U, N));
0138 }
0139
0140 //============================================================
0141 inline double Contap_HCurve2dTool::Resolution(const occ::handle<Adaptor2d_Curve2d>& C,
0142 const double R3d)
0143 {
0144 return (C->Resolution(R3d));
0145 }
0146
0147 //============================================================
0148 inline GeomAbs_CurveType Contap_HCurve2dTool::GetType(const occ::handle<Adaptor2d_Curve2d>& C)
0149 {
0150 return (C->GetType());
0151 }
0152
0153 //============================================================
0154 inline gp_Lin2d Contap_HCurve2dTool::Line(const occ::handle<Adaptor2d_Curve2d>& C)
0155 {
0156 return (C->Line());
0157 }
0158
0159 //============================================================
0160 inline gp_Circ2d Contap_HCurve2dTool::Circle(const occ::handle<Adaptor2d_Curve2d>& C)
0161 {
0162 return (C->Circle());
0163 }
0164
0165 //============================================================
0166 inline gp_Elips2d Contap_HCurve2dTool::Ellipse(const occ::handle<Adaptor2d_Curve2d>& C)
0167 {
0168 return (C->Ellipse());
0169 }
0170
0171 //============================================================
0172 inline gp_Parab2d Contap_HCurve2dTool::Parabola(const occ::handle<Adaptor2d_Curve2d>& C)
0173 {
0174 return (C->Parabola());
0175 }
0176
0177 //============================================================
0178 inline gp_Hypr2d Contap_HCurve2dTool::Hyperbola(const occ::handle<Adaptor2d_Curve2d>& C)
0179 {
0180 return (C->Hyperbola());
0181 }
0182
0183 //============================================================
0184 inline occ::handle<Geom2d_BezierCurve> Contap_HCurve2dTool::Bezier(
0185 const occ::handle<Adaptor2d_Curve2d>& C)
0186 {
0187 return (C->Bezier());
0188 }
0189
0190 //============================================================
0191 inline occ::handle<Geom2d_BSplineCurve> Contap_HCurve2dTool::BSpline(
0192 const occ::handle<Adaptor2d_Curve2d>& C)
0193 {
0194 return (C->BSpline());
0195 }
0196
0197 //============================================================