|
||||
File indexing completed on 2025-01-18 10:03:31
0001 // Created on: 1992-09-28 0002 // Created by: Remi GILET 0003 // Copyright (c) 1992-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 _GC_MakeLine_HeaderFile 0018 #define _GC_MakeLine_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <GC_Root.hxx> 0025 #include <Geom_Line.hxx> 0026 0027 class gp_Ax1; 0028 class gp_Lin; 0029 class gp_Pnt; 0030 class gp_Dir; 0031 0032 0033 //! This class implements the following algorithms used 0034 //! to create a Line from Geom. 0035 //! * Create a Line parallel to another and passing 0036 //! through a point. 0037 //! * Create a Line passing through 2 points. 0038 //! A MakeLine object provides a framework for: 0039 //! - defining the construction of the line, 0040 //! - implementing the construction algorithm, and 0041 //! - consulting the results. In particular, the Value 0042 //! function returns the constructed line. 0043 class GC_MakeLine : public GC_Root 0044 { 0045 public: 0046 0047 DEFINE_STANDARD_ALLOC 0048 0049 0050 0051 //! Creates a line located in 3D space with the axis placement A1. 0052 //! The Location of A1 is the origin of the line. 0053 Standard_EXPORT GC_MakeLine(const gp_Ax1& A1); 0054 0055 0056 //! Creates a line from a non persistent line from package gp. 0057 Standard_EXPORT GC_MakeLine(const gp_Lin& L); 0058 0059 0060 //! P is the origin and V is the direction of the line. 0061 Standard_EXPORT GC_MakeLine(const gp_Pnt& P, const gp_Dir& V); 0062 0063 //! Make a Line from Geom <TheLin> parallel to another 0064 //! Lin <Lin> and passing through a Pnt <Point>. 0065 Standard_EXPORT GC_MakeLine(const gp_Lin& Lin, const gp_Pnt& Point); 0066 0067 //! Make a Line from Geom <TheLin> passing through 2 0068 //! Pnt <P1>,<P2>. 0069 //! It returns false if <p1> and <P2> are confused. 0070 //! Warning 0071 //! If the points P1 and P2 are coincident (that is, when 0072 //! IsDone returns false), the Status function returns gce_ConfusedPoints. 0073 Standard_EXPORT GC_MakeLine(const gp_Pnt& P1, const gp_Pnt& P2); 0074 0075 //! Returns the constructed line. 0076 //! Exceptions StdFail_NotDone if no line is constructed. 0077 Standard_EXPORT const Handle(Geom_Line)& Value() const; 0078 0079 operator const Handle(Geom_Line)& () const { return Value(); } 0080 0081 private: 0082 Handle(Geom_Line) TheLine; 0083 }; 0084 0085 #endif // _GC_MakeLine_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |