Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:00

0001 // Created on: 1995-08-04
0002 // Created by: Modelistation
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 _StdPrs_Curve_HeaderFile
0018 #define _StdPrs_Curve_HeaderFile
0019 
0020 #include <Prs3d_Root.hxx>
0021 #include <Prs3d_Drawer.hxx>
0022 #include <TColgp_SequenceOfPnt.hxx>
0023 
0024 class Adaptor3d_Curve;
0025 
0026 //! A framework to define display of lines, arcs of circles
0027 //! and conic sections.
0028 //! This is done with a fixed number of points, which can be modified.
0029 class StdPrs_Curve  : public Prs3d_Root
0030 {
0031 public:
0032 
0033   DEFINE_STANDARD_ALLOC
0034 
0035   
0036   //! Adds to the presentation aPresentation the drawing of the curve aCurve.
0037   //! The aspect is defined by LineAspect in aDrawer.
0038   //! If drawCurve equals Standard_False the curve will not be displayed,
0039   //! it is used if the curve is a part of some shape and PrimitiveArray
0040   //! visualization approach is activated (it is activated by default).
0041   Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Adaptor3d_Curve& aCurve, const Handle(Prs3d_Drawer)& aDrawer, const Standard_Boolean drawCurve = Standard_True);
0042   
0043   //! Adds to the presentation aPresentation the drawing of the curve aCurve.
0044   //! The aspect is defined by LineAspect in aDrawer.
0045   //! The drawing will be limited between the points of parameter U1 and U2.
0046   //! If drawCurve equals Standard_False the curve will not be displayed,
0047   //! it is used if the curve is a part of some shape and PrimitiveArray
0048   //! visualization approach is activated (it is activated by default).
0049   Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Adaptor3d_Curve& aCurve, const Standard_Real U1, const Standard_Real U2, const Handle(Prs3d_Drawer)& aDrawer, const Standard_Boolean drawCurve = Standard_True);
0050   
0051   //! adds to the presentation aPresentation the drawing of the curve aCurve.
0052   //! The aspect is the current aspect.
0053   //! aDeflection is used in the circle case.
0054   //! Points give a sequence of curve points.
0055   //! If drawCurve equals Standard_False the curve will not be displayed,
0056   //! it is used if the curve is a part of some shape and PrimitiveArray
0057   //! visualization approach is activated (it is activated by default).
0058   Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Adaptor3d_Curve& aCurve, const Handle(Prs3d_Drawer)& aDrawer, TColgp_SequenceOfPnt& Points, const Standard_Boolean drawCurve = Standard_True);
0059   
0060   //! adds to the presentation aPresentation the drawing of the curve
0061   //! aCurve.
0062   //! The aspect is the current aspect.
0063   //! The drawing will be limited between the points of parameter
0064   //! U1 and U2.
0065   //! aDeflection is used in the circle case.
0066   //! Points give a sequence of curve points.
0067   //! If drawCurve equals Standard_False the curve will not be displayed,
0068   //! it is used if the curve is a part of some shape and PrimitiveArray
0069   //! visualization approach is activated (it is activated by default).
0070   Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Adaptor3d_Curve& aCurve, const Standard_Real U1, const Standard_Real U2, TColgp_SequenceOfPnt& Points, const Standard_Integer aNbPoints = 30, const Standard_Boolean drawCurve = Standard_True);
0071   
0072   //! returns true if the distance between the point (X,Y,Z) and the
0073   //! drawing of the curve is less than aDistance.
0074   Standard_EXPORT static Standard_Boolean Match (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Adaptor3d_Curve& aCurve, const Handle(Prs3d_Drawer)& aDrawer);
0075   
0076   //! returns true if the distance between the point (X,Y,Z) and the
0077   //! drawing of the curve is less than aDistance.
0078   Standard_EXPORT static Standard_Boolean Match (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Adaptor3d_Curve& aCurve, const Standard_Real aDeflection, const Standard_Real aLimit, const Standard_Integer aNbPoints);
0079   
0080   //! returns true if the distance between the point (X,Y,Z) and the
0081   //! drawing of the curve aCurve is less than aDistance.
0082   //! The drawing is considered between the points
0083   //! of parameter U1 and U2;
0084   Standard_EXPORT static Standard_Boolean Match (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Adaptor3d_Curve& aCurve, const Standard_Real U1, const Standard_Real U2, const Handle(Prs3d_Drawer)& aDrawer);
0085   
0086   //! returns true if the distance between the point (X,Y,Z) and the
0087   //! drawing of the curve aCurve is less than aDistance.
0088   //! The drawing is considered between the points
0089   //! of parameter U1 and U2;
0090   Standard_EXPORT static Standard_Boolean Match (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Adaptor3d_Curve& aCurve, const Standard_Real U1, const Standard_Real U2, const Standard_Real aDeflection, const Standard_Integer aNbPoints);
0091 
0092 };
0093 
0094 #endif // _StdPrs_Curve_HeaderFile