|
|
|||
File indexing completed on 2026-05-03 08:24:27
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 //! This class describes Points composing a MultiPoint. 0034 //! These points can be 2D or 3D. The user must first give the 0035 //! 3D Points and then the 2D Points. 0036 //! They are Poles of a Bezier Curve. 0037 //! This class is used either to define data input or 0038 //! results when performing the approximation of several lines in parallel. 0039 class AppParCurves_MultiPoint 0040 { 0041 public: 0042 DEFINE_STANDARD_ALLOC 0043 0044 //! creates an indefinite MultiPoint. 0045 Standard_EXPORT AppParCurves_MultiPoint(); 0046 0047 //! constructs a set of Points used to approximate a 0048 //! Multiline. 0049 //! These Points can be of 2 or 3 dimensions. 0050 //! Points will be initialized with SetPoint and SetPoint2d. 0051 //! NbPoints is the number of 3D Points. 0052 //! NbPoints2d is the number of 2D Points. 0053 Standard_EXPORT AppParCurves_MultiPoint(const Standard_Integer NbPoints, 0054 const Standard_Integer NbPoints2d); 0055 0056 //! creates a MultiPoint only composed of 3D points. 0057 Standard_EXPORT AppParCurves_MultiPoint(const TColgp_Array1OfPnt& tabP); 0058 0059 //! creates a MultiPoint only composed of 2D points. 0060 Standard_EXPORT AppParCurves_MultiPoint(const TColgp_Array1OfPnt2d& tabP2d); 0061 0062 //! constructs a set of Points used to approximate a 0063 //! Multiline. 0064 //! These Points can be of 2 or 3 dimensions. 0065 //! Points will be initialized with SetPoint and SetPoint2d. 0066 //! NbPoints is the total number of Points. 0067 Standard_EXPORT AppParCurves_MultiPoint(const TColgp_Array1OfPnt& tabP, 0068 const TColgp_Array1OfPnt2d& tabP2d); 0069 Standard_EXPORT virtual ~AppParCurves_MultiPoint(); 0070 0071 //! the 3d Point of range Index of this MultiPoint is 0072 //! set to <Point>. 0073 //! An exception is raised if Index < 0 or 0074 //! Index > number of 3d Points. 0075 Standard_EXPORT void SetPoint(const Standard_Integer Index, const gp_Pnt& Point); 0076 0077 //! returns the 3d Point of range Index. 0078 //! An exception is raised if Index < 0 or 0079 //! Index < number of 3d Points. 0080 Standard_EXPORT const gp_Pnt& Point(const Standard_Integer Index) const; 0081 0082 //! The 2d Point of range Index is set to <Point>. 0083 //! An exception is raised if Index > 3d Points or 0084 //! Index > total number of Points. 0085 Standard_EXPORT void SetPoint2d(const Standard_Integer Index, const gp_Pnt2d& Point); 0086 0087 //! returns the 2d Point of range Index. 0088 //! An exception is raised if index <= number of 0089 //! 3d Points or Index > total number of Points. 0090 Standard_EXPORT const gp_Pnt2d& Point2d(const Standard_Integer Index) const; 0091 0092 //! returns the dimension of the point of range Index. 0093 //! An exception is raised if Index <0 or Index > NbCurves. 0094 Standard_Integer Dimension(const Standard_Integer Index) const; 0095 0096 //! returns the number of points of dimension 3D. 0097 Standard_Integer NbPoints() const; 0098 0099 //! returns the number of points of dimension 2D. 0100 Standard_Integer NbPoints2d() const; 0101 0102 //! Applies a transformation to the curve of range 0103 //! <CuIndex>. 0104 //! newx = x + dx*oldx 0105 //! newy = y + dy*oldy for all points of the curve. 0106 //! newz = z + dz*oldz 0107 Standard_EXPORT void Transform(const Standard_Integer CuIndex, 0108 const Standard_Real x, 0109 const Standard_Real dx, 0110 const Standard_Real y, 0111 const Standard_Real dy, 0112 const Standard_Real z, 0113 const Standard_Real dz); 0114 0115 //! Applies a transformation to the Curve of range 0116 //! <CuIndex>. 0117 //! newx = x + dx*oldx 0118 //! newy = y + dy*oldy for all points of the curve. 0119 Standard_EXPORT void Transform2d(const Standard_Integer CuIndex, 0120 const Standard_Real x, 0121 const Standard_Real dx, 0122 const Standard_Real y, 0123 const Standard_Real dy); 0124 0125 //! Prints on the stream o information on the current 0126 //! state of the object. 0127 //! Is used to redefine the operator <<. 0128 Standard_EXPORT virtual void Dump(Standard_OStream& o) const; 0129 0130 protected: 0131 Handle(Standard_Transient) ttabPoint; 0132 Handle(Standard_Transient) ttabPoint2d; 0133 Standard_Integer nbP; 0134 Standard_Integer nbP2d; 0135 0136 private: 0137 }; 0138 0139 #include <AppParCurves_MultiPoint.lxx> 0140 0141 #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 |
|