1 -- Created on: 1998-03-12
2 -- Created by: Pierre BARRAS
3 -- Copyright (c) 1998-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
22 class SplitCurve from ShapeUpgrade inherits TShared from MMgt
24 ---Purpose: Splits a curve with a criterion.
28 HArray1OfCurve from TColGeom,
29 HSequenceOfReal from TColStd,
31 Status from ShapeExtend
34 Create returns mutable SplitCurve from ShapeUpgrade;
35 ---Purpose: Empty constructor.
37 Init (me: mutable; First, Last: Real);
38 ---Purpose: Initializes with curve first and last parameters.
40 SetSplitValues (me: mutable; SplitValues: HSequenceOfReal from TColStd);
41 ---Purpose: Sets the parameters where splitting has to be done.
43 Build (me: mutable; Segment: Boolean) is virtual;
44 ---Purpose: If Segment is True, the result is composed with
45 -- segments of the curve bounded by the SplitValues. If
46 -- Segment is False, the result is composed with trimmed
47 -- Curves all based on the same complete curve.
50 SplitValues(me) returns HSequenceOfReal from TColStd;
51 ---C++: return const &
52 --- Purpose : returns all the splitting values including the
53 -- First and Last parameters of the input curve
58 --PrepareKnots (me: mutable) is protected;
59 ---Purpose: Merges input split values and new ones into myGlobalKnots
61 Compute(me: mutable) is virtual;
62 ---Purpose: Calculates points for correction/splitting of the curve
64 Perform(me: mutable; Segment: Boolean = Standard_True);
65 ---Purpose: Performs correction/splitting of the curve.
66 --- First defines splitting values by method Compute(), then calls method Build().
68 Status (me; status: Status from ShapeExtend) returns Boolean;
69 ---Purpose: Returns the status
70 -- OK - no splitting is needed
71 -- DONE1 - splitting required and gives more than one segment
72 -- DONE2 - splitting is required, but gives only one segment (initial)
73 -- DONE3 - geometric form of the curve or parametrisation is modified
76 mySplitValues : HSequenceOfReal from TColStd is protected;
77 myNbCurves : Integer is protected;
78 myStatus : Integer is protected;