Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-16 09:16:29

0001 // Created on: 1993-08-10
0002 // Created by: Remi LEQUETTE
0003 // Copyright (c) 1993-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 _BRep_PointRepresentation_HeaderFile
0018 #define _BRep_PointRepresentation_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <TopLoc_Location.hxx>
0023 #include <Standard_Real.hxx>
0024 #include <Standard_Transient.hxx>
0025 class Geom_Curve;
0026 class Geom2d_Curve;
0027 class Geom_Surface;
0028 
0029 //! Root class for the points representations.
0030 //! Contains a location and a parameter.
0031 class BRep_PointRepresentation : public Standard_Transient
0032 {
0033 
0034 public:
0035   //! A point on a 3d curve.
0036   Standard_EXPORT virtual bool IsPointOnCurve() const;
0037 
0038   //! A point on a 2d curve on a surface.
0039   Standard_EXPORT virtual bool IsPointOnCurveOnSurface() const;
0040 
0041   //! A point on a surface.
0042   Standard_EXPORT virtual bool IsPointOnSurface() const;
0043 
0044   //! A point on the curve <C>.
0045   Standard_EXPORT virtual bool IsPointOnCurve(const occ::handle<Geom_Curve>& C,
0046                                               const TopLoc_Location&         L) const;
0047 
0048   //! A point on the 2d curve <PC> on the surface <S>.
0049   Standard_EXPORT virtual bool IsPointOnCurveOnSurface(const occ::handle<Geom2d_Curve>& PC,
0050                                                        const occ::handle<Geom_Surface>& S,
0051                                                        const TopLoc_Location&           L) const;
0052 
0053   //! A point on the surface <S>.
0054   Standard_EXPORT virtual bool IsPointOnSurface(const occ::handle<Geom_Surface>& S,
0055                                                 const TopLoc_Location&           L) const;
0056 
0057   const TopLoc_Location& Location() const;
0058 
0059   void Location(const TopLoc_Location& L);
0060 
0061   double Parameter() const;
0062 
0063   void Parameter(const double P);
0064 
0065   Standard_EXPORT virtual double Parameter2() const;
0066 
0067   Standard_EXPORT virtual void Parameter2(const double P);
0068 
0069   Standard_EXPORT virtual const occ::handle<Geom_Curve>& Curve() const;
0070 
0071   Standard_EXPORT virtual void Curve(const occ::handle<Geom_Curve>& C);
0072 
0073   Standard_EXPORT virtual const occ::handle<Geom2d_Curve>& PCurve() const;
0074 
0075   Standard_EXPORT virtual void PCurve(const occ::handle<Geom2d_Curve>& C);
0076 
0077   Standard_EXPORT virtual const occ::handle<Geom_Surface>& Surface() const;
0078 
0079   Standard_EXPORT virtual void Surface(const occ::handle<Geom_Surface>& S);
0080 
0081   //! Dumps the content of me into the stream
0082   Standard_EXPORT virtual void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const;
0083 
0084   DEFINE_STANDARD_RTTIEXT(BRep_PointRepresentation, Standard_Transient)
0085 
0086 protected:
0087   Standard_EXPORT BRep_PointRepresentation(const double P, const TopLoc_Location& L);
0088 
0089 private:
0090   TopLoc_Location myLocation;
0091   double          myParameter;
0092 };
0093 
0094 #include <BRep_PointRepresentation.lxx>
0095 
0096 #endif // _BRep_PointRepresentation_HeaderFile