|
||||
File indexing completed on 2025-01-18 10:02:58
0001 // Created on: 1991-12-02 0002 // Created by: Laurent PAINNOT 0003 // Copyright (c) 1991-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 #ifndef _AppParCurves_MultiPoint_HeaderFile 0018 #define _AppParCurves_MultiPoint_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <Standard_Integer.hxx> 0025 #include <TColgp_Array1OfPnt.hxx> 0026 #include <TColgp_Array1OfPnt2d.hxx> 0027 #include <Standard_Real.hxx> 0028 #include <Standard_OStream.hxx> 0029 class Standard_Transient; 0030 class gp_Pnt; 0031 class gp_Pnt2d; 0032 0033 0034 //! This class describes Points composing a MultiPoint. 0035 //! These points can be 2D or 3D. The user must first give the 0036 //! 3D Points and then the 2D Points. 0037 //! They are Poles of a Bezier Curve. 0038 //! This class is used either to define data input or 0039 //! results when performing the approximation of several lines in parallel. 0040 class AppParCurves_MultiPoint 0041 { 0042 public: 0043 0044 DEFINE_STANDARD_ALLOC 0045 0046 0047 //! creates an indefinite MultiPoint. 0048 Standard_EXPORT AppParCurves_MultiPoint(); 0049 0050 //! constructs a set of Points used to approximate a 0051 //! Multiline. 0052 //! These Points can be of 2 or 3 dimensions. 0053 //! Points will be initialized with SetPoint and SetPoint2d. 0054 //! NbPoints is the number of 3D Points. 0055 //! NbPoints2d is the number of 2D Points. 0056 Standard_EXPORT AppParCurves_MultiPoint(const Standard_Integer NbPoints, const Standard_Integer NbPoints2d); 0057 0058 //! creates a MultiPoint only composed of 3D points. 0059 Standard_EXPORT AppParCurves_MultiPoint(const TColgp_Array1OfPnt& tabP); 0060 0061 //! creates a MultiPoint only composed of 2D points. 0062 Standard_EXPORT AppParCurves_MultiPoint(const TColgp_Array1OfPnt2d& tabP2d); 0063 0064 //! constructs a set of Points used to approximate a 0065 //! Multiline. 0066 //! These Points can be of 2 or 3 dimensions. 0067 //! Points will be initialized with SetPoint and SetPoint2d. 0068 //! NbPoints is the total number of Points. 0069 Standard_EXPORT AppParCurves_MultiPoint(const TColgp_Array1OfPnt& tabP, const TColgp_Array1OfPnt2d& tabP2d); 0070 Standard_EXPORT virtual ~AppParCurves_MultiPoint(); 0071 0072 //! the 3d Point of range Index of this MultiPoint is 0073 //! set to <Point>. 0074 //! An exception is raised if Index < 0 or 0075 //! Index > number of 3d Points. 0076 Standard_EXPORT void SetPoint (const Standard_Integer Index, const gp_Pnt& Point); 0077 0078 //! returns the 3d Point of range Index. 0079 //! An exception is raised if Index < 0 or 0080 //! Index < number of 3d Points. 0081 Standard_EXPORT const gp_Pnt& Point (const Standard_Integer Index) const; 0082 0083 //! The 2d Point of range Index is set to <Point>. 0084 //! An exception is raised if Index > 3d Points or 0085 //! Index > total number of Points. 0086 Standard_EXPORT void SetPoint2d (const Standard_Integer Index, const gp_Pnt2d& Point); 0087 0088 //! returns the 2d Point of range Index. 0089 //! An exception is raised if index <= number of 0090 //! 3d Points or Index > total number of Points. 0091 Standard_EXPORT const gp_Pnt2d& Point2d (const Standard_Integer Index) const; 0092 0093 //! returns the dimension of the point of range Index. 0094 //! An exception is raised if Index <0 or Index > NbCurves. 0095 Standard_Integer Dimension (const Standard_Integer Index) const; 0096 0097 //! returns the number of points of dimension 3D. 0098 Standard_Integer NbPoints() const; 0099 0100 //! returns the number of points of dimension 2D. 0101 Standard_Integer NbPoints2d() const; 0102 0103 //! Applies a transformation to the curve of range 0104 //! <CuIndex>. 0105 //! newx = x + dx*oldx 0106 //! newy = y + dy*oldy for all points of the curve. 0107 //! newz = z + dz*oldz 0108 Standard_EXPORT void Transform (const Standard_Integer CuIndex, const Standard_Real x, const Standard_Real dx, const Standard_Real y, const Standard_Real dy, const Standard_Real z, const Standard_Real dz); 0109 0110 //! Applies a transformation to the Curve of range 0111 //! <CuIndex>. 0112 //! newx = x + dx*oldx 0113 //! newy = y + dy*oldy for all points of the curve. 0114 Standard_EXPORT void Transform2d (const Standard_Integer CuIndex, const Standard_Real x, const Standard_Real dx, const Standard_Real y, const Standard_Real dy); 0115 0116 //! Prints on the stream o information on the current 0117 //! state of the object. 0118 //! Is used to redefine the operator <<. 0119 Standard_EXPORT virtual void Dump (Standard_OStream& o) const; 0120 0121 0122 0123 0124 protected: 0125 0126 0127 0128 Handle(Standard_Transient) ttabPoint; 0129 Handle(Standard_Transient) ttabPoint2d; 0130 Standard_Integer nbP; 0131 Standard_Integer nbP2d; 0132 0133 0134 private: 0135 0136 0137 0138 0139 0140 }; 0141 0142 0143 #include <AppParCurves_MultiPoint.lxx> 0144 0145 0146 0147 0148 0149 #endif // _AppParCurves_MultiPoint_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |