Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:25

0001 // Created on: 1995-02-07
0002 // Created by: Arnaud BOUZY
0003 // Copyright (c) 1995-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _DsgPrs_AnglePresentation_HeaderFile
0018 #define _DsgPrs_AnglePresentation_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <Prs3d_Drawer.hxx>
0024 #include <Standard_Real.hxx>
0025 #include <DsgPrs_ArrowSide.hxx>
0026 #include <Prs3d_Presentation.hxx>
0027 
0028 class TCollection_ExtendedString;
0029 class gp_Circ;
0030 class gp_Pnt;
0031 class gp_Dir;
0032 class gp_Ax1;
0033 
0034 
0035 //! A framework for displaying angles.
0036 class DsgPrs_AnglePresentation 
0037 {
0038 public:
0039 
0040   DEFINE_STANDARD_ALLOC
0041 
0042   
0043   //! Draws the presenation of the full angle of a cone.
0044   //! VminCircle - a circle at V parameter = Vmin
0045   //! VmaxCircle - a circle at V parameter = Vmax
0046   //! aCircle - a circle at V parameter from projection of aPosition to axis of the cone
0047   Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Handle(Prs3d_Drawer)& aDrawer, const Standard_Real aVal, const TCollection_ExtendedString& aText, const gp_Circ& aCircle, const gp_Pnt& aPosition, const gp_Pnt& Apex, const gp_Circ& VminCircle, const gp_Circ& VmaxCircle, const Standard_Real aArrowSize);
0048   
0049   //! Draws the representation of the angle
0050   //! defined by dir1 and dir2, centered on
0051   //! CenterPoint, using the offset point OffsetPoint.
0052   //! Lines are drawn to points AttachmentPoint1 and AttachmentPoint2
0053   Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Handle(Prs3d_Drawer)& aDrawer, const Standard_Real theval, const gp_Pnt& CenterPoint, const gp_Pnt& AttachmentPoint1, const gp_Pnt& AttachmentPoint2, const gp_Dir& dir1, const gp_Dir& dir2, const gp_Pnt& OffsetPoint);
0054   
0055   //! Same  as above, but <thevalstring> contains conversion
0056   //! in Session units....
0057   Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Handle(Prs3d_Drawer)& aDrawer, const Standard_Real theval, const TCollection_ExtendedString& thevalstring, const gp_Pnt& CenterPoint, const gp_Pnt& AttachmentPoint1, const gp_Pnt& AttachmentPoint2, const gp_Dir& dir1, const gp_Dir& dir2, const gp_Pnt& OffsetPoint);
0058   
0059   //! Same  as above, may add one  or
0060   //! two Arrows  according to  <ArrowSide>  value
0061   Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Handle(Prs3d_Drawer)& aDrawer, const Standard_Real theval, const TCollection_ExtendedString& thevalstring, const gp_Pnt& CenterPoint, const gp_Pnt& AttachmentPoint1, const gp_Pnt& AttachmentPoint2, const gp_Dir& dir1, const gp_Dir& dir2, const gp_Pnt& OffsetPoint, const DsgPrs_ArrowSide ArrowSide);
0062   
0063   //! Same  as above, but axisdir contains the axis direction
0064   //! useful for Revol that can be opened with 180 degrees
0065   Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Handle(Prs3d_Drawer)& aDrawer, const Standard_Real theval, const TCollection_ExtendedString& thevalstring, const gp_Pnt& CenterPoint, const gp_Pnt& AttachmentPoint1, const gp_Pnt& AttachmentPoint2, const gp_Dir& dir1, const gp_Dir& dir2, const gp_Dir& axisdir, const gp_Pnt& OffsetPoint);
0066   
0067   //! Same  as above,may add one  or
0068   //! two Arrows  according to  <ArrowSide>  value
0069   Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Handle(Prs3d_Drawer)& aDrawer, const Standard_Real theval, const TCollection_ExtendedString& thevalstring, const gp_Pnt& CenterPoint, const gp_Pnt& AttachmentPoint1, const gp_Pnt& AttachmentPoint2, const gp_Dir& dir1, const gp_Dir& dir2, const gp_Dir& axisdir, const Standard_Boolean isPlane, const gp_Ax1& AxisOfSurf, const gp_Pnt& OffsetPoint, const DsgPrs_ArrowSide ArrowSide);
0070   
0071   //! simple representation of a poor lonesome angle dimension
0072   //! Draw a line from <theCenter>   to <AttachmentPoint1>, then operates
0073   //! a rotation around the perpmay add one  or
0074   //! two Arrows  according to  <ArrowSide>  value.  The
0075   //! attributes (color,arrowsize,...) are driven by the Drawer.
0076   Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Handle(Prs3d_Drawer)& aDrawer, const Standard_Real theval, const gp_Pnt& theCenter, const gp_Pnt& AttachmentPoint1, const gp_Ax1& theAxe, const DsgPrs_ArrowSide ArrowSide);
0077 
0078 
0079 
0080 
0081 protected:
0082 
0083 
0084 
0085 
0086 
0087 private:
0088 
0089 
0090 
0091 
0092 
0093 };
0094 
0095 
0096 
0097 
0098 
0099 
0100 
0101 #endif // _DsgPrs_AnglePresentation_HeaderFile