0030686: Visualization, SelectMgr_ViewerSelector - sorting issues of transformation...
[occt.git] / src / ShapeUpgrade / ShapeUpgrade_SplitCurve.hxx
CommitLineData
42cf5bc1 1// Created on: 1998-03-12
2// Created by: Pierre BARRAS
3// Copyright (c) 1998-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _ShapeUpgrade_SplitCurve_HeaderFile
18#define _ShapeUpgrade_SplitCurve_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <TColStd_HSequenceOfReal.hxx>
24#include <Standard_Integer.hxx>
25e59720 25#include <Standard_Transient.hxx>
42cf5bc1 26#include <Standard_Real.hxx>
27#include <Standard_Boolean.hxx>
28#include <ShapeExtend_Status.hxx>
29
9fd2d2c3 30// resolve name collisions with X11 headers
31#ifdef Status
32 #undef Status
33#endif
42cf5bc1 34
35class ShapeUpgrade_SplitCurve;
25e59720 36DEFINE_STANDARD_HANDLE(ShapeUpgrade_SplitCurve, Standard_Transient)
42cf5bc1 37
38//! Splits a curve with a criterion.
25e59720 39class ShapeUpgrade_SplitCurve : public Standard_Transient
42cf5bc1 40{
41
42public:
43
44
45 //! Empty constructor.
46 Standard_EXPORT ShapeUpgrade_SplitCurve();
47
48 //! Initializes with curve first and last parameters.
49 Standard_EXPORT void Init (const Standard_Real First, const Standard_Real Last);
50
51 //! Sets the parameters where splitting has to be done.
52 Standard_EXPORT void SetSplitValues (const Handle(TColStd_HSequenceOfReal)& SplitValues);
53
54 //! If Segment is True, the result is composed with
55 //! segments of the curve bounded by the SplitValues. If
56 //! Segment is False, the result is composed with trimmed
57 //! Curves all based on the same complete curve.
58 Standard_EXPORT virtual void Build (const Standard_Boolean Segment);
59
60 //! returns all the splitting values including the
61 //! First and Last parameters of the input curve
62 //! Merges input split values and new ones into myGlobalKnots
63 Standard_EXPORT const Handle(TColStd_HSequenceOfReal)& SplitValues() const;
64
65 //! Calculates points for correction/splitting of the curve
66 Standard_EXPORT virtual void Compute();
67
68 //! Performs correction/splitting of the curve.
69 //! First defines splitting values by method Compute(), then calls method Build().
70 Standard_EXPORT void Perform (const Standard_Boolean Segment = Standard_True);
71
72 //! Returns the status
73 //! OK - no splitting is needed
74 //! DONE1 - splitting required and gives more than one segment
75 //! DONE2 - splitting is required, but gives only one segment (initial)
76 //! DONE3 - geometric form of the curve or parametrisation is modified
77 Standard_EXPORT Standard_Boolean Status (const ShapeExtend_Status status) const;
78
79
80
81
25e59720 82 DEFINE_STANDARD_RTTIEXT(ShapeUpgrade_SplitCurve,Standard_Transient)
42cf5bc1 83
84protected:
85
86
87 Handle(TColStd_HSequenceOfReal) mySplitValues;
88 Standard_Integer myNbCurves;
89 Standard_Integer myStatus;
90
91
92private:
93
94
95
96
97};
98
99
100
101
102
103
104
105#endif // _ShapeUpgrade_SplitCurve_HeaderFile