Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1993-07-06
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 _BRepLib_MakeEdge_HeaderFile
0018 #define _BRepLib_MakeEdge_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <BRepLib_EdgeError.hxx>
0025 #include <TopoDS_Vertex.hxx>
0026 #include <BRepLib_MakeShape.hxx>
0027 class gp_Pnt;
0028 class gp_Lin;
0029 class gp_Circ;
0030 class gp_Elips;
0031 class gp_Hypr;
0032 class gp_Parab;
0033 class Geom_Curve;
0034 class Geom2d_Curve;
0035 class Geom_Surface;
0036 class TopoDS_Edge;
0037 
0038 
0039 //! Provides methods to build edges.
0040 //!
0041 //! The   methods have  the  following   syntax, where
0042 //! TheCurve is one of Lin, Circ, ...
0043 //!
0044 //! Create(C : TheCurve)
0045 //!
0046 //! Makes an edge on  the whole curve.  Add vertices
0047 //! on finite curves.
0048 //!
0049 //! Create(C : TheCurve; p1,p2 : Real)
0050 //!
0051 //! Make an edge  on the curve between parameters p1
0052 //! and p2. if p2 < p1 the edge will be REVERSED. If
0053 //! p1  or p2 is infinite the  curve will be open in
0054 //! that  direction. Vertices are created for finite
0055 //! values of p1 and p2.
0056 //!
0057 //! Create(C : TheCurve; P1, P2 : Pnt from gp)
0058 //!
0059 //! Make an edge on the curve  between the points P1
0060 //! and P2. The  points are projected on   the curve
0061 //! and the   previous method is  used. An  error is
0062 //! raised if the points are not on the curve.
0063 //!
0064 //! Create(C : TheCurve; V1, V2 : Vertex from TopoDS)
0065 //!
0066 //! Make an edge  on the curve  between the vertices
0067 //! V1 and V2. Same as the  previous but no vertices
0068 //! are created. If a vertex is  Null the curve will
0069 //! be open in this direction.
0070 class BRepLib_MakeEdge  : public BRepLib_MakeShape
0071 {
0072 public:
0073 
0074   DEFINE_STANDARD_ALLOC
0075 
0076   
0077   Standard_EXPORT BRepLib_MakeEdge();
0078   
0079   Standard_EXPORT BRepLib_MakeEdge(const TopoDS_Vertex& V1, const TopoDS_Vertex& V2);
0080   
0081   Standard_EXPORT BRepLib_MakeEdge(const gp_Pnt& P1, const gp_Pnt& P2);
0082   
0083   Standard_EXPORT BRepLib_MakeEdge(const gp_Lin& L);
0084   
0085   Standard_EXPORT BRepLib_MakeEdge(const gp_Lin& L, const Standard_Real p1, const Standard_Real p2);
0086   
0087   Standard_EXPORT BRepLib_MakeEdge(const gp_Lin& L, const gp_Pnt& P1, const gp_Pnt& P2);
0088   
0089   Standard_EXPORT BRepLib_MakeEdge(const gp_Lin& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2);
0090   
0091   Standard_EXPORT BRepLib_MakeEdge(const gp_Circ& L);
0092   
0093   Standard_EXPORT BRepLib_MakeEdge(const gp_Circ& L, const Standard_Real p1, const Standard_Real p2);
0094   
0095   Standard_EXPORT BRepLib_MakeEdge(const gp_Circ& L, const gp_Pnt& P1, const gp_Pnt& P2);
0096   
0097   Standard_EXPORT BRepLib_MakeEdge(const gp_Circ& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2);
0098   
0099   Standard_EXPORT BRepLib_MakeEdge(const gp_Elips& L);
0100   
0101   Standard_EXPORT BRepLib_MakeEdge(const gp_Elips& L, const Standard_Real p1, const Standard_Real p2);
0102   
0103   Standard_EXPORT BRepLib_MakeEdge(const gp_Elips& L, const gp_Pnt& P1, const gp_Pnt& P2);
0104   
0105   Standard_EXPORT BRepLib_MakeEdge(const gp_Elips& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2);
0106   
0107   Standard_EXPORT BRepLib_MakeEdge(const gp_Hypr& L);
0108   
0109   Standard_EXPORT BRepLib_MakeEdge(const gp_Hypr& L, const Standard_Real p1, const Standard_Real p2);
0110   
0111   Standard_EXPORT BRepLib_MakeEdge(const gp_Hypr& L, const gp_Pnt& P1, const gp_Pnt& P2);
0112   
0113   Standard_EXPORT BRepLib_MakeEdge(const gp_Hypr& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2);
0114   
0115   Standard_EXPORT BRepLib_MakeEdge(const gp_Parab& L);
0116   
0117   Standard_EXPORT BRepLib_MakeEdge(const gp_Parab& L, const Standard_Real p1, const Standard_Real p2);
0118   
0119   Standard_EXPORT BRepLib_MakeEdge(const gp_Parab& L, const gp_Pnt& P1, const gp_Pnt& P2);
0120   
0121   Standard_EXPORT BRepLib_MakeEdge(const gp_Parab& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2);
0122   
0123   Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom_Curve)& L);
0124   
0125   Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom_Curve)& L, const Standard_Real p1, const Standard_Real p2);
0126   
0127   Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom_Curve)& L, const gp_Pnt& P1, const gp_Pnt& P2);
0128   
0129   Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom_Curve)& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2);
0130   
0131   Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom_Curve)& L, const gp_Pnt& P1, const gp_Pnt& P2, const Standard_Real p1, const Standard_Real p2);
0132   
0133   Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom_Curve)& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2, const Standard_Real p1, const Standard_Real p2);
0134   
0135   Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom2d_Curve)& L, const Handle(Geom_Surface)& S);
0136   
0137   Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom2d_Curve)& L, const Handle(Geom_Surface)& S, const Standard_Real p1, const Standard_Real p2);
0138   
0139   Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom2d_Curve)& L, const Handle(Geom_Surface)& S, const gp_Pnt& P1, const gp_Pnt& P2);
0140   
0141   Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom2d_Curve)& L, const Handle(Geom_Surface)& S, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2);
0142   
0143   Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom2d_Curve)& L, const Handle(Geom_Surface)& S, const gp_Pnt& P1, const gp_Pnt& P2, const Standard_Real p1, const Standard_Real p2);
0144   
0145   Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom2d_Curve)& L, const Handle(Geom_Surface)& S, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2, const Standard_Real p1, const Standard_Real p2);
0146   
0147   Standard_EXPORT void Init (const Handle(Geom_Curve)& C);
0148   
0149   Standard_EXPORT void Init (const Handle(Geom_Curve)& C, const Standard_Real p1, const Standard_Real p2);
0150   
0151   Standard_EXPORT void Init (const Handle(Geom_Curve)& C, const gp_Pnt& P1, const gp_Pnt& P2);
0152   
0153   Standard_EXPORT void Init (const Handle(Geom_Curve)& C, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2);
0154   
0155   Standard_EXPORT void Init (const Handle(Geom_Curve)& C, const gp_Pnt& P1, const gp_Pnt& P2, const Standard_Real p1, const Standard_Real p2);
0156   
0157   Standard_EXPORT void Init (const Handle(Geom_Curve)& C, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2, const Standard_Real p1, const Standard_Real p2);
0158   
0159   Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const Handle(Geom_Surface)& S);
0160   
0161   Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const Handle(Geom_Surface)& S, const Standard_Real p1, const Standard_Real p2);
0162   
0163   Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const Handle(Geom_Surface)& S, const gp_Pnt& P1, const gp_Pnt& P2);
0164   
0165   Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const Handle(Geom_Surface)& S, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2);
0166   
0167   Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const Handle(Geom_Surface)& S, const gp_Pnt& P1, const gp_Pnt& P2, const Standard_Real p1, const Standard_Real p2);
0168   
0169   Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const Handle(Geom_Surface)& S, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2, const Standard_Real p1, const Standard_Real p2);
0170   
0171   //! Returns the error description when NotDone.
0172   Standard_EXPORT BRepLib_EdgeError Error() const;
0173   
0174   Standard_EXPORT const TopoDS_Edge& Edge();
0175   Standard_EXPORT operator TopoDS_Edge();
0176   
0177   //! Returns the first vertex of the edge. May be Null.
0178   Standard_EXPORT const TopoDS_Vertex& Vertex1() const;
0179   
0180   //! Returns the second vertex of the edge. May be Null.
0181   Standard_EXPORT const TopoDS_Vertex& Vertex2() const;
0182 
0183 
0184 
0185 
0186 protected:
0187 
0188 
0189 
0190 
0191 
0192 private:
0193 
0194 
0195 
0196   BRepLib_EdgeError myError;
0197   TopoDS_Vertex myVertex1;
0198   TopoDS_Vertex myVertex2;
0199 
0200 
0201 };
0202 
0203 
0204 
0205 
0206 
0207 
0208 
0209 #endif // _BRepLib_MakeEdge_HeaderFile