1 // Created by: CKY / Contract Toubro-Larsen
2 // Copyright (c) 1993-1999 Matra Datavision
3 // Copyright (c) 1999-2012 OPEN CASCADE SAS
5 // The content of this file is subject to the Open CASCADE Technology Public
6 // License Version 6.5 (the "License"). You may not use the content of this file
7 // except in compliance with the License. Please obtain a copy of the License
8 // at http://www.opencascade.org and read it completely before using this file.
10 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 // The Original Code and all software distributed under the License is
14 // distributed on an "AS IS" basis, without warranty of any kind, and the
15 // Initial Developer hereby disclaims all such warranties, including without
16 // limitation, any warranties of merchantability, fitness for a particular
17 // purpose or non-infringement. Please see the License for the specific terms
18 // and conditions governing the rights and limitations under the License.
20 //--------------------------------------------------------------------
21 //--------------------------------------------------------------------
23 #include <IGESAppli_NodalResults.ixx>
24 #include <Standard_OutOfRange.hxx>
25 #include <TColStd_HArray1OfReal.hxx>
28 IGESAppli_NodalResults::IGESAppli_NodalResults () { }
31 // Data : Col -> // Nodes. Row : Data per Node
33 void IGESAppli_NodalResults::Init
34 (const Handle(IGESDimen_GeneralNote)& aNote,
35 const Standard_Integer aNumber, const Standard_Real aTime,
36 const Handle(TColStd_HArray1OfInteger)& allNodeIdentifiers,
37 const Handle(IGESAppli_HArray1OfNode)& allNodes,
38 const Handle(TColStd_HArray2OfReal)& allData)
40 if (allNodes->Lower() != 1 || allNodeIdentifiers->Lower() != 1 ||
41 allNodes->Length() != allNodeIdentifiers->Length() ||
42 allData->LowerCol() != 1 || allData->LowerRow() != 1 ||
43 allNodes->Length() != allData->UpperRow() )
44 Standard_DimensionMismatch::Raise("IGESAppli_NodalResults : Init");
46 theSubCaseNum = aNumber;
48 theNodeIdentifiers = allNodeIdentifiers;
51 InitTypeAndForm(146,FormNumber());
52 // FormNumber -> Type of the Results
55 void IGESAppli_NodalResults::SetFormNumber (const Standard_Integer form)
57 if (form < 0 || form > 34) Standard_OutOfRange::Raise
58 ("IGESAppli_NodalResults : SetFormNumber");
59 InitTypeAndForm(146,form);
63 Handle(IGESDimen_GeneralNote) IGESAppli_NodalResults::Note () const
68 Handle(IGESAppli_Node) IGESAppli_NodalResults::Node
69 (const Standard_Integer Index) const
71 return theNodes->Value(Index);
74 Standard_Integer IGESAppli_NodalResults::NbNodes () const
76 return theNodes->Length();
79 Standard_Integer IGESAppli_NodalResults::SubCaseNumber () const
84 Standard_Real IGESAppli_NodalResults::Time () const
89 Standard_Integer IGESAppli_NodalResults::NbData () const
91 return theData->RowLength();
94 Standard_Integer IGESAppli_NodalResults::NodeIdentifier
95 (const Standard_Integer Index) const
97 return theNodeIdentifiers->Value(Index);
100 Standard_Real IGESAppli_NodalResults::Data
101 (const Standard_Integer NodeNum, const Standard_Integer DataNum) const
103 return theData->Value(NodeNum,DataNum);