Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-15 08:29:21

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 //! A framework for displaying angles.
0035 class DsgPrs_AnglePresentation
0036 {
0037 public:
0038   DEFINE_STANDARD_ALLOC
0039 
0040   //! Draws the presentation of the full angle of a cone.
0041   //! VminCircle - a circle at V parameter = Vmin
0042   //! VmaxCircle - a circle at V parameter = Vmax
0043   //! aCircle - a circle at V parameter from projection of aPosition to axis of the cone
0044   Standard_EXPORT static void Add(const Handle(Prs3d_Presentation)& aPresentation,
0045                                   const Handle(Prs3d_Drawer)&       aDrawer,
0046                                   const Standard_Real               aVal,
0047                                   const TCollection_ExtendedString& aText,
0048                                   const gp_Circ&                    aCircle,
0049                                   const gp_Pnt&                     aPosition,
0050                                   const gp_Pnt&                     Apex,
0051                                   const gp_Circ&                    VminCircle,
0052                                   const gp_Circ&                    VmaxCircle,
0053                                   const Standard_Real               aArrowSize);
0054 
0055   //! Draws the representation of the angle
0056   //! defined by dir1 and dir2, centered on
0057   //! CenterPoint, using the offset point OffsetPoint.
0058   //! Lines are drawn to points AttachmentPoint1 and AttachmentPoint2
0059   Standard_EXPORT static void Add(const Handle(Prs3d_Presentation)& aPresentation,
0060                                   const Handle(Prs3d_Drawer)&       aDrawer,
0061                                   const Standard_Real               theval,
0062                                   const gp_Pnt&                     CenterPoint,
0063                                   const gp_Pnt&                     AttachmentPoint1,
0064                                   const gp_Pnt&                     AttachmentPoint2,
0065                                   const gp_Dir&                     dir1,
0066                                   const gp_Dir&                     dir2,
0067                                   const gp_Pnt&                     OffsetPoint);
0068 
0069   //! Same  as above, but <thevalstring> contains conversion
0070   //! in Session units....
0071   Standard_EXPORT static void Add(const Handle(Prs3d_Presentation)& aPresentation,
0072                                   const Handle(Prs3d_Drawer)&       aDrawer,
0073                                   const Standard_Real               theval,
0074                                   const TCollection_ExtendedString& thevalstring,
0075                                   const gp_Pnt&                     CenterPoint,
0076                                   const gp_Pnt&                     AttachmentPoint1,
0077                                   const gp_Pnt&                     AttachmentPoint2,
0078                                   const gp_Dir&                     dir1,
0079                                   const gp_Dir&                     dir2,
0080                                   const gp_Pnt&                     OffsetPoint);
0081 
0082   //! Same  as above, may add one  or
0083   //! two Arrows  according to  <ArrowSide>  value
0084   Standard_EXPORT static void Add(const Handle(Prs3d_Presentation)& aPresentation,
0085                                   const Handle(Prs3d_Drawer)&       aDrawer,
0086                                   const Standard_Real               theval,
0087                                   const TCollection_ExtendedString& thevalstring,
0088                                   const gp_Pnt&                     CenterPoint,
0089                                   const gp_Pnt&                     AttachmentPoint1,
0090                                   const gp_Pnt&                     AttachmentPoint2,
0091                                   const gp_Dir&                     dir1,
0092                                   const gp_Dir&                     dir2,
0093                                   const gp_Pnt&                     OffsetPoint,
0094                                   const DsgPrs_ArrowSide            ArrowSide);
0095 
0096   //! Same  as above, but axisdir contains the axis direction
0097   //! useful for Revol that can be opened with 180 degrees
0098   Standard_EXPORT static void Add(const Handle(Prs3d_Presentation)& aPresentation,
0099                                   const Handle(Prs3d_Drawer)&       aDrawer,
0100                                   const Standard_Real               theval,
0101                                   const TCollection_ExtendedString& thevalstring,
0102                                   const gp_Pnt&                     CenterPoint,
0103                                   const gp_Pnt&                     AttachmentPoint1,
0104                                   const gp_Pnt&                     AttachmentPoint2,
0105                                   const gp_Dir&                     dir1,
0106                                   const gp_Dir&                     dir2,
0107                                   const gp_Dir&                     axisdir,
0108                                   const gp_Pnt&                     OffsetPoint);
0109 
0110   //! Same  as above,may add one  or
0111   //! two Arrows  according to  <ArrowSide>  value
0112   Standard_EXPORT static void Add(const Handle(Prs3d_Presentation)& aPresentation,
0113                                   const Handle(Prs3d_Drawer)&       aDrawer,
0114                                   const Standard_Real               theval,
0115                                   const TCollection_ExtendedString& thevalstring,
0116                                   const gp_Pnt&                     CenterPoint,
0117                                   const gp_Pnt&                     AttachmentPoint1,
0118                                   const gp_Pnt&                     AttachmentPoint2,
0119                                   const gp_Dir&                     dir1,
0120                                   const gp_Dir&                     dir2,
0121                                   const gp_Dir&                     axisdir,
0122                                   const Standard_Boolean            isPlane,
0123                                   const gp_Ax1&                     AxisOfSurf,
0124                                   const gp_Pnt&                     OffsetPoint,
0125                                   const DsgPrs_ArrowSide            ArrowSide);
0126 
0127   //! simple representation of a poor lonesome angle dimension
0128   //! Draw a line from <theCenter>   to <AttachmentPoint1>, then operates
0129   //! a rotation around the perpmay add one  or
0130   //! two Arrows  according to  <ArrowSide>  value.  The
0131   //! attributes (color,arrowsize,...) are driven by the Drawer.
0132   Standard_EXPORT static void Add(const Handle(Prs3d_Presentation)& aPresentation,
0133                                   const Handle(Prs3d_Drawer)&       aDrawer,
0134                                   const Standard_Real               theval,
0135                                   const gp_Pnt&                     theCenter,
0136                                   const gp_Pnt&                     AttachmentPoint1,
0137                                   const gp_Ax1&                     theAxe,
0138                                   const DsgPrs_ArrowSide            ArrowSide);
0139 
0140 protected:
0141 private:
0142 };
0143 
0144 #endif // _DsgPrs_AnglePresentation_HeaderFile