|
|
|||
File indexing completed on 2026-07-01 08:32:09
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 _AppDef_MultiLine_HeaderFile 0018 #define _AppDef_MultiLine_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <AppDef_HArray1OfMultiPointConstraint.hxx> 0025 #include <Standard_Integer.hxx> 0026 #include <AppDef_Array1OfMultiPointConstraint.hxx> 0027 #include <TColgp_Array1OfPnt.hxx> 0028 #include <TColgp_Array1OfPnt2d.hxx> 0029 #include <Standard_OStream.hxx> 0030 class AppDef_MultiPointConstraint; 0031 0032 //! This class describes the organized set of points used in the 0033 //! approximations. A MultiLine is composed of n 0034 //! MultiPointConstraints. 0035 //! The approximation of the MultiLine will be done in the order 0036 //! of the given n MultiPointConstraints. 0037 //! 0038 //! Example of a MultiLine composed of MultiPointConstraints: 0039 //! 0040 //! P1______P2_____P3______P4________........_____PNbMult 0041 //! 0042 //! Q1______Q2_____Q3______Q4________........_____QNbMult 0043 //! . . 0044 //! . . 0045 //! . . 0046 //! R1______R2_____R3______R4________........_____RNbMult 0047 //! 0048 //! Pi, Qi, ..., Ri are points of dimension 2 or 3. 0049 //! 0050 //! (P1, Q1, ...R1), ...(Pn, Qn, ...Rn) n= 1,...NbMult are 0051 //! MultiPointConstraints. 0052 //! There are NbPoints points in each MultiPointConstraint. 0053 class AppDef_MultiLine 0054 { 0055 public: 0056 DEFINE_STANDARD_ALLOC 0057 0058 //! creates an undefined MultiLine. 0059 Standard_EXPORT AppDef_MultiLine(); 0060 0061 //! given the number NbMult of MultiPointConstraints of this 0062 //! MultiLine , it initializes all the fields.SetValue must be 0063 //! called in order for the values of the multipoint 0064 //! constraint to be taken into account. 0065 //! An exception is raised if NbMult < 0. 0066 Standard_EXPORT AppDef_MultiLine(const Standard_Integer NbMult); 0067 0068 //! Constructs a MultiLine with an array of MultiPointConstraints. 0069 Standard_EXPORT AppDef_MultiLine(const AppDef_Array1OfMultiPointConstraint& tabMultiP); 0070 0071 //! The MultiLine constructed will have one line of 0072 //! 3d points without their tangencies. 0073 Standard_EXPORT AppDef_MultiLine(const TColgp_Array1OfPnt& tabP3d); 0074 0075 //! The MultiLine constructed will have one line of 0076 //! 2d points without their tangencies. 0077 Standard_EXPORT AppDef_MultiLine(const TColgp_Array1OfPnt2d& tabP2d); 0078 0079 //! returns the number of MultiPointConstraints of the 0080 //! MultiLine. 0081 Standard_EXPORT Standard_Integer NbMultiPoints() const; 0082 0083 //! returns the number of Points from MultiPoints composing 0084 //! the MultiLine. 0085 Standard_EXPORT Standard_Integer NbPoints() const; 0086 0087 //! Sets the value of the parameter for the 0088 //! MultiPointConstraint at position Index. 0089 //! Exceptions 0090 //! - Standard_OutOfRange if Index is less 0091 //! than 0 or Index is greater than the number 0092 //! of Multipoint constraints in the MultiLine. 0093 Standard_EXPORT void SetParameter(const Standard_Integer Index, const Standard_Real U); 0094 0095 //! It sets the MultiPointConstraint of range Index to the 0096 //! value MPoint. 0097 //! An exception is raised if Index < 0 or Index> MPoint. 0098 //! An exception is raised if the dimensions of the 0099 //! MultiPoints are different. 0100 Standard_EXPORT void SetValue(const Standard_Integer Index, 0101 const AppDef_MultiPointConstraint& MPoint); 0102 0103 //! returns the MultiPointConstraint of range Index 0104 //! An exception is raised if Index<0 or Index>MPoint. 0105 Standard_EXPORT AppDef_MultiPointConstraint Value(const Standard_Integer Index) const; 0106 0107 //! Prints on the stream o information on the current 0108 //! state of the object. 0109 //! Is used to redefine the operator <<. 0110 Standard_EXPORT void Dump(Standard_OStream& o) const; 0111 0112 protected: 0113 Handle(AppDef_HArray1OfMultiPointConstraint) tabMult; 0114 0115 private: 0116 }; 0117 0118 #endif // _AppDef_MultiLine_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|