// Created on: 1996-12-05
// Created by: Jean-Pierre COMBE/Odile Olivier
// Copyright (c) 1996-1999 Matra Datavision
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
+// This file is part of Open CASCADE Technology software library.
//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+// 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.
//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
-#define BUC60915 //GG 05/06/01 Enable to compute the requested arrow size
-// if any in all dimensions.
-
-#include <AIS_ParallelRelation.ixx>
-
-#include <Standard_NotImplemented.hxx>
-#include <Standard_DomainError.hxx>
-
-#include <Precision.hxx>
-
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-
-#include <DsgPrs_LengthPresentation.hxx>
-
-#include <Prs3d_Drawer.hxx>
-#include <Prs3d_ArrowAspect.hxx>
-#include <Prs3d_DimensionAspect.hxx>
-
#include <AIS.hxx>
-#include <AIS_Drawer.hxx>
-
-#include <SelectMgr_EntityOwner.hxx>
-#include <Select3D_SensitiveSegment.hxx>
-#include <Select3D_SensitiveBox.hxx>
-
-#include <TopoDS.hxx>
-#include <TopExp_Explorer.hxx>
+#include <AIS_ParallelRelation.hxx>
#include <BRep_Tool.hxx>
-#include <BRepAdaptor_Surface.hxx>
#include <BRepAdaptor_Curve.hxx>
-
-#include <gp_Lin.hxx>
-#include <gp_Pnt.hxx>
+#include <BRepAdaptor_Surface.hxx>
+#include <DsgPrs_LengthPresentation.hxx>
#include <ElCLib.hxx>
-#include <gp_Pln.hxx>
-#include <gp_Dir.hxx>
-#include <gp_Ax1.hxx>
-#include <gp_Ax2.hxx>
-
#include <gce_MakeLin.hxx>
-
-#include <Geom_Plane.hxx>
-#include <Geom_Line.hxx>
#include <Geom_Ellipse.hxx>
+#include <Geom_Line.hxx>
+#include <Geom_Plane.hxx>
+#include <Geom_Transformation.hxx>
+#include <gp_Ax1.hxx>
+#include <gp_Ax2.hxx>
+#include <gp_Dir.hxx>
+#include <gp_Lin.hxx>
+#include <gp_Pln.hxx>
+#include <gp_Pnt.hxx>
+#include <Precision.hxx>
+#include <Prs3d_ArrowAspect.hxx>
+#include <Prs3d_DimensionAspect.hxx>
+#include <Prs3d_Drawer.hxx>
+#include <Prs3d_Presentation.hxx>
+#include <Prs3d_Projector.hxx>
+#include <Select3D_SensitiveBox.hxx>
+#include <Select3D_SensitiveSegment.hxx>
+#include <SelectMgr_EntityOwner.hxx>
+#include <SelectMgr_Selection.hxx>
+#include <Standard_DomainError.hxx>
+#include <Standard_NotImplemented.hxx>
+#include <Standard_Type.hxx>
+#include <TCollection_AsciiString.hxx>
+#include <TCollection_ExtendedString.hxx>
+#include <TopExp_Explorer.hxx>
+#include <TopoDS.hxx>
+#include <TopoDS_Shape.hxx>
//=======================================================================
//function : Constructor
mySShape = aSShape;
myPlane = aPlane;
myAutomaticPosition = Standard_False;
-#ifdef BUC60915
SetArrowSize( anArrowSize );
-#else
- myArrowSize = anArrowSize;
-#endif
myPosition = aPosition;
mySymbolPrs = aSymbolPrs;
}
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
-void AIS_ParallelRelation::Compute(const Handle_Prs3d_Projector& aProjector, const Handle_Geom_Transformation& aTransformation, const Handle_Prs3d_Presentation& aPresentation)
+void AIS_ParallelRelation::Compute(const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTransformation, const Handle(Prs3d_Presentation)& aPresentation)
{
-// Standard_NotImplemented::Raise("AIS_ParallelRelation::Compute(const Handle_Prs3d_Projector&, const Handle_Geom_Transformation&, const Handle_Prs3d_Presentation&)");
+// Standard_NotImplemented::Raise("AIS_ParallelRelation::Compute(const Handle(Prs3d_Projector)&, const Handle(Geom_Transformation)&, const Handle(Prs3d_Presentation)&)");
PrsMgr_PresentableObject::Compute( aProjector , aTransformation , aPresentation ) ;
}
if (geom1->IsInstance(STANDARD_TYPE(Geom_Ellipse)))
{
- const Handle(Geom_Ellipse)& geom_el1 = (Handle(Geom_Ellipse)&) geom1;
+ Handle(Geom_Ellipse) geom_el1 (Handle(Geom_Ellipse)::DownCast (geom1));
// construct lines through focuses
gp_Ax1 elAx = geom_el1->XAxis();
l1 = gp_Lin(elAx);
}
else if (geom1->IsInstance(STANDARD_TYPE(Geom_Line)))
{
- const Handle(Geom_Line)& geom_lin1 = (Handle(Geom_Line)&) geom1;
+ Handle(Geom_Line) geom_lin1 (Handle(Geom_Line)::DownCast (geom1));
l1 = geom_lin1->Lin();
}
else return;
if (geom2->IsInstance(STANDARD_TYPE(Geom_Ellipse)))
{
- const Handle(Geom_Ellipse)& geom_el2 = (Handle(Geom_Ellipse)&) geom2;
+ Handle(Geom_Ellipse) geom_el2 (Handle(Geom_Ellipse)::DownCast (geom2));
// construct lines through focuses
gp_Ax1 elAx = geom_el2->XAxis();
l2 = gp_Lin(elAx);
}
else if (geom2->IsInstance(STANDARD_TYPE(Geom_Line)))
{
- const Handle(Geom_Line)& geom_lin2 = (Handle(Geom_Line)&) geom2;
+ Handle(Geom_Line) geom_lin2 (Handle(Geom_Line)::DownCast (geom2));
l2 = geom_lin2->Lin();
}
else return;
myDirAttach = l1.Direction();
// size
-#ifdef BUC60915
if( !myArrowSizeIsDefined ) {
-#endif
Standard_Real arrSize1 (myArrowSize), arrSize2 (myArrowSize);
if (!isInfinite1) arrSize1 = ptat11.Distance(ptat12)/50.;
if (!isInfinite2) arrSize2 = ptat21.Distance(ptat22)/50.;
myArrowSize = Max(myArrowSize,Max(arrSize1,arrSize2));
// myArrowSize = Min(myArrowSize,Min(arrSize1,arrSize2));
-#ifdef BUC60915
}
-#endif
if ( myAutomaticPosition )
{