|
|
|||
File indexing completed on 2026-11-28 10:21:39
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 <NCollection_Sequence.hxx> 0024 #include <NCollection_HSequence.hxx> 0025 #include <Standard_Integer.hxx> 0026 #include <Standard_Transient.hxx> 0027 #include <ShapeExtend_Status.hxx> 0028 0029 // resolve name collisions with X11 headers 0030 #ifdef Status 0031 #undef Status 0032 #endif 0033 0034 //! Splits a curve with a criterion. 0035 class ShapeUpgrade_SplitCurve : public Standard_Transient 0036 { 0037 0038 public: 0039 //! Empty constructor. 0040 Standard_EXPORT ShapeUpgrade_SplitCurve(); 0041 0042 //! Initializes with curve first and last parameters. 0043 Standard_EXPORT void Init(const double First, const double Last); 0044 0045 //! Sets the parameters where splitting has to be done. 0046 Standard_EXPORT void SetSplitValues( 0047 const occ::handle<NCollection_HSequence<double>>& SplitValues); 0048 0049 //! If Segment is True, the result is composed with 0050 //! segments of the curve bounded by the SplitValues. If 0051 //! Segment is False, the result is composed with trimmed 0052 //! Curves all based on the same complete curve. 0053 Standard_EXPORT virtual void Build(const bool Segment); 0054 0055 //! returns all the splitting values including the 0056 //! First and Last parameters of the input curve 0057 //! Merges input split values and new ones into myGlobalKnots 0058 Standard_EXPORT const occ::handle<NCollection_HSequence<double>>& SplitValues() const; 0059 0060 //! Calculates points for correction/splitting of the curve 0061 Standard_EXPORT virtual void Compute(); 0062 0063 //! Performs correction/splitting of the curve. 0064 //! First defines splitting values by method Compute(), then calls method Build(). 0065 Standard_EXPORT void Perform(const bool Segment = true); 0066 0067 //! Returns the status 0068 //! OK - no splitting is needed 0069 //! DONE1 - splitting required and gives more than one segment 0070 //! DONE2 - splitting is required, but gives only one segment (initial) 0071 //! DONE3 - geometric form of the curve or parametrisation is modified 0072 Standard_EXPORT bool Status(const ShapeExtend_Status status) const; 0073 0074 DEFINE_STANDARD_RTTIEXT(ShapeUpgrade_SplitCurve, Standard_Transient) 0075 0076 protected: 0077 occ::handle<NCollection_HSequence<double>> mySplitValues; 0078 int myNbCurves; 0079 int myStatus; 0080 }; 0081 0082 #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 |
|