|
||||
File indexing completed on 2025-01-18 10:03:31
0001 // Created on: 1991-03-05 0002 // Created by: Remy GILET 0003 // Copyright (c) 1991-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 _GccEnt_HeaderFile 0018 #define _GccEnt_HeaderFile 0019 0020 #include <GccEnt_Position.hxx> 0021 #include <Standard.hxx> 0022 #include <Standard_DefineAlloc.hxx> 0023 #include <Standard_Handle.hxx> 0024 #include <Standard_OStream.hxx> 0025 0026 class GccEnt_QualifiedLin; 0027 class gp_Lin2d; 0028 class GccEnt_QualifiedCirc; 0029 class gp_Circ2d; 0030 0031 0032 //! This package provides an implementation of the qualified 0033 //! entities useful to create 2d entities with geometric 0034 //! constraints. The qualifier explains which subfamily of 0035 //! solutions we want to obtain. It uses the following law: the 0036 //! matter/the interior side is at the left of the line, if we go 0037 //! from the beginning to the end. 0038 //! The qualifiers are: 0039 //! Enclosing : the solution(s) must enclose the argument. 0040 //! Enclosed : the solution(s) must be enclosed in the 0041 //! argument. 0042 //! Outside : both the solution(s) and the argument must be 0043 //! outside to each other. 0044 //! Unqualified : the position is undefined, so give all the 0045 //! solutions. 0046 //! The use of a qualifier is always required if such 0047 //! subfamilies exist. For example, it is not used for a point. 0048 //! Note: the interior of a curve is defined as the left-hand 0049 //! side of the curve in relation to its orientation. 0050 class GccEnt 0051 { 0052 public: 0053 0054 DEFINE_STANDARD_ALLOC 0055 0056 0057 //! Prints the name of Position type as a String on the Stream. 0058 static Standard_OStream& Print (const GccEnt_Position thePosition, Standard_OStream& theStream) 0059 { 0060 return (theStream << PositionToString (thePosition)); 0061 } 0062 0063 //! Returns the string name for a given position. 0064 //! @param thePosition position type 0065 //! @return string identifier from the list UNQUALIFIED ENCLOSING ENCLOSED OUTSIDE NOQUALIFIER 0066 Standard_EXPORT static Standard_CString PositionToString (GccEnt_Position thePosition); 0067 0068 //! Returns the position from the given string identifier (using case-insensitive comparison). 0069 //! @param thePositionString string identifier 0070 //! @return position or GccEnt_unqualified if string identifier is invalid 0071 static GccEnt_Position PositionFromString (Standard_CString thePositionString) 0072 { 0073 GccEnt_Position aPosition = GccEnt_unqualified; 0074 PositionFromString (thePositionString, aPosition); 0075 return aPosition; 0076 } 0077 0078 //! Determines the position from the given string identifier (using case-insensitive comparison). 0079 //! @param thePositionString string identifier 0080 //! @param thePosition detected shape type 0081 //! @return TRUE if string identifier is known 0082 Standard_EXPORT static Standard_Boolean PositionFromString (Standard_CString thePositionString, 0083 GccEnt_Position& thePosition); 0084 0085 //! Constructs a qualified line, 0086 //! so that the relative position to the circle or line of the 0087 //! solution computed by a construction algorithm using the 0088 //! qualified circle or line is not qualified, i.e. all solutions apply. 0089 Standard_EXPORT static GccEnt_QualifiedLin Unqualified (const gp_Lin2d& Obj); 0090 0091 //! Constructs a qualified circle 0092 //! so that the relative position to the circle or line of the 0093 //! solution computed by a construction algorithm using the 0094 //! qualified circle or line is not qualified, i.e. all solutions apply. 0095 Standard_EXPORT static GccEnt_QualifiedCirc Unqualified (const gp_Circ2d& Obj); 0096 0097 0098 //! Constructs such a qualified circle that the solution 0099 //! computed by a construction algorithm using the qualified 0100 //! circle encloses the circle. 0101 Standard_EXPORT static GccEnt_QualifiedCirc Enclosing (const gp_Circ2d& Obj); 0102 0103 //! Constructs a qualified line, 0104 //! so that the solution computed by a construction 0105 //! algorithm using the qualified circle or line is enclosed by 0106 //! the circle or line. 0107 Standard_EXPORT static GccEnt_QualifiedLin Enclosed (const gp_Lin2d& Obj); 0108 0109 //! Constructs a qualified circle 0110 //! so that the solution computed by a construction 0111 //! algorithm using the qualified circle or line is enclosed by 0112 //! the circle or line. 0113 Standard_EXPORT static GccEnt_QualifiedCirc Enclosed (const gp_Circ2d& Obj); 0114 0115 //! Constructs a qualified line, 0116 //! so that the solution computed by a construction 0117 //! algorithm using the qualified circle or line and the circle 0118 //! or line are external to one another. 0119 Standard_EXPORT static GccEnt_QualifiedLin Outside (const gp_Lin2d& Obj); 0120 0121 //! Constructs a qualified circle 0122 //! so that the solution computed by a construction 0123 //! algorithm using the qualified circle or line and the circle 0124 //! or line are external to one another. 0125 Standard_EXPORT static GccEnt_QualifiedCirc Outside (const gp_Circ2d& Obj); 0126 0127 }; 0128 0129 #endif // _GccEnt_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |