mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-09 18:50:54 +03:00
Next generic classes: "Contap_ArcFunction", "Contap_ContourGen", "Contap_HContToolGen", "Contap_HCurve2dToolGen", "Contap_Line", "Contap_Point", "Contap_SurfFunction", "Contap_SurfProps" from "Contap" package were converted to the non-generic classes. Names of several classes were changed: "Contap_Contour", "Contap_HContTool", "Contap_HCurve2dTool", "Contap_Line", "Contap_Point" Also all instantiations of the "internal" classes of this classes were moved to the "Contap.cdl". And sources of the "Contap_ContourGen" class were merged to one .cxx file.
151 lines
5.7 KiB
Plaintext
151 lines
5.7 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 <Adaptor2d_HCurve2d.hxx>
|
|
|
|
#include <GeomAbs_CurveType.hxx>
|
|
#include <GeomAbs_Shape.hxx>
|
|
|
|
#include <gp_Vec2d.hxx>
|
|
#include <gp_Lin2d.hxx>
|
|
#include <gp_Circ2d.hxx>
|
|
#include <gp_Elips2d.hxx>
|
|
#include <gp_Parab2d.hxx>
|
|
#include <gp_Hypr2d.hxx>
|
|
|
|
|
|
#include <Geom2d_BezierCurve.hxx>
|
|
#include <Geom2d_BSplineCurve.hxx>
|
|
|
|
#include <TColStd_Array1OfReal.hxx>
|
|
|
|
//============================================================
|
|
inline Standard_Real Contap_HCurve2dTool::FirstParameter (const Handle(Adaptor2d_HCurve2d)& C) {
|
|
return(C->FirstParameter());
|
|
}
|
|
//============================================================
|
|
inline Standard_Real Contap_HCurve2dTool::LastParameter (const Handle(Adaptor2d_HCurve2d)& C) {
|
|
return(C->LastParameter());
|
|
}
|
|
//============================================================
|
|
inline GeomAbs_Shape Contap_HCurve2dTool::Continuity (const Handle(Adaptor2d_HCurve2d)& C) {
|
|
return(C->Continuity());
|
|
}
|
|
//============================================================
|
|
inline Standard_Integer Contap_HCurve2dTool::NbIntervals(const Handle(Adaptor2d_HCurve2d)& C,const GeomAbs_Shape Sh) {
|
|
return(C->NbIntervals(Sh));
|
|
}
|
|
//============================================================
|
|
inline void Contap_HCurve2dTool::Intervals(const Handle(Adaptor2d_HCurve2d)& C,
|
|
TColStd_Array1OfReal& Tab,
|
|
const GeomAbs_Shape Sh) {
|
|
C->Intervals(Tab,Sh);
|
|
}
|
|
//============================================================
|
|
inline Standard_Boolean Contap_HCurve2dTool::IsClosed(const Handle(Adaptor2d_HCurve2d)& C) {
|
|
return(C->IsClosed());
|
|
}
|
|
//============================================================
|
|
inline Standard_Boolean Contap_HCurve2dTool::IsPeriodic(const Handle(Adaptor2d_HCurve2d)& C) {
|
|
return(C->IsPeriodic());
|
|
}
|
|
//============================================================
|
|
inline Standard_Real Contap_HCurve2dTool::Period(const Handle(Adaptor2d_HCurve2d)& C) {
|
|
return(C->Period());
|
|
}
|
|
//============================================================
|
|
inline gp_Pnt2d Contap_HCurve2dTool::Value (const Handle(Adaptor2d_HCurve2d)& C,
|
|
const Standard_Real U) {
|
|
return(C->Value(U));
|
|
}
|
|
//============================================================
|
|
inline void Contap_HCurve2dTool::D0(const Handle(Adaptor2d_HCurve2d)& C,
|
|
const Standard_Real U,
|
|
gp_Pnt2d& P) {
|
|
C->D0(U,P);
|
|
}
|
|
//============================================================
|
|
inline void Contap_HCurve2dTool::D1 (const Handle(Adaptor2d_HCurve2d)& C,
|
|
const Standard_Real U,
|
|
gp_Pnt2d& P,
|
|
gp_Vec2d& T) {
|
|
C->D1(U,P,T);
|
|
}
|
|
//============================================================
|
|
inline void Contap_HCurve2dTool::D2 (const Handle(Adaptor2d_HCurve2d)& C,
|
|
const Standard_Real U,
|
|
gp_Pnt2d& P,
|
|
gp_Vec2d& T,
|
|
gp_Vec2d& N) {
|
|
|
|
C->D2(U,P,T,N);
|
|
}
|
|
//============================================================
|
|
inline void Contap_HCurve2dTool::D3 (const Handle(Adaptor2d_HCurve2d)& C,
|
|
const Standard_Real U,
|
|
gp_Pnt2d& P,
|
|
gp_Vec2d& V1,
|
|
gp_Vec2d& V2,
|
|
gp_Vec2d& V3) {
|
|
|
|
C->D3(U,P,V1,V2,V3);
|
|
}
|
|
//============================================================
|
|
inline gp_Vec2d Contap_HCurve2dTool::DN (const Handle(Adaptor2d_HCurve2d)& C,
|
|
const Standard_Real U,
|
|
const Standard_Integer N) {
|
|
|
|
return(C->DN(U,N));
|
|
}
|
|
//============================================================
|
|
inline Standard_Real Contap_HCurve2dTool::Resolution(const Handle(Adaptor2d_HCurve2d)& C,
|
|
const Standard_Real R3d) {
|
|
return(C->Resolution(R3d));
|
|
}
|
|
//============================================================
|
|
inline GeomAbs_CurveType Contap_HCurve2dTool::GetType(const Handle(Adaptor2d_HCurve2d)& C) {
|
|
return(C->GetType());
|
|
}
|
|
//============================================================
|
|
inline gp_Lin2d Contap_HCurve2dTool::Line (const Handle(Adaptor2d_HCurve2d)& C) {
|
|
return(C->Line());
|
|
}
|
|
//============================================================
|
|
inline gp_Circ2d Contap_HCurve2dTool::Circle (const Handle(Adaptor2d_HCurve2d)& C) {
|
|
return(C->Circle());
|
|
}
|
|
//============================================================
|
|
inline gp_Elips2d Contap_HCurve2dTool::Ellipse (const Handle(Adaptor2d_HCurve2d)& C) {
|
|
return(C->Ellipse());
|
|
}
|
|
//============================================================
|
|
inline gp_Parab2d Contap_HCurve2dTool::Parabola (const Handle(Adaptor2d_HCurve2d)& C) {
|
|
return(C->Parabola());
|
|
}
|
|
//============================================================
|
|
inline gp_Hypr2d Contap_HCurve2dTool::Hyperbola (const Handle(Adaptor2d_HCurve2d)& C) {
|
|
return(C->Hyperbola());
|
|
}
|
|
//============================================================
|
|
inline Handle(Geom2d_BezierCurve) Contap_HCurve2dTool::Bezier (const Handle(Adaptor2d_HCurve2d)& C) {
|
|
return(C->Bezier());
|
|
}
|
|
//============================================================
|
|
inline Handle(Geom2d_BSplineCurve) Contap_HCurve2dTool::BSpline (const Handle(Adaptor2d_HCurve2d)& C) {
|
|
return(C->BSpline());
|
|
}
|
|
//============================================================
|