1 //--------------------------------------------------------------------
3 // File Name : IGESAppli_NodalDisplAndRot.cxx
5 // Author : CKY / Contract Toubro-Larsen
6 // Copyright : MATRA-DATAVISION 1993
8 //--------------------------------------------------------------------
10 #include <IGESAppli_NodalDisplAndRot.ixx>
11 #include <TColgp_HArray1OfXYZ.hxx>
14 IGESAppli_NodalDisplAndRot::IGESAppli_NodalDisplAndRot () { }
17 void IGESAppli_NodalDisplAndRot::Init
18 (const Handle(IGESDimen_HArray1OfGeneralNote)& allNotes,
19 const Handle(TColStd_HArray1OfInteger)& allIdentifiers,
20 const Handle(IGESAppli_HArray1OfNode)& allNodes,
21 const Handle(IGESBasic_HArray1OfHArray1OfXYZ)& allRotParams,
22 const Handle(IGESBasic_HArray1OfHArray1OfXYZ)& allTransParams)
24 if ( allNodes->Lower() != 1 ||
25 (allIdentifiers->Lower() != 1 ||
26 allIdentifiers->Length() != allNodes->Length()) ||
27 (allTransParams->Lower() != 1 ||
28 allTransParams->Length() != allNodes->Length()) ||
29 (allRotParams->Lower() != 1 ||
30 allRotParams->Length() != allNodes->Length()) )
31 Standard_DimensionMismatch::Raise
32 ("IGESAppli_NodalDisplAndRot : Init(Lengths of arrays inconsistent)");
34 for (Standard_Integer i= 1; i <= allNodes->Length(); i++)
36 Handle(TColgp_HArray1OfXYZ) temp1 = allTransParams->Value(i);
37 Handle(TColgp_HArray1OfXYZ) temp2 = allRotParams->Value(i);
38 if ((temp1->Lower() != 1 || temp1->Length() != allNotes->Length()) ||
39 (temp2->Lower() != 1 || temp2->Length() != allNotes->Length()) )
40 Standard_DimensionMismatch::Raise
41 ("IGESAppli_NodalDisplAndRot: Init(No. of Param per Node != Nbcases)");
46 theNodeIdentifiers = allIdentifiers;
47 theTransParam = allTransParams;
48 theRotParam = allRotParams;
49 InitTypeAndForm(138,0);
52 Standard_Integer IGESAppli_NodalDisplAndRot::NbCases () const
54 return theNotes->Length();
57 Standard_Integer IGESAppli_NodalDisplAndRot::NbNodes () const
59 return theNodes->Length();
62 Handle(IGESDimen_GeneralNote) IGESAppli_NodalDisplAndRot::Note
63 (const Standard_Integer Index) const
65 return theNotes->Value(Index);
68 Standard_Integer IGESAppli_NodalDisplAndRot::NodeIdentifier
69 (const Standard_Integer Index) const
71 return theNodeIdentifiers->Value(Index);
74 Handle(IGESAppli_Node) IGESAppli_NodalDisplAndRot::Node
75 (const Standard_Integer Index) const
77 return theNodes->Value(Index);
80 gp_XYZ IGESAppli_NodalDisplAndRot::TranslationParameter
81 (const Standard_Integer NodeNum, const Standard_Integer CaseNum) const
83 return theTransParam->Value(NodeNum)->Value(CaseNum);
86 gp_XYZ IGESAppli_NodalDisplAndRot::RotationalParameter
87 (const Standard_Integer NodeNum, const Standard_Integer CaseNum) const
89 return theRotParam->Value(NodeNum)->Value(CaseNum);