0032630: Coding - get rid of unsused forward declarations [BinMDF to IFSelect]
[occt.git] / src / GCE2d / GCE2d_MakeLine.hxx
CommitLineData
42cf5bc1 1// Created on: 1992-09-28
2// Created by: Remi GILET
3// Copyright (c) 1992-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _GCE2d_MakeLine_HeaderFile
18#define _GCE2d_MakeLine_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <GCE2d_Root.hxx>
d1a67b9d 25#include <Geom2d_Line.hxx>
26
42cf5bc1 27class gp_Ax2d;
28class gp_Lin2d;
29class gp_Pnt2d;
30class gp_Dir2d;
31
32
33//! This class implements the following algorithms used
34//! to create a Line from Geom2d.
35//! * Create a Line parallel to another and passing
36//! through a point.
37//! * Create a Line passing through 2 points.
38class GCE2d_MakeLine : public GCE2d_Root
39{
40public:
41
42 DEFINE_STANDARD_ALLOC
43
44
45
46 //! Creates a line located in 2D space with the axis placement A.
47 //! The Location of A is the origin of the line.
48 Standard_EXPORT GCE2d_MakeLine(const gp_Ax2d& A);
49
50
51 //! Creates a line from a non persistent line from package gp.
52 Standard_EXPORT GCE2d_MakeLine(const gp_Lin2d& L);
53
54
55 //! P is the origin and V is the direction of the line.
56 Standard_EXPORT GCE2d_MakeLine(const gp_Pnt2d& P, const gp_Dir2d& V);
57
58 //! Make a Line from Geom2d <TheLin> parallel to another
59 //! Lin <Lin> and passing through a Pnt <Point>.
60 Standard_EXPORT GCE2d_MakeLine(const gp_Lin2d& Lin, const gp_Pnt2d& Point);
61
62 //! Make a Line from Geom2d <TheLin> parallel to another
63 //! Lin <Lin> at a distance <Dist>.
64 Standard_EXPORT GCE2d_MakeLine(const gp_Lin2d& Lin, const Standard_Real Dist);
65
66 //! Make a Line from Geom2d <TheLin> passing through 2
67 //! Pnt <P1>,<P2>.
68 //! It returns false if <p1> and <P2> are confused.
69 //! Warning
70 //! If points P1 and P2 coincident (that is, when IsDone
71 //! returns false), the Status function returns gce_ConfusedPoints.
72 Standard_EXPORT GCE2d_MakeLine(const gp_Pnt2d& P1, const gp_Pnt2d& P2);
73
74 //! Returns the constructed line.
75 //! Exceptions StdFail_NotDone if no line is constructed.
76 Standard_EXPORT const Handle(Geom2d_Line)& Value() const;
42cf5bc1 77
d1a67b9d 78 operator const Handle(Geom2d_Line)& () const { return Value(); }
42cf5bc1 79
80private:
42cf5bc1 81 Handle(Geom2d_Line) TheLine;
42cf5bc1 82};
83
42cf5bc1 84#endif // _GCE2d_MakeLine_HeaderFile