-// 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>
#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>
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 ){
//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)
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)
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));
}
// size
- Standard_Real arrsize = ArrowSize;
- if (Abs(Val) <= confusion) arrsize =0.;
-
if (AutomaticPos) {
if (!samePoint) {
gp_Pnt curpos((FirstAttach.XYZ()+SecondAttach.XYZ())*0.5);
}
- 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)
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)