Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/BRepLib_MakeEdge2d.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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