Integration of OCCT 6.5.0 from SVN
[occt.git] / src / Plate / Plate_GlobalTranslationConstraint.cxx
1 // File:        Plate_GlobalTranslationConstraint.cxx
2 // Created:     Mon Mar 30 12:49:46 1998
3 // Author:      # Andre LIEUTIER
4 //              <alr@sgi63>
5
6
7 #include <Plate_GlobalTranslationConstraint.ixx>
8
9 Plate_GlobalTranslationConstraint::Plate_GlobalTranslationConstraint(const TColgp_SequenceOfXY& SOfXY)
10 :myLXYZC(SOfXY.Length()-1,SOfXY.Length() )
11 {
12   Standard_Integer i ;
13   for( i=1;i<=SOfXY.Length();i++)
14     {
15       myLXYZC.SetPPC(i,Plate_PinpointConstraint (SOfXY(i),gp_XYZ(0.,0.,0.),0,0));
16     }
17   for(i=1;i<=SOfXY.Length()-1;i++)
18         {
19           myLXYZC.SetCoeff(i,1,-1.);
20           for(Standard_Integer j=2;j<=SOfXY.Length();j++)
21             {
22               if(j==(i+1)) myLXYZC.SetCoeff(i,j,1.);
23               else  myLXYZC.SetCoeff(i,j,0.);
24             }  
25         }
26 }