|
|
|||
File indexing completed on 2026-07-04 08:32:05
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 //! This class implements the following algorithms used 0033 //! to create a Line from Geom. 0034 //! * Create a Line parallel to another and passing 0035 //! through a point. 0036 //! * Create a Line passing through 2 points. 0037 //! A MakeLine object provides a framework for: 0038 //! - defining the construction of the line, 0039 //! - implementing the construction algorithm, and 0040 //! - consulting the results. In particular, the Value 0041 //! function returns the constructed line. 0042 class GC_MakeLine : public GC_Root 0043 { 0044 public: 0045 DEFINE_STANDARD_ALLOC 0046 0047 //! Creates a line located in 3D space with the axis placement A1. 0048 //! The Location of A1 is the origin of the line. 0049 Standard_EXPORT GC_MakeLine(const gp_Ax1& A1); 0050 0051 //! Creates a line from a non persistent line from package gp. 0052 Standard_EXPORT GC_MakeLine(const gp_Lin& L); 0053 0054 //! P is the origin and V is the direction of the line. 0055 Standard_EXPORT GC_MakeLine(const gp_Pnt& P, const gp_Dir& V); 0056 0057 //! Make a Line from Geom <TheLin> parallel to another 0058 //! Lin <Lin> and passing through a Pnt <Point>. 0059 Standard_EXPORT GC_MakeLine(const gp_Lin& Lin, const gp_Pnt& Point); 0060 0061 //! Make a Line from Geom <TheLin> passing through 2 0062 //! Pnt <P1>,<P2>. 0063 //! It returns false if <p1> and <P2> are confused. 0064 //! Warning 0065 //! If the points P1 and P2 are coincident (that is, when 0066 //! IsDone returns false), the Status function returns gce_ConfusedPoints. 0067 Standard_EXPORT GC_MakeLine(const gp_Pnt& P1, const gp_Pnt& P2); 0068 0069 //! Returns the constructed line. 0070 //! Exceptions StdFail_NotDone if no line is constructed. 0071 Standard_EXPORT const Handle(Geom_Line)& Value() const; 0072 0073 operator const Handle(Geom_Line) & () const { return Value(); } 0074 0075 private: 0076 Handle(Geom_Line) TheLine; 0077 }; 0078 0079 #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 |
|