1 // Created on: 2016-04-07
2 // Copyright (c) 2016 OPEN CASCADE SAS
3 // Created by: Oleg AGASHIN
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _BRepMeshData_Curve_HeaderFile
17 #define _BRepMeshData_Curve_HeaderFile
19 #include <IMeshData_Curve.hxx>
20 #include <Standard_Type.hxx>
21 #include <NCollection_IncAllocator.hxx>
22 #include <IMeshData_Types.hxx>
24 //! Default implementation of curve data model entity.
25 class BRepMeshData_Curve : public IMeshData_Curve
32 Standard_EXPORT BRepMeshData_Curve (const Handle (NCollection_IncAllocator)& theAllocator);
35 Standard_EXPORT virtual ~BRepMeshData_Curve ();
37 //! Inserts new discretization point at the given position.
38 Standard_EXPORT virtual void InsertPoint(
39 const Standard_Integer thePosition,
40 const gp_Pnt& thePoint,
41 const Standard_Real theParamOnPCurve) Standard_OVERRIDE;
43 //! Adds new discretization point to pcurve.
44 Standard_EXPORT virtual void AddPoint (
45 const gp_Pnt& thePoint,
46 const Standard_Real theParamOnCurve) Standard_OVERRIDE;
48 //! Returns discretization point with the given index.
49 Standard_EXPORT virtual gp_Pnt& GetPoint (const Standard_Integer theIndex) Standard_OVERRIDE;
51 //! Removes point with the given index.
52 Standard_EXPORT virtual void RemovePoint (const Standard_Integer theIndex) Standard_OVERRIDE;
54 //! Returns parameter with the given index.
55 Standard_EXPORT virtual Standard_Real& GetParameter (const Standard_Integer theIndex) Standard_OVERRIDE;
57 //! Returns number of parameters stored in curve.
58 Standard_EXPORT virtual Standard_Integer ParametersNb() const Standard_OVERRIDE;
60 //! Clears parameters list.
61 Standard_EXPORT virtual void Clear(const Standard_Boolean isKeepEndPoints) Standard_OVERRIDE;
63 DEFINE_STANDARD_RTTIEXT(BRepMeshData_Curve, IMeshData_Curve)
67 //! Removes parameter with the given index.
68 Standard_EXPORT virtual void removeParameter (const Standard_Integer theIndex) Standard_OVERRIDE;
72 IMeshData::Model::SequenceOfPnt myPoints;
73 IMeshData::Model::SequenceOfReal myParameters;