b311480e |
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 |
5 | -- |
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. |
10 | -- |
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. |
13 | -- |
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. |
20 | |
7fd59977 |
21 | |
22 | class SplitCurve from ShapeUpgrade inherits TShared from MMgt |
23 | |
24 | ---Purpose: Splits a curve with a criterion. |
25 | |
26 | uses |
27 | Curve from Geom, |
28 | HArray1OfCurve from TColGeom, |
29 | HSequenceOfReal from TColStd, |
30 | Shape from GeomAbs, |
31 | Status from ShapeExtend |
32 | is |
33 | |
34 | Create returns mutable SplitCurve from ShapeUpgrade; |
35 | ---Purpose: Empty constructor. |
36 | |
37 | Init (me: mutable; First, Last: Real); |
38 | ---Purpose: Initializes with curve first and last parameters. |
39 | |
40 | SetSplitValues (me: mutable; SplitValues: HSequenceOfReal from TColStd); |
41 | ---Purpose: Sets the parameters where splitting has to be done. |
42 | |
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. |
48 | -- |
49 | |
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 |
54 | |
55 | |
56 | ---Level: Internal |
57 | |
58 | --PrepareKnots (me: mutable) is protected; |
59 | ---Purpose: Merges input split values and new ones into myGlobalKnots |
60 | |
61 | Compute(me: mutable) is virtual; |
62 | ---Purpose: Calculates points for correction/splitting of the curve |
63 | |
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(). |
67 | |
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 |
74 | fields |
75 | |
76 | mySplitValues : HSequenceOfReal from TColStd is protected; |
77 | myNbCurves : Integer is protected; |
78 | myStatus : Integer is protected; |
79 | end; |
80 | |