1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0024002: Overall code and build procedure refactoring -- automatic

Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl":
- WOK-generated header files from inc and sources from drv are moved to src
- CDL files removed
- All packages are converted to nocdlpack
This commit is contained in:
abv
2015-07-12 07:42:38 +03:00
parent 543a996496
commit 42cf5bc1ca
15354 changed files with 623957 additions and 509844 deletions

9
src/Geom2dAdaptor/FILES Normal file
View File

@@ -0,0 +1,9 @@
Geom2dAdaptor.cxx
Geom2dAdaptor.hxx
Geom2dAdaptor_Curve.cxx
Geom2dAdaptor_Curve.hxx
Geom2dAdaptor_Curve.lxx
Geom2dAdaptor_GHCurve.hxx
Geom2dAdaptor_GHCurve_0.cxx
Geom2dAdaptor_HCurve.cxx
Geom2dAdaptor_HCurve.hxx

View File

@@ -1,58 +0,0 @@
-- Created on: 1993-06-03
-- Created by: Bruno DUMORTIER
-- Copyright (c) 1993-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.
package Geom2dAdaptor
---Purpose: this package contains the geometric definition of
-- 2d curves compatible with the Adaptor package
-- templates.
uses
Geom2d,
GeomAbs,
Adaptor2d,
gp,
Standard,
TColStd,
TColgp,
BSplCLib
is
class Curve;
private class GHCurve instantiates GenHCurve2d from Adaptor2d
(Curve from Geom2dAdaptor);
class HCurve;
---Purpose: Inherited from GHCurve. Provides a curve
-- handled by reference.
--
-- Package methods
--
MakeCurve(HC : Curve2d from Adaptor2d) returns Curve from Geom2d
---Purpose: Creates a 2d curve from a HCurve2d. This
-- cannot process the OtherCurves.
raises
DomainError from Standard; -- if GeomAbs_OtherCurve
end Geom2dAdaptor;

View File

@@ -14,29 +14,28 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dAdaptor.ixx>
#include <Geom2d_Line.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2d_Ellipse.hxx>
#include <Geom2d_Parabola.hxx>
#include <Geom2d_Hyperbola.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Geom2d_BezierCurve.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2d_Ellipse.hxx>
#include <Geom2d_Hyperbola.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_Parabola.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <gp_Lin2d.hxx>
#include <Geom2dAdaptor.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Elips2d.hxx>
#include <gp_Parab2d.hxx>
#include <gp_Hypr2d.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Parab2d.hxx>
//=======================================================================
//function : MakeCurve
//purpose :
//=======================================================================
Handle(Geom2d_Curve) Geom2dAdaptor::MakeCurve
(const Adaptor2d_Curve2d& HC)
{

View File

@@ -0,0 +1,73 @@
// Created on: 1993-06-03
// Created by: Bruno DUMORTIER
// Copyright (c) 1993-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.
#ifndef _Geom2dAdaptor_HeaderFile
#define _Geom2dAdaptor_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
class Geom2d_Curve;
class Adaptor2d_Curve2d;
class Geom2dAdaptor_Curve;
class Geom2dAdaptor_GHCurve;
class Geom2dAdaptor_HCurve;
//! this package contains the geometric definition of
//! 2d curves compatible with the Adaptor package
//! templates.
class Geom2dAdaptor
{
public:
DEFINE_STANDARD_ALLOC
//! Inherited from GHCurve. Provides a curve
//! handled by reference.
//! Creates a 2d curve from a HCurve2d. This
//! cannot process the OtherCurves.
Standard_EXPORT static Handle(Geom2d_Curve) MakeCurve (const Adaptor2d_Curve2d& HC);
protected:
private:
friend class Geom2dAdaptor_Curve;
friend class Geom2dAdaptor_GHCurve;
friend class Geom2dAdaptor_HCurve;
};
#endif // _Geom2dAdaptor_HeaderFile

View File

@@ -1,320 +0,0 @@
-- Created on: 1993-06-03
-- Created by: Bruno DUMORTIER
-- Copyright (c) 1993-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.
class Curve from Geom2dAdaptor inherits Curve2d from Adaptor2d
---Purpose: An interface between the services provided by any
-- curve from the package Geom2d and those required
-- of the curve by algorithms which use it.
uses Vec2d from gp,
Pnt2d from gp,
Circ2d from gp,
Elips2d from gp,
Hypr2d from gp,
Parab2d from gp,
Lin2d from gp,
Array1OfReal from TColStd,
Curve from Geom2d,
BezierCurve from Geom2d,
BSplineCurve from Geom2d,
CurveType from GeomAbs,
Shape from GeomAbs,
HCurve2d from Adaptor2d,
Cache from BSplCLib
raises NoSuchObject from Standard,
ConstructionError from Standard,
OutOfRange from Standard,
DomainError from Standard
is
Create returns Curve from Geom2dAdaptor;
Create(C : Curve from Geom2d) returns Curve from Geom2dAdaptor;
Create(C : Curve from Geom2d; UFirst,ULast : Real)
returns Curve from Geom2dAdaptor
raises
ConstructionError from Standard;
---Purpose: ConstructionError is raised if Ufirst>Ulast
Load(me : in out; C : Curve from Geom2d);
---C++: inline
Load(me : in out; C : Curve from Geom2d; UFirst,ULast : Real)
raises
ConstructionError from Standard;
---C++: inline
---Purpose: ConstructionError is raised if Ufirst>Ulast
Curve(me) returns Curve from Geom2d
---C++: return const&
---C++: inline
is static;
FirstParameter(me) returns Real
---C++: inline
is redefined static;
LastParameter(me) returns Real
---C++: inline
is redefined static;
Continuity(me) returns Shape from GeomAbs
is redefined static;
NbIntervals(me; S : Shape from GeomAbs) returns Integer
---Purpose: If necessary, breaks the curve in intervals of
-- continuity <S>. And returns the number of
-- intervals.
is redefined static;
Intervals(me; T : in out Array1OfReal from TColStd;
S : Shape from GeomAbs)
---Purpose: Stores in <T> the parameters bounding the intervals
-- of continuity <S>.
--
-- The array must provide enough room to accomodate
-- for the parameters. i.e. T.Length() > NbIntervals()
raises
OutOfRange from Standard
is redefined static;
Trim(me; First, Last, Tol : Real) returns HCurve2d from Adaptor2d
---Purpose: Returns a curve equivalent of <me> between
-- parameters <First> and <Last>. <Tol> is used to
-- test for 3d points confusion.
raises
OutOfRange from Standard
---Purpose: If <First> >= <Last>
is redefined static;
IsClosed(me) returns Boolean
is redefined static;
IsPeriodic(me) returns Boolean
is redefined static;
Period(me) returns Real
raises
DomainError from Standard -- if the curve is not periodic
is redefined static;
Value(me; U : Real) returns Pnt2d from gp
--- Purpose : Computes the point of parameter U on the curve
is redefined static;
ValueBSpline(me; U: Real) returns Pnt2d from gp
--- Purpose : Computes the point of parameter U on the B-spline curve
is private;
ValueOffset(me; U: Real) returns Pnt2d from gp
--- Purpose : Computes the point of parameter U on the offset curve
is private;
D0 (me; U : Real; P : out Pnt2d from gp)
--- Purpose : Computes the point of parameter U.
is redefined static;
D0BSpline(me; theU : Real; theP : out Pnt2d from gp)
--- Purpose : Computes the point of parameter U on the B-spline curve
is private;
D0Offset(me; theU : Real; theP : out Pnt2d from gp)
--- Purpose : Computes the point of parameter U on the offset curve
is private;
D1 (me; U : Real; P : out Pnt2d from gp ; V : out Vec2d from gp)
--- Purpose : Computes the point of parameter U on the curve with its
-- first derivative.
raises
DomainError from Standard
--- Purpose : Raised if the continuity of the current interval
-- is not C1.
is redefined static;
D1BSpline(me; theU : Real; theP : out Pnt2d from gp ; theV : out Vec2d from gp)
--- Purpose : Computes the point of parameter U on the B-spline curve
-- and its derivative
is private;
D1Offset(me; theU : Real; theP : out Pnt2d from gp ; theV : out Vec2d from gp)
--- Purpose : Computes the point of parameter U on the offset curve
-- and its derivative
is private;
D2 (me; U : Real; P : out Pnt2d from gp; V1, V2 : out Vec2d from gp)
--- Purpose :
-- Returns the point P of parameter U, the first and second
-- derivatives V1 and V2.
raises
DomainError from Standard
--- Purpose : Raised if the continuity of the current interval
-- is not C2.
is redefined static;
D2BSpline(me; theU : Real; theP : out Pnt2d from gp; theV1, theV2 : out Vec2d from gp)
--- Purpose : Computes the point of parameter U on the B-spline curve
-- and its first and second derivatives
is private;
D2Offset(me; theU : Real; theP : out Pnt2d from gp; theV1, theV2 : out Vec2d from gp)
--- Purpose : Computes the point of parameter U on the offset curve
-- and its first and second derivatives
is private;
D3 (me; U : Real; P : out Pnt2d from gp; V1, V2, V3 : out Vec2d from gp)
--- Purpose :
-- Returns the point P of parameter U, the first, the second
-- and the third derivative.
raises
DomainError from Standard
--- Purpose : Raised if the continuity of the current interval
-- is not C3.
is redefined static;
D3BSpline(me; theU : Real; theP : out Pnt2d from gp; theV1, theV2, theV3 : out Vec2d from gp)
--- Purpose : Computes the point of parameter U on the B-spline curve
-- and its first, second and third derivatives
is private;
D3Offset(me; theU : Real; theP : out Pnt2d from gp; theV1, theV2, theV3 : out Vec2d from gp)
--- Purpose : Computes the point of parameter U on the offset curve
-- and its first, second and third derivatives
is private;
DN (me; U : Real; N : Integer) returns Vec2d from gp
--- Purpose :
-- The returned vector gives the value of the derivative for the
-- order of derivation N.
raises
DomainError from Standard,
--- Purpose : Raised if the continuity of the current interval
-- is not CN.
OutOfRange from Standard
--- Purpose : Raised if N < 1.
is redefined static;
DNBSpline(me; theU : Real; N : Integer) returns Vec2d from gp
--- Purpose :
-- The returned vector gives the value of the derivative for the
-- order of derivation N.
is private;
DNOffset(me; theU : Real; N : Integer) returns Vec2d from gp
--- Purpose :
-- The returned vector gives the value of the derivative for the
-- order of derivation N.
is private;
Resolution(me; Ruv :Real) returns Real
---Purpose : returns the parametric resolution
is redefined static;
GetType(me) returns CurveType from GeomAbs
---C++: inline
is redefined static;
Line(me) returns Lin2d from gp
raises
NoSuchObject from Standard
is redefined static;
Circle(me) returns Circ2d from gp
raises
NoSuchObject from Standard
is redefined static;
Ellipse(me) returns Elips2d from gp
raises
NoSuchObject from Standard
is redefined static;
Hyperbola(me) returns Hypr2d from gp
raises
NoSuchObject from Standard
is redefined static;
Parabola(me) returns Parab2d from gp
raises
NoSuchObject from Standard
is redefined static;
Degree(me) returns Integer
raises
NoSuchObject from Standard
is redefined static;
IsRational(me) returns Boolean
raises
NoSuchObject from Standard
is redefined static;
NbPoles(me) returns Integer
raises
NoSuchObject from Standard
is redefined static;
NbKnots(me) returns Integer
raises
NoSuchObject from Standard
is redefined static;
NbSamples(me) returns Integer from Standard is redefined;
Bezier(me) returns BezierCurve from Geom2d
raises
NoSuchObject from Standard
is redefined static;
BSpline(me) returns BSplineCurve from Geom2d
raises
NoSuchObject from Standard
is redefined static;
LocalContinuity(me; U1, U2 : Real) returns Shape from GeomAbs
is static private;
load(me : in out; C : Curve from Geom2d; UFirst,ULast : Real)
is private;
RebuildCache(me; theParameter : Real)
---Purpose: Rebuilds B-spline cache
-- \param theParameter the value on the knot axis which identifies the caching span
is static private;
fields
myCurve : Curve from Geom2d ;
myTypeCurve : CurveType from GeomAbs ;
myFirst : Real from Standard ;
myLast : Real from Standard;
myCurveCache : Cache from BSplCLib;
myOffsetBaseCurveAdaptor : HCurve2d from Adaptor2d;
end Curve;

View File

@@ -21,38 +21,47 @@
#define No_Standard_RangeError
#define No_Standard_OutOfRange
#include <Geom2dAdaptor_Curve.ixx>
#include <Geom2d_OffsetCurve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Adaptor2d_HCurve2d.hxx>
#include <BSplCLib.hxx>
#include <BSplCLib_Cache.hxx>
#include <GeomAbs_Shape.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <Precision.hxx>
#include <gp.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <CSLib_Offset.hxx>
#include <Geom2d_BezierCurve.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2d_Ellipse.hxx>
#include <Geom2d_Parabola.hxx>
#include <Geom2d_Hyperbola.hxx>
#include <Geom2d_UndefinedValue.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_OffsetCurve.hxx>
#include <Geom2d_Parabola.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <Geom2d_UndefinedDerivative.hxx>
#include <CSLib_Offset.hxx>
//#include <Geom2dConvert_BSplineCurveKnotSplitting.hxx>
#include <Standard_OutOfRange.hxx>
#include <Geom2d_UndefinedValue.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <GeomAbs_Shape.hxx>
#include <gp.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Elips2d.hxx>
#include <gp_Hypr2d.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Parab2d.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec2d.hxx>
#include <Precision.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_NullObject.hxx>
#include <Standard_NotImplemented.hxx>
#include <Standard_NullObject.hxx>
#include <Standard_OutOfRange.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_HArray1OfInteger.hxx>
//#include <Geom2dConvert_BSplineCurveKnotSplitting.hxx>
#define myBspl Handle(Geom2d_BSplineCurve)::DownCast (myCurve)
#define PosTol Precision::PConfusion()/2

View File

@@ -0,0 +1,250 @@
// Created on: 1993-06-03
// Created by: Bruno DUMORTIER
// Copyright (c) 1993-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.
#ifndef _Geom2dAdaptor_Curve_HeaderFile
#define _Geom2dAdaptor_Curve_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GeomAbs_CurveType.hxx>
#include <Standard_Real.hxx>
#include <BSplCLib_Cache.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <GeomAbs_Shape.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_Boolean.hxx>
class Geom2d_Curve;
class Adaptor2d_HCurve2d;
class Standard_NoSuchObject;
class Standard_ConstructionError;
class Standard_OutOfRange;
class Standard_DomainError;
class gp_Pnt2d;
class gp_Vec2d;
class gp_Lin2d;
class gp_Circ2d;
class gp_Elips2d;
class gp_Hypr2d;
class gp_Parab2d;
class Geom2d_BezierCurve;
class Geom2d_BSplineCurve;
//! An interface between the services provided by any
//! curve from the package Geom2d and those required
//! of the curve by algorithms which use it.
class Geom2dAdaptor_Curve : public Adaptor2d_Curve2d
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT Geom2dAdaptor_Curve();
Standard_EXPORT Geom2dAdaptor_Curve(const Handle(Geom2d_Curve)& C);
//! ConstructionError is raised if Ufirst>Ulast
Standard_EXPORT Geom2dAdaptor_Curve(const Handle(Geom2d_Curve)& C, const Standard_Real UFirst, const Standard_Real ULast);
void Load (const Handle(Geom2d_Curve)& C);
//! ConstructionError is raised if Ufirst>Ulast
void Load (const Handle(Geom2d_Curve)& C, const Standard_Real UFirst, const Standard_Real ULast);
const Handle(Geom2d_Curve)& Curve() const;
Standard_Real FirstParameter() const Standard_OVERRIDE;
Standard_Real LastParameter() const Standard_OVERRIDE;
Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE;
//! If necessary, breaks the curve in intervals of
//! continuity <S>. And returns the number of
//! intervals.
Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Stores in <T> the parameters bounding the intervals
//! of continuity <S>.
//!
//! The array must provide enough room to accomodate
//! for the parameters. i.e. T.Length() > NbIntervals()
Standard_EXPORT void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Returns a curve equivalent of <me> between
//! parameters <First> and <Last>. <Tol> is used to
//! test for 3d points confusion.
//! If <First> >= <Last>
Standard_EXPORT Handle(Adaptor2d_HCurve2d) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE;
Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE;
Standard_EXPORT Standard_Real Period() const Standard_OVERRIDE;
//! Computes the point of parameter U on the curve
Standard_EXPORT gp_Pnt2d Value (const Standard_Real U) const Standard_OVERRIDE;
//! Computes the point of parameter U.
Standard_EXPORT void D0 (const Standard_Real U, gp_Pnt2d& P) const Standard_OVERRIDE;
//! Computes the point of parameter U on the curve with its
//! first derivative.
//! Raised if the continuity of the current interval
//! is not C1.
Standard_EXPORT void D1 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V) const Standard_OVERRIDE;
//! Returns the point P of parameter U, the first and second
//! derivatives V1 and V2.
//! Raised if the continuity of the current interval
//! is not C2.
Standard_EXPORT void D2 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const Standard_OVERRIDE;
//! Returns the point P of parameter U, the first, the second
//! and the third derivative.
//! Raised if the continuity of the current interval
//! is not C3.
Standard_EXPORT void D3 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3) const Standard_OVERRIDE;
//! The returned vector gives the value of the derivative for the
//! order of derivation N.
//! Raised if the continuity of the current interval
//! is not CN.
//! Raised if N < 1.
Standard_EXPORT gp_Vec2d DN (const Standard_Real U, const Standard_Integer N) const Standard_OVERRIDE;
//! returns the parametric resolution
Standard_EXPORT Standard_Real Resolution (const Standard_Real Ruv) const Standard_OVERRIDE;
GeomAbs_CurveType GetType() const Standard_OVERRIDE;
Standard_EXPORT gp_Lin2d Line() const Standard_OVERRIDE;
Standard_EXPORT gp_Circ2d Circle() const Standard_OVERRIDE;
Standard_EXPORT gp_Elips2d Ellipse() const Standard_OVERRIDE;
Standard_EXPORT gp_Hypr2d Hyperbola() const Standard_OVERRIDE;
Standard_EXPORT gp_Parab2d Parabola() const Standard_OVERRIDE;
Standard_EXPORT Standard_Integer Degree() const Standard_OVERRIDE;
Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE;
Standard_EXPORT Standard_Integer NbPoles() const Standard_OVERRIDE;
Standard_EXPORT Standard_Integer NbKnots() const Standard_OVERRIDE;
Standard_EXPORT virtual Standard_Integer NbSamples() const Standard_OVERRIDE;
Standard_EXPORT Handle(Geom2d_BezierCurve) Bezier() const Standard_OVERRIDE;
Standard_EXPORT Handle(Geom2d_BSplineCurve) BSpline() const Standard_OVERRIDE;
protected:
private:
//! Computes the point of parameter U on the B-spline curve
Standard_EXPORT gp_Pnt2d ValueBSpline (const Standard_Real U) const;
//! Computes the point of parameter U on the offset curve
Standard_EXPORT gp_Pnt2d ValueOffset (const Standard_Real U) const;
//! Computes the point of parameter U on the B-spline curve
Standard_EXPORT void D0BSpline (const Standard_Real theU, gp_Pnt2d& theP) const;
//! Computes the point of parameter U on the offset curve
Standard_EXPORT void D0Offset (const Standard_Real theU, gp_Pnt2d& theP) const;
//! Computes the point of parameter U on the B-spline curve
//! and its derivative
Standard_EXPORT void D1BSpline (const Standard_Real theU, gp_Pnt2d& theP, gp_Vec2d& theV) const;
//! Computes the point of parameter U on the offset curve
//! and its derivative
Standard_EXPORT void D1Offset (const Standard_Real theU, gp_Pnt2d& theP, gp_Vec2d& theV) const;
//! Computes the point of parameter U on the B-spline curve
//! and its first and second derivatives
Standard_EXPORT void D2BSpline (const Standard_Real theU, gp_Pnt2d& theP, gp_Vec2d& theV1, gp_Vec2d& theV2) const;
//! Computes the point of parameter U on the offset curve
//! and its first and second derivatives
Standard_EXPORT void D2Offset (const Standard_Real theU, gp_Pnt2d& theP, gp_Vec2d& theV1, gp_Vec2d& theV2) const;
//! Computes the point of parameter U on the B-spline curve
//! and its first, second and third derivatives
Standard_EXPORT void D3BSpline (const Standard_Real theU, gp_Pnt2d& theP, gp_Vec2d& theV1, gp_Vec2d& theV2, gp_Vec2d& theV3) const;
//! Computes the point of parameter U on the offset curve
//! and its first, second and third derivatives
Standard_EXPORT void D3Offset (const Standard_Real theU, gp_Pnt2d& theP, gp_Vec2d& theV1, gp_Vec2d& theV2, gp_Vec2d& theV3) const;
//! The returned vector gives the value of the derivative for the
//! order of derivation N.
Standard_EXPORT gp_Vec2d DNBSpline (const Standard_Real theU, const Standard_Integer N) const;
//! The returned vector gives the value of the derivative for the
//! order of derivation N.
Standard_EXPORT gp_Vec2d DNOffset (const Standard_Real theU, const Standard_Integer N) const;
Standard_EXPORT GeomAbs_Shape LocalContinuity (const Standard_Real U1, const Standard_Real U2) const;
Standard_EXPORT void load (const Handle(Geom2d_Curve)& C, const Standard_Real UFirst, const Standard_Real ULast);
//! Rebuilds B-spline cache
//! \param theParameter the value on the knot axis which identifies the caching span
Standard_EXPORT void RebuildCache (const Standard_Real theParameter) const;
Handle(Geom2d_Curve) myCurve;
GeomAbs_CurveType myTypeCurve;
Standard_Real myFirst;
Standard_Real myLast;
Handle(BSplCLib_Cache) myCurveCache;
Handle(Adaptor2d_HCurve2d) myOffsetBaseCurveAdaptor;
};
#include <Geom2dAdaptor_Curve.lxx>
#endif // _Geom2dAdaptor_Curve_HeaderFile

View File

@@ -0,0 +1,87 @@
// Created on: 1993-06-03
// Created by: Bruno DUMORTIER
// Copyright (c) 1993-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.
#ifndef _Geom2dAdaptor_GHCurve_HeaderFile
#define _Geom2dAdaptor_GHCurve_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Adaptor2d_HCurve2d.hxx>
class Standard_OutOfRange;
class Standard_NoSuchObject;
class Standard_DomainError;
class Geom2dAdaptor_Curve;
class Adaptor2d_Curve2d;
class Geom2dAdaptor_GHCurve;
DEFINE_STANDARD_HANDLE(Geom2dAdaptor_GHCurve, Adaptor2d_HCurve2d)
class Geom2dAdaptor_GHCurve : public Adaptor2d_HCurve2d
{
public:
Standard_EXPORT Geom2dAdaptor_GHCurve();
Standard_EXPORT Geom2dAdaptor_GHCurve(const Geom2dAdaptor_Curve& C);
Standard_EXPORT void Set (const Geom2dAdaptor_Curve& C);
Standard_EXPORT const Adaptor2d_Curve2d& Curve2d() const;
Geom2dAdaptor_Curve& ChangeCurve2d();
DEFINE_STANDARD_RTTI(Geom2dAdaptor_GHCurve,Adaptor2d_HCurve2d)
protected:
Geom2dAdaptor_Curve myCurve;
private:
};
#define TheCurve Geom2dAdaptor_Curve
#define TheCurve_hxx <Geom2dAdaptor_Curve.hxx>
#define Adaptor2d_GenHCurve2d Geom2dAdaptor_GHCurve
#define Adaptor2d_GenHCurve2d_hxx <Geom2dAdaptor_GHCurve.hxx>
#define Handle_Adaptor2d_GenHCurve2d Handle(Geom2dAdaptor_GHCurve)
#include <Adaptor2d_GenHCurve2d.lxx>
#undef TheCurve
#undef TheCurve_hxx
#undef Adaptor2d_GenHCurve2d
#undef Adaptor2d_GenHCurve2d_hxx
#undef Handle_Adaptor2d_GenHCurve2d
#endif // _Geom2dAdaptor_GHCurve_HeaderFile

View File

@@ -0,0 +1,42 @@
// Created on: 1993-06-03
// Created by: Bruno DUMORTIER
// Copyright (c) 1993-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 <Geom2dAdaptor_GHCurve.hxx>
#include <Standard_Type.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_DomainError.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Adaptor2d_Curve2d.hxx>
#define TheCurve Geom2dAdaptor_Curve
#define TheCurve_hxx <Geom2dAdaptor_Curve.hxx>
#define Adaptor2d_GenHCurve2d Geom2dAdaptor_GHCurve
#define Adaptor2d_GenHCurve2d_hxx <Geom2dAdaptor_GHCurve.hxx>
#define Handle_Adaptor2d_GenHCurve2d Handle(Geom2dAdaptor_GHCurve)
#include <Adaptor2d_GenHCurve2d.gxx>

View File

@@ -1,43 +0,0 @@
-- Created on: 1995-08-25
-- Created by: Remi LEQUETTE
-- Copyright (c) 1995-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.
class HCurve from Geom2dAdaptor inherits GHCurve from Geom2dAdaptor
---Purpose: Provides an interface between the services provided by any
-- curve from the package Geom2d and those required
-- of the curve by algorithms, which use it.
uses
Curve from Geom2d,
Curve from Geom2dAdaptor
raises
ConstructionError from Standard
is
Create returns HCurve from Geom2dAdaptor;
Create( AS : Curve from Geom2dAdaptor) returns HCurve from Geom2dAdaptor;
Create( S : Curve from Geom2d) returns HCurve from Geom2dAdaptor;
Create( S : Curve from Geom2d; UFirst,ULast : Real)
returns HCurve from Geom2dAdaptor
raises ConstructionError from Standard;
---Purpose: ConstructionError is raised if UFirst>ULast or VFirst>VLast
end HCurve;

View File

@@ -14,13 +14,17 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dAdaptor_HCurve.ixx>
#include <Geom2d_Curve.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_Type.hxx>
//=======================================================================
//function : Geom2dAdaptor_HCurve
//purpose :
//=======================================================================
Geom2dAdaptor_HCurve::Geom2dAdaptor_HCurve()
{
}

View File

@@ -0,0 +1,74 @@
// Created on: 1995-08-25
// Created by: Remi LEQUETTE
// Copyright (c) 1995-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.
#ifndef _Geom2dAdaptor_HCurve_HeaderFile
#define _Geom2dAdaptor_HCurve_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Geom2dAdaptor_GHCurve.hxx>
#include <Standard_Real.hxx>
class Standard_ConstructionError;
class Geom2dAdaptor_Curve;
class Geom2d_Curve;
class Geom2dAdaptor_HCurve;
DEFINE_STANDARD_HANDLE(Geom2dAdaptor_HCurve, Geom2dAdaptor_GHCurve)
//! Provides an interface between the services provided by any
//! curve from the package Geom2d and those required
//! of the curve by algorithms, which use it.
class Geom2dAdaptor_HCurve : public Geom2dAdaptor_GHCurve
{
public:
Standard_EXPORT Geom2dAdaptor_HCurve();
Standard_EXPORT Geom2dAdaptor_HCurve(const Geom2dAdaptor_Curve& AS);
Standard_EXPORT Geom2dAdaptor_HCurve(const Handle(Geom2d_Curve)& S);
//! ConstructionError is raised if UFirst>ULast or VFirst>VLast
Standard_EXPORT Geom2dAdaptor_HCurve(const Handle(Geom2d_Curve)& S, const Standard_Real UFirst, const Standard_Real ULast);
DEFINE_STANDARD_RTTI(Geom2dAdaptor_HCurve,Geom2dAdaptor_GHCurve)
protected:
private:
};
#endif // _Geom2dAdaptor_HCurve_HeaderFile