|
||||
File indexing completed on 2025-01-18 10:04:58
0001 // Created on: 1998-03-12 0002 // Created by: Pierre BARRAS 0003 // Copyright (c) 1998-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 _ShapeUpgrade_SplitCurve_HeaderFile 0018 #define _ShapeUpgrade_SplitCurve_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_Type.hxx> 0022 0023 #include <TColStd_HSequenceOfReal.hxx> 0024 #include <Standard_Integer.hxx> 0025 #include <Standard_Transient.hxx> 0026 #include <ShapeExtend_Status.hxx> 0027 0028 // resolve name collisions with X11 headers 0029 #ifdef Status 0030 #undef Status 0031 #endif 0032 0033 class ShapeUpgrade_SplitCurve; 0034 DEFINE_STANDARD_HANDLE(ShapeUpgrade_SplitCurve, Standard_Transient) 0035 0036 //! Splits a curve with a criterion. 0037 class ShapeUpgrade_SplitCurve : public Standard_Transient 0038 { 0039 0040 public: 0041 0042 0043 //! Empty constructor. 0044 Standard_EXPORT ShapeUpgrade_SplitCurve(); 0045 0046 //! Initializes with curve first and last parameters. 0047 Standard_EXPORT void Init (const Standard_Real First, const Standard_Real Last); 0048 0049 //! Sets the parameters where splitting has to be done. 0050 Standard_EXPORT void SetSplitValues (const Handle(TColStd_HSequenceOfReal)& SplitValues); 0051 0052 //! If Segment is True, the result is composed with 0053 //! segments of the curve bounded by the SplitValues. If 0054 //! Segment is False, the result is composed with trimmed 0055 //! Curves all based on the same complete curve. 0056 Standard_EXPORT virtual void Build (const Standard_Boolean Segment); 0057 0058 //! returns all the splitting values including the 0059 //! First and Last parameters of the input curve 0060 //! Merges input split values and new ones into myGlobalKnots 0061 Standard_EXPORT const Handle(TColStd_HSequenceOfReal)& SplitValues() const; 0062 0063 //! Calculates points for correction/splitting of the curve 0064 Standard_EXPORT virtual void Compute(); 0065 0066 //! Performs correction/splitting of the curve. 0067 //! First defines splitting values by method Compute(), then calls method Build(). 0068 Standard_EXPORT void Perform (const Standard_Boolean Segment = Standard_True); 0069 0070 //! Returns the status 0071 //! OK - no splitting is needed 0072 //! DONE1 - splitting required and gives more than one segment 0073 //! DONE2 - splitting is required, but gives only one segment (initial) 0074 //! DONE3 - geometric form of the curve or parametrisation is modified 0075 Standard_EXPORT Standard_Boolean Status (const ShapeExtend_Status status) const; 0076 0077 0078 0079 0080 DEFINE_STANDARD_RTTIEXT(ShapeUpgrade_SplitCurve,Standard_Transient) 0081 0082 protected: 0083 0084 0085 Handle(TColStd_HSequenceOfReal) mySplitValues; 0086 Standard_Integer myNbCurves; 0087 Standard_Integer myStatus; 0088 0089 0090 private: 0091 0092 0093 0094 0095 }; 0096 0097 0098 0099 0100 0101 0102 0103 #endif // _ShapeUpgrade_SplitCurve_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |