1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-16 10:08:36 +03:00
occt/src/Geom2dInt/Geom2dInt_Geom2dCurveTool.lxx
dln 47cbf13472 0024727: Convertation of the generic classes to the non-generic. Part 3
1) Generic class "Intf_InterferencePolyhedron" from "Intf" package converted to the non-generic class and moved to the "IntPatch" package. Name of this class was changed to "IntPatch_InterferencePolyhedron".

2) Generic class "MoniTool_Elem" from "MoniTool" package converted to the non-generic class "MoniTool_TransientElem".

3) Generic class "IntWalk_PWalking" from "IntWalk" package converted to the non-generic class. And internal class "TheInt2S" of "IntWalk_PWalking" moved from IntWalk_PWalking.cdl to IntWalk.cdl for correct building. Also several "*.cxx" files of this class merged to one ".cxx".

4) Generic class "Transfer_SimpleBinder" from "Transfer" package converted to the non-generic class and moved to the "TransferBRep" package. Name of this class was changed to "TransferBRep_BinderOfShape".

5) Generic class "Geom2dInt_CurveTool" from "Geom2dInt" package converted to the non-generic class "Geom2dInt_Geom2dCurveTool".

6) Generic class "MAT2d_BisectingLocus" from "MAT2d" package converted to the non-generic class and moved to the "BRepMAT2d" package. Name of this class was changed to "BRepMAT2d_BisectingLocus".

7) Generic class "MAT_Mat" from "MAT" package converted to the non-generic class and moved to the "MAT2d" package. Name of this class was changed to "MAT2d_Mat2d".
2014-03-20 14:14:41 +04:00

153 lines
5.3 KiB
Plaintext

// Created on: 1992-10-22
// Created by: Laurent BUCHARD
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomAbs_CurveType.hxx>
#include <GeomAbs_Shape.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Elips2d.hxx>
#include <gp_Parab2d.hxx>
#include <gp_Hypr2d.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Adaptor2d_Curve2d.hxx>
#define IS_C2_COMPOSITE 0
//============================================================
inline GeomAbs_CurveType Geom2dInt_Geom2dCurveTool::GetType(const Adaptor2d_Curve2d& C) {
return(C.GetType());
}
//============================================================
inline gp_Lin2d Geom2dInt_Geom2dCurveTool::Line (const Adaptor2d_Curve2d& C) {
return(C.Line());
}
//============================================================
inline gp_Circ2d Geom2dInt_Geom2dCurveTool::Circle (const Adaptor2d_Curve2d& C) {
return(C.Circle());
}
//============================================================
inline gp_Elips2d Geom2dInt_Geom2dCurveTool::Ellipse (const Adaptor2d_Curve2d& C) {
return(C.Ellipse());
}
//============================================================
inline gp_Parab2d Geom2dInt_Geom2dCurveTool::Parabola (const Adaptor2d_Curve2d& C) {
return(C.Parabola());
}
//============================================================
inline gp_Hypr2d Geom2dInt_Geom2dCurveTool::Hyperbola (const Adaptor2d_Curve2d& C) {
return(C.Hyperbola());
}
//============================================================
inline gp_Pnt2d Geom2dInt_Geom2dCurveTool::Value (const Adaptor2d_Curve2d& C,
const Standard_Real U) {
return(C.Value(U));
}
//============================================================
inline void Geom2dInt_Geom2dCurveTool::D0(const Adaptor2d_Curve2d& C,
const Standard_Real U,
gp_Pnt2d& P) {
C.D0(U,P);
}
//============================================================
inline void Geom2dInt_Geom2dCurveTool::D1 (const Adaptor2d_Curve2d& C,
const Standard_Real U,
gp_Pnt2d& P,
gp_Vec2d& T) {
C.D1(U,P,T);
}
//============================================================
inline void Geom2dInt_Geom2dCurveTool::D2 (const Adaptor2d_Curve2d& C,
const Standard_Real U,
gp_Pnt2d& P,
gp_Vec2d& T,
gp_Vec2d& N) {
C.D2(U,P,T,N);
}
//============================================================
inline void Geom2dInt_Geom2dCurveTool::D3 (const Adaptor2d_Curve2d& C,
const Standard_Real U,
gp_Pnt2d& P,
gp_Vec2d& T,
gp_Vec2d& N,
gp_Vec2d& V) {
C.D3(U,P,T,N,V);
}
//============================================================
inline gp_Vec2d Geom2dInt_Geom2dCurveTool::DN(const Adaptor2d_Curve2d& C,
const Standard_Real U,
const Standard_Integer N)
{
return C.DN(U,N);
}
//============================================================
inline Standard_Real Geom2dInt_Geom2dCurveTool::FirstParameter (const Adaptor2d_Curve2d& C) {
return(C.FirstParameter());
}
//============================================================
inline Standard_Real Geom2dInt_Geom2dCurveTool::LastParameter (const Adaptor2d_Curve2d& C) {
return(C.LastParameter());
}
//============================================================
//== tolerance used by mathemetical algorithms
//==
inline Standard_Real Geom2dInt_Geom2dCurveTool::EpsX (const Adaptor2d_Curve2d& ) {
return(1.0e-10);
}
//------------------------------------------------------------
inline Standard_Real Geom2dInt_Geom2dCurveTool::EpsX (const Adaptor2d_Curve2d& C,const Standard_Real Eps_XYZ) {
return(C.Resolution(Eps_XYZ));
}
//============================================================
inline void Geom2dInt_Geom2dCurveTool::Intervals(const Adaptor2d_Curve2d& C,
TColStd_Array1OfReal& Tab) {
#if IS_C2_COMPOSITE
C.Intervals(Tab,GeomAbs_C2);
#else
C.Intervals(Tab,GeomAbs_C1);
#endif
}
//============================================================
//inline void Geom2dInt_Geom2dCurveTool::GetInterval(const Adaptor2d_Curve2d& C,
inline void Geom2dInt_Geom2dCurveTool::GetInterval(const Adaptor2d_Curve2d& ,
const Standard_Integer i,
const TColStd_Array1OfReal& Tab,
Standard_Real& a,
Standard_Real& b) {
a = Tab.Value(i);
b = Tab.Value(i+1);
}
//============================================================
inline Standard_Integer Geom2dInt_Geom2dCurveTool::NbIntervals(const Adaptor2d_Curve2d& C) {
Standard_Integer N=1;
#if IS_C2_COMPOSITE
N = C.NbIntervals(GeomAbs_C2);
#else
N = C.NbIntervals(GeomAbs_C1);
#endif
return(N);
}
//============================================================
inline Standard_Integer Geom2dInt_Geom2dCurveTool::Degree(const Adaptor2d_Curve2d& C)
{
return C.Degree();
}