0024624: Lost word in license statement in source files
[occt.git] / src / AIS / AIS_EqualDistanceRelation.cxx
old mode 100755 (executable)
new mode 100644 (file)
index c1b63b6..47767f6
@@ -1,8 +1,18 @@
-// File:       AIS_EqualDistanceRelation.cxx
-// Created:    Sat Jan 24 19:03:18 1998
-// Author:     Julia GERASIMOVA
-//             <jgv@leonox.nnov.matra-dtv.fr>
-
+// Created on: 1998-01-24
+// Created by: Julia GERASIMOVA
+// Copyright (c) 1998-1999 Matra Datavision
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
 
 #include <Standard_NotImplemented.hxx>
 
@@ -25,7 +35,7 @@
 #include <BRep_Tool.hxx>
 #include <GeomAPI_ProjectPointOnCurve.hxx>
 #include <GeomAPI_ProjectPointOnSurf.hxx>
-#include <Prs3d_LengthAspect.hxx>
+#include <Prs3d_DimensionAspect.hxx>
 #include <Prs3d_ArrowAspect.hxx>
 #include <Geom_Line.hxx>
 #include <Geom_Circle.hxx>
@@ -68,8 +78,8 @@ void AIS_EqualDistanceRelation::Compute( const Handle( PrsMgr_PresentationManage
 
   gp_Pnt Position12 =  myPosition, Position34 = myPosition;
 
-  Handle(Prs3d_LengthAspect) la = myDrawer->LengthAspect();
-  Handle(Prs3d_ArrowAspect) arr = la->Arrow1Aspect();
+  Handle(Prs3d_DimensionAspect) la = myDrawer->DimensionAspect();
+  Handle(Prs3d_ArrowAspect) arr = la->ArrowAspect();
   arr->SetLength(myArrowSize);
 // -- ota -- begin
   if (!myAutomaticPosition ){
@@ -197,29 +207,14 @@ void AIS_EqualDistanceRelation::Compute( const Handle( PrsMgr_PresentationManage
 //purpose  : to avoid warning at compilation (SUN)
 //=======================================================================
 
-void AIS_EqualDistanceRelation::Compute( const Handle( Prs3d_Projector )& aProjector,
-                                        const Handle( Prs3d_Presentation )& aPresentation
+void AIS_EqualDistanceRelation::Compute( const Handle( Prs3d_Projector )& /*aProjector*/,
+                                        const Handle( Prs3d_Presentation )& /*aPresentation*/
 {
 // Standard_NotImplemented::Raise("AIS_EqualDistanceRelation::Compute( const Handle( Prs3d_Projector )&,
  // const Handle( Prs3d_Presentation )& )");
 // PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ; 
 }
 
-
-//=======================================================================
-//function : Compute
-//purpose  : to avoid warning at compilation (SUN)
-//=======================================================================
-
-void AIS_EqualDistanceRelation::Compute( const Handle( PrsMgr_PresentationManager2d )& aPresentationManager2d,
-                                        const Handle( Graphic2d_GraphicObject )& aGraphicObject,
-                                        const Standard_Integer anInteger) 
-{
-// Standard_NotImplemented::Raise("AIS_EqualDistanceRelation::Compute( const Handle( PrsMgr_PresentationManager2d )&,
-//  const Handle( Graphic2d_GraphicObject )&,const Standard_Integer )");
-// PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
-}
-
 //=======================================================================
 //function : Compute
 //purpose  : to avoid warning at compilation (SUN)
@@ -476,10 +471,10 @@ void AIS_EqualDistanceRelation::ComputeTwoEdgesLength( const Handle( Prs3d_Prese
   if (arrsize < confusion) arrsize = Val*0.1;
   if (Abs(Val) <= confusion) {arrsize = 0.;}
 
-  Handle(Prs3d_LengthAspect) la = aDrawer->LengthAspect();
-  Handle(Prs3d_ArrowAspect) arr = la->Arrow1Aspect();  
+  Handle(Prs3d_DimensionAspect) la = aDrawer->DimensionAspect();
+  Handle(Prs3d_ArrowAspect) arr = la->ArrowAspect();  
   arr->SetLength(arrsize);
-  arr = la->Arrow2Aspect();
+  arr = la->ArrowAspect();
   arr->SetLength(arrsize);
 
   if (AutomaticPos && IsSetBndBox)
@@ -617,8 +612,6 @@ void AIS_EqualDistanceRelation::ComputeTwoVerticesLength( const Handle( Prs3d_Pr
   AIS::ComputeGeometry( FirstVertex, FirstAttach, Plane, isOnPlane1);
   AIS::ComputeGeometry( SecondVertex, SecondAttach, Plane, isOnPlane2);
 
-  //Computation of Val
-  Standard_Real Val = FirstAttach.Distance( SecondAttach );
   Standard_Real confusion(Precision::Confusion());
   Standard_Boolean samePoint(FirstAttach.IsEqual(SecondAttach,confusion));
 
@@ -632,9 +625,6 @@ void AIS_EqualDistanceRelation::ComputeTwoVerticesLength( const Handle( Prs3d_Pr
   }
   
   // size
-  Standard_Real arrsize = ArrowSize;
-  if (Abs(Val) <= confusion) arrsize =0.;
-
   if (AutomaticPos) {
    if (!samePoint) {
      gp_Pnt curpos((FirstAttach.XYZ()+SecondAttach.XYZ())*0.5);
@@ -658,10 +648,10 @@ void AIS_EqualDistanceRelation::ComputeTwoVerticesLength( const Handle( Prs3d_Pr
   }
 
  
-  Handle(Prs3d_LengthAspect) la = aDrawer->LengthAspect();
-  Handle(Prs3d_ArrowAspect) arr = la->Arrow1Aspect();  
+  Handle(Prs3d_DimensionAspect) la = aDrawer->DimensionAspect();
+  Handle(Prs3d_ArrowAspect) arr = la->ArrowAspect();  
   arr->SetLength(ArrowSize);
-  arr = la->Arrow2Aspect();
+  arr = la->ArrowAspect();
   arr->SetLength(ArrowSize);
 
   if (AutomaticPos && IsSetBndBox)
@@ -767,10 +757,10 @@ void AIS_EqualDistanceRelation::ComputeOneEdgeOneVertexLength( const Handle( Prs
     SecondAttach = ElCLib::Value(ElCLib::Parameter(l,Position),l);
   }
   
-  Handle(Prs3d_LengthAspect) la = aDrawer->LengthAspect();
-  Handle(Prs3d_ArrowAspect) arr = la->Arrow1Aspect();  
+  Handle(Prs3d_DimensionAspect) la = aDrawer->DimensionAspect();
+  Handle(Prs3d_ArrowAspect) arr = la->ArrowAspect();  
   arr->SetLength(arrsize);
-  arr = la->Arrow2Aspect();
+  arr = la->ArrowAspect();
   arr->SetLength(arrsize);
 
   if (AutomaticPos && IsSetBndBox)