//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
//
//
// File: VISU_PipeLine.cxx
SetOrientation(aPipeLine->GetPlaneOrientation(1),
aPipeLine->GetRotateX(1),aPipeLine->GetRotateY(1),1);
SetDisplacement(aPipeLine->GetDisplacement(1),1);
- SetDefault();
+ SetDefault();
if (!aPipeLine->IsDefault()) SetPosition(aPipeLine->GetPosition());
}
}
float aPosition = myPosition;
if(myCondition){
float aDir[3], aBounds[6], aBoundPrj[3];
- myInput->GetBounds(aBounds);
+ GetInput2()->GetBounds(aBounds);
GetDir(aDir,myAng[0],myBasePlane[0]);
GetBoundProject(aBoundPrj,aBounds,aDir);
aPosition = aBoundPrj[0] + aBoundPrj[2]*myDisplacement[0];
vtkAppendPolyData *anAppendPolyData = vtkAppendPolyData::New();
//Build base plane
float aDir[2][3], aBaseBounds[6];
- myInput->GetBounds(aBaseBounds);
+ GetInput2()->GetBounds(aBaseBounds);
GetDir(aDir[0],myAng[0],myBasePlane[0]);
- vtkUnstructuredGrid* anUnstructuredGrid =
+ vtkUnstructuredGrid* anUnstructuredGrid =
myFieldTransform->GetUnstructuredGridOutput();
CutWithPlanes(anAppendPolyData,anUnstructuredGrid,1,aDir[0],aBaseBounds,
myPosition,myCondition,myDisplacement[0]);
anAppendPolyData->Register(myAppendPolyData);
anAppendPolyData->Delete();
//Calculate values for building of table
- vtkMath::Cross(aDir[0],aDir[1],myDirLn);
+ vtkMath::Cross(aDir[0],aDir[1],myDirLn);
+ for (int i=0; i<3 ; i++) if(myDirLn[i]<0) myDirLn[i] = (-1)*myDirLn[i];//enk:: correction of bug Bug PAL10401
GetBoundProject(myBoundPrjLn, aBaseBounds, myDirLn);
VISU::Mul(myDirLn,myBoundPrjLn[0],myBasePnt);
CorrectPnt(myBasePnt,aBaseBounds);
void VISU_CutLinesPL::CutWithPlanes(vtkAppendPolyData* theAppendPolyData, vtkDataSet* theDataSet,
- int theNbPlanes, float theDir[3], float theBounds[6],
+ int theNbPlanes, float theDir[3], float theBounds[6],
float thePartPosition, int thePartCondition,
float theDisplacement)
{