1 -- Created on: 1994-09-01
2 -- Created by: Christian CAILLET
3 -- Copyright (c) 1994-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.
19 ---Purpose : This package is intended to gather geometric conversion which
20 -- are not immediate but can be used for several purposes :
21 -- mainly, standard conversion to and from CasCade geometric and
22 -- topologic data, and adaptations of IGES files as required
23 -- (as replacing Spline entities to BSpline equivalents).
25 uses Standard, gp, TColgp, Geom, Geom2d, IGESGeom
30 ---Purpose : basic tool to build curves from IGESGeom (arrays of points,
31 -- Transformations, evaluation of points in a datum)
34 (igesent : SplineCurve from IGESGeom;
35 epscoef, epsgeom : Real;
36 result : out BSplineCurve from Geom)
38 ---Purpose : Converts a SplineCurve from IGES to a BSplineCurve from CasCade
39 -- <epscoef> gives tolerance to consider coefficient to be nul
40 -- <epsgeom> gives tolerance to consider poles to be equal
41 -- The returned value is a status with these possible values :
43 -- - 1 the result is not guaranteed to be C0 (with <epsgeom>)
44 -- - 2 SplineType not processed (allowed : max 3)
45 -- (no result produced)
46 -- - 3 error during creation of control points
47 -- (no result produced)
48 -- - 4 polynomial equation is not correct (no result produced)
49 -- - 5 less than one segment (no result produced)
51 IncreaseCurveContinuity
52 (curve : BSplineCurve from Geom;
54 continuity : Integer = 2) returns Integer;
55 ---Purpose : Tries to increase curve continuity with tolerance <epsgeom>
56 -- <continuity> is the new desired continuity, can be 1 or 2
57 -- (more than 2 is considered as 2).
58 -- Returns the new maximum continuity obtained on all knots.
59 -- Remark that, for instance with <continuity> = 2, even if not
60 -- all the knots can be passed to C2, all knots which can be are.
62 IncreaseCurveContinuity
63 (curve : BSplineCurve from Geom2d;
65 continuity : Integer = 2) returns Integer;
68 (igesent : SplineSurface from IGESGeom;
69 epscoef, epsgeom : Real;
70 result : out BSplineSurface from Geom)
72 ---Purpose : Converts a SplineSurface from IGES to a BSplineSurface from CasCade
73 -- <epscoef> gives tolerance to consider coefficient to be nul
74 -- <epsgeom> gives tolerance to consider poles to be equal
75 -- The returned value is a status with these possible values :
77 -- - 1 the result is not guaranteed to be C0 (with <epsgeom>)
78 -- - 2 degree is not compatible with code boundary type
79 -- (warning) but C0 is OK
80 -- - 3 idem but C0 is not guaranteed (warning)
81 -- - 4 degree has been determined to be nul, either in U or V
82 -- (no result produced)
83 -- - 5 less than one segment in U or V (no result produced)
85 IncreaseSurfaceContinuity
86 (surface : BSplineSurface from Geom;
88 continuity : Integer = 2) returns Integer;
89 ---Purpose : Tries to increase Surface continuity with tolerance <epsgeom>
90 -- <continuity> is the new desired continuity, can be 1 or 2
91 -- (more than 2 is considered as 2).
92 -- Returns the new maximum continuity obtained on all knots.
93 -- Remark that, for instance with <continuity> = 2, even if not
94 -- all the knots can be passed to C2, all knots which can be are.