1 //--------------------------------------------------------------------
3 // File Name : IGESAppli_NodalResults.cxx
5 // Author : CKY / Contract Toubro-Larsen
6 // Copyright : MATRA-DATAVISION 1993
8 //--------------------------------------------------------------------
10 #include <IGESAppli_NodalResults.ixx>
11 #include <Standard_OutOfRange.hxx>
12 #include <TColStd_HArray1OfReal.hxx>
15 IGESAppli_NodalResults::IGESAppli_NodalResults () { }
18 // Data : Col -> // Nodes. Row : Data per Node
20 void IGESAppli_NodalResults::Init
21 (const Handle(IGESDimen_GeneralNote)& aNote,
22 const Standard_Integer aNumber, const Standard_Real aTime,
23 const Handle(TColStd_HArray1OfInteger)& allNodeIdentifiers,
24 const Handle(IGESAppli_HArray1OfNode)& allNodes,
25 const Handle(TColStd_HArray2OfReal)& allData)
27 if (allNodes->Lower() != 1 || allNodeIdentifiers->Lower() != 1 ||
28 allNodes->Length() != allNodeIdentifiers->Length() ||
29 allData->LowerCol() != 1 || allData->LowerRow() != 1 ||
30 allNodes->Length() != allData->UpperRow() )
31 Standard_DimensionMismatch::Raise("IGESAppli_NodalResults : Init");
33 theSubCaseNum = aNumber;
35 theNodeIdentifiers = allNodeIdentifiers;
38 InitTypeAndForm(146,FormNumber());
39 // FormNumber -> Type of the Results
42 void IGESAppli_NodalResults::SetFormNumber (const Standard_Integer form)
44 if (form < 0 || form > 34) Standard_OutOfRange::Raise
45 ("IGESAppli_NodalResults : SetFormNumber");
46 InitTypeAndForm(146,form);
50 Handle(IGESDimen_GeneralNote) IGESAppli_NodalResults::Note () const
55 Handle(IGESAppli_Node) IGESAppli_NodalResults::Node
56 (const Standard_Integer Index) const
58 return theNodes->Value(Index);
61 Standard_Integer IGESAppli_NodalResults::NbNodes () const
63 return theNodes->Length();
66 Standard_Integer IGESAppli_NodalResults::SubCaseNumber () const
71 Standard_Real IGESAppli_NodalResults::Time () const
76 Standard_Integer IGESAppli_NodalResults::NbData () const
78 return theData->RowLength();
81 Standard_Integer IGESAppli_NodalResults::NodeIdentifier
82 (const Standard_Integer Index) const
84 return theNodeIdentifiers->Value(Index);
87 Standard_Real IGESAppli_NodalResults::Data
88 (const Standard_Integer NodeNum, const Standard_Integer DataNum) const
90 return theData->Value(NodeNum,DataNum);