1 -- Created on: 1992-05-22
2 -- Created by: Jean Claude VAUTHIER
3 -- Copyright (c) 1992-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.
23 class BSplineSurface from DrawTrSurf
25 inherits Surface from DrawTrSurf
28 -- This class defines a drawable BSplineSurface.
29 -- With this class you can draw the control points and the knots
31 -- You can use the general class Surface from DrawTrSurf too,
32 -- if you just want to sea boundaries and isoparametric curves.
34 uses BSplineSurface from Geom,
36 MarkerShape from Draw,
44 Create (S : BSplineSurface from Geom)
45 returns mutable BSplineSurface from DrawTrSurf;
46 --- Purpose : default drawing mode.
47 -- The isoparametric curves corresponding to the knots values are
49 -- The control points and the knots points are drawn.
50 -- The boundaries are yellow, the isoparametric curves are blues.
51 -- For the discretisation 50 points are computed in each parametric
55 Create (S : BSplineSurface from Geom;
56 BoundsColor, IsosColor, PolesColor, KnotsColor : Color from Draw;
57 KnotsShape : MarkerShape from Draw; KnotsSize : Integer;
58 ShowPoles, ShowKnots : Boolean; Discret : Integer; Deflection : Real;
60 returns mutable BSplineSurface from DrawTrSurf;
62 -- The isoparametric curves corresponding to the knots values are
67 Create (S : BSplineSurface from Geom;
68 NbUIsos, NbVIsos : Integer;
69 BoundsColor, IsosColor, PolesColor, KnotsColor : Color from Draw;
70 KnotsShape : MarkerShape from Draw; KnotsSize : Integer;
71 ShowPoles, ShowKnots : Boolean; Discret : Integer; Deflection : Real;
73 returns mutable BSplineSurface from DrawTrSurf;
74 --- Purpose : Parametric equidistant iso curves are drawn.
77 DrawOn (me; dis : in out Display from Draw)
81 ShowPoles (me : mutable)
85 ShowKnots (me : mutable)
89 ShowIsos (me : mutable; Nu, Nv : Integer)
90 --- Purpose : change the number of isoparametric curves to be drawn.
94 ShowKnotsIsos (me : mutable)
95 --- Purpose : change the number of isoparametric curves to be drawn.
99 ClearIsos (me : mutable)
100 --- Purpose : rub out all the isoparametric curves.
104 ClearPoles (me : mutable)
108 ClearKnots (me : mutable)
112 FindPole(me; X,Y : Real; D : Display from Draw; Prec : Real;
113 UIndex, VIndex : in out Integer)
117 FindUKnot(me; X,Y : Real; D : Display from Draw; Prec : Real;
118 UIndex : in out Integer)
122 FindVKnot(me; X,Y : Real; D : Display from Draw; Prec : Real;
123 VIndex : in out Integer)
127 SetPolesColor (me : mutable; aColor : Color from Draw)
132 SetKnotsColor (me : mutable; aColor : Color from Draw)
137 SetKnotsShape (me : mutable; Shape : MarkerShape from Draw)
142 KnotsShape (me) returns MarkerShape from Draw
147 KnotsColor (me) returns Color from Draw
152 PolesColor (me) returns Color from Draw
156 Copy(me) returns mutable Drawable3D from Draw
157 ---Purpose: For variable copy.
166 knotsForm : MarkerShape from Draw;
167 knotsLook : Color from Draw;
169 polesLook : Color from Draw;