|
||||
File indexing completed on 2025-01-18 10:02:57
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 0033 //! This class describes the organized set of points used in the 0034 //! approximations. A MultiLine is composed of n 0035 //! MultiPointConstraints. 0036 //! The approximation of the MultiLine will be done in the order 0037 //! of the given n MultiPointConstraints. 0038 //! 0039 //! Example of a MultiLine composed of MultiPointConstraints: 0040 //! 0041 //! P1______P2_____P3______P4________........_____PNbMult 0042 //! 0043 //! Q1______Q2_____Q3______Q4________........_____QNbMult 0044 //! . . 0045 //! . . 0046 //! . . 0047 //! R1______R2_____R3______R4________........_____RNbMult 0048 //! 0049 //! Pi, Qi, ..., Ri are points of dimension 2 or 3. 0050 //! 0051 //! (P1, Q1, ...R1), ...(Pn, Qn, ...Rn) n= 1,...NbMult are 0052 //! MultiPointConstraints. 0053 //! There are NbPoints points in each MultiPointConstraint. 0054 class AppDef_MultiLine 0055 { 0056 public: 0057 0058 DEFINE_STANDARD_ALLOC 0059 0060 0061 //! creates an undefined MultiLine. 0062 Standard_EXPORT AppDef_MultiLine(); 0063 0064 //! given the number NbMult of MultiPointConstraints of this 0065 //! MultiLine , it initializes all the fields.SetValue must be 0066 //! called in order for the values of the multipoint 0067 //! constraint to be taken into account. 0068 //! An exception is raised if NbMult < 0. 0069 Standard_EXPORT AppDef_MultiLine(const Standard_Integer NbMult); 0070 0071 //! Constructs a MultiLine with an array of MultiPointConstraints. 0072 Standard_EXPORT AppDef_MultiLine(const AppDef_Array1OfMultiPointConstraint& tabMultiP); 0073 0074 //! The MultiLine constructed will have one line of 0075 //! 3d points without their tangencies. 0076 Standard_EXPORT AppDef_MultiLine(const TColgp_Array1OfPnt& tabP3d); 0077 0078 //! The MultiLine constructed will have one line of 0079 //! 2d points without their tangencies. 0080 Standard_EXPORT AppDef_MultiLine(const TColgp_Array1OfPnt2d& tabP2d); 0081 0082 //! returns the number of MultiPointConstraints of the 0083 //! MultiLine. 0084 Standard_EXPORT Standard_Integer NbMultiPoints() const; 0085 0086 //! returns the number of Points from MultiPoints composing 0087 //! the MultiLine. 0088 Standard_EXPORT Standard_Integer NbPoints() const; 0089 0090 //! Sets the value of the parameter for the 0091 //! MultiPointConstraint at position Index. 0092 //! Exceptions 0093 //! - Standard_OutOfRange if Index is less 0094 //! than 0 or Index is greater than the number 0095 //! of Multipoint constraints in the MultiLine. 0096 Standard_EXPORT void SetParameter (const Standard_Integer Index, const Standard_Real U); 0097 0098 //! It sets the MultiPointConstraint of range Index to the 0099 //! value MPoint. 0100 //! An exception is raised if Index < 0 or Index> MPoint. 0101 //! An exception is raised if the dimensions of the 0102 //! MultiPoints are different. 0103 Standard_EXPORT void SetValue (const Standard_Integer Index, const AppDef_MultiPointConstraint& MPoint); 0104 0105 //! returns the MultiPointConstraint of range Index 0106 //! An exception is raised if Index<0 or Index>MPoint. 0107 Standard_EXPORT AppDef_MultiPointConstraint Value (const Standard_Integer Index) const; 0108 0109 //! Prints on the stream o information on the current 0110 //! state of the object. 0111 //! Is used to redefine the operator <<. 0112 Standard_EXPORT void Dump (Standard_OStream& o) const; 0113 0114 0115 0116 0117 protected: 0118 0119 0120 0121 Handle(AppDef_HArray1OfMultiPointConstraint) tabMult; 0122 0123 0124 private: 0125 0126 0127 0128 0129 0130 }; 0131 0132 0133 0134 0135 0136 0137 0138 #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 |