1 -- Created on: 1998-03-16
2 -- Created by: Pierre BARRAS
3 -- Copyright (c) 1998-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class SplitSurface from ShapeUpgrade inherits TShared from MMgt
19 ---Purpose: Splits a Surface with a criterion.
22 HArray1OfInteger from TColStd,
23 HSequenceOfReal from TColStd,
24 HArray2OfSurface from TColGeom,
26 Status from ShapeExtend,
27 CompositeSurface from ShapeExtend
31 Create returns SplitSurface from ShapeUpgrade;
32 ---Purpose: Empty constructor.
34 Init (me: mutable; S: Surface from Geom);
35 ---Purpose: Initializes with single supporting surface.
37 Init (me: mutable; S: Surface from Geom; UFirst,ULast,VFirst,VLast : Real);
38 ---Purpose: Initializes with single supporting surface with bounding parameters.
40 SetUSplitValues(me: mutable; UValues : HSequenceOfReal from TColStd);
41 ---Purpose: Sets U parameters where splitting has to be done
43 SetVSplitValues(me: mutable; VValues : HSequenceOfReal from TColStd);
44 ---Purpose: Sets V parameters where splitting has to be done
46 Build (me: mutable; Segment: Boolean) is virtual;
47 ---Purpose: Performs splitting of the supporting surface.
48 -- If resulting surface is B-Spline and Segment is True,
49 -- the result is composed with segments of the surface bounded
50 -- by the U and V SplitValues (method Geom_BSplineSurface::Segment
52 -- If Segment is False, the result is composed with
53 -- Geom_RectangularTrimmedSurface all based on the same complete
55 -- Fields myNbResultingRow and myNbResultingCol must be set to
56 -- specify the size of resulting grid of surfaces.
57 Compute(me: mutable; Segment: Boolean = Standard_True) is virtual;
58 ---Purpose: Calculates points for correction/splitting of the surface.
60 Perform(me: mutable; Segment: Boolean = Standard_True);
61 ---Purpose: Performs correction/splitting of the surface.
62 --- First defines splitting values by method Compute(), then calls method Build().
63 USplitValues(me) returns HSequenceOfReal from TColStd;
64 ---C++: return const &
65 --- Purpose : returns all the U splitting values including the
66 -- First and Last parameters of the input surface
67 VSplitValues(me) returns HSequenceOfReal from TColStd;
68 ---C++: return const &
69 --- Purpose : returns all the splitting V values including the
70 -- First and Last parameters of the input surface
73 Status (me; status: Status from ShapeExtend) returns Boolean;
74 ---Purpose: Returns the status
75 -- OK - no splitting is needed
76 -- DONE1 - splitting required and gives more than one patch
77 -- DONE2 - splitting is required, but gives only single patch (initial)
78 -- DONE3 - geometric form of the surface or parametrisation is modified
80 ResSurfaces(me) returns CompositeSurface from ShapeExtend;
81 ---C++: return const &
82 ---Purpose: Returns obtained surfaces after splitting as CompositeSurface
86 myUSplitValues : HSequenceOfReal from TColStd is protected;
87 myVSplitValues : HSequenceOfReal from TColStd is protected;
88 myNbResultingRow : Integer is protected;
89 myNbResultingCol : Integer is protected;
90 mySurface : Surface from Geom is protected;
91 myStatus : Integer is protected;
92 myResSurfaces : CompositeSurface from ShapeExtend is protected;