0024002: Overall code and build procedure refactoring -- automatic
[occt.git] / src / IGESConvGeom / IGESConvGeom.hxx
CommitLineData
42cf5bc1 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
5//
6// This file is part of Open CASCADE Technology software library.
7//
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.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _IGESConvGeom_HeaderFile
18#define _IGESConvGeom_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Standard_Integer.hxx>
25#include <Standard_Real.hxx>
26class IGESGeom_SplineCurve;
27class Geom_BSplineCurve;
28class Geom2d_BSplineCurve;
29class IGESGeom_SplineSurface;
30class Geom_BSplineSurface;
31class IGESConvGeom_GeomBuilder;
32
33
34//! This package is intended to gather geometric conversion which
35//! are not immediate but can be used for several purposes :
36//! mainly, standard conversion to and from CasCade geometric and
37//! topologic data, and adaptations of IGES files as required
38//! (as replacing Spline entities to BSpline equivalents).
39class IGESConvGeom
40{
41public:
42
43 DEFINE_STANDARD_ALLOC
44
45
46 //! basic tool to build curves from IGESGeom (arrays of points,
47 //! Transformations, evaluation of points in a datum)
48 //! Converts a SplineCurve from IGES to a BSplineCurve from CasCade
49 //! <epscoef> gives tolerance to consider coefficient to be nul
50 //! <epsgeom> gives tolerance to consider poles to be equal
51 //! The returned value is a status with these possible values :
52 //! - 0 OK, done
53 //! - 1 the result is not guaranteed to be C0 (with <epsgeom>)
54 //! - 2 SplineType not processed (allowed : max 3)
55 //! (no result produced)
56 //! - 3 error during creation of control points
57 //! (no result produced)
58 //! - 4 polynomial equation is not correct (no result produced)
59 //! - 5 less than one segment (no result produced)
60 Standard_EXPORT static Standard_Integer SplineCurveFromIGES (const Handle(IGESGeom_SplineCurve)& igesent, const Standard_Real epscoef, const Standard_Real epsgeom, Handle(Geom_BSplineCurve)& result);
61
62 //! Tries to increase curve continuity with tolerance <epsgeom>
63 //! <continuity> is the new desired continuity, can be 1 or 2
64 //! (more than 2 is considered as 2).
65 //! Returns the new maximum continuity obtained on all knots.
66 //! Remark that, for instance with <continuity> = 2, even if not
67 //! all the knots can be passed to C2, all knots which can be are.
68 Standard_EXPORT static Standard_Integer IncreaseCurveContinuity (const Handle(Geom_BSplineCurve)& curve, const Standard_Real epsgeom, const Standard_Integer continuity = 2);
69
70 Standard_EXPORT static Standard_Integer IncreaseCurveContinuity (const Handle(Geom2d_BSplineCurve)& curve, const Standard_Real epsgeom, const Standard_Integer continuity = 2);
71
72 //! 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 :
76 //! - 0 OK, done
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)
84 Standard_EXPORT static Standard_Integer SplineSurfaceFromIGES (const Handle(IGESGeom_SplineSurface)& igesent, const Standard_Real epscoef, const Standard_Real epsgeom, Handle(Geom_BSplineSurface)& result);
85
86 //! Tries to increase Surface continuity with tolerance <epsgeom>
87 //! <continuity> is the new desired continuity, can be 1 or 2
88 //! (more than 2 is considered as 2).
89 //! Returns the new maximum continuity obtained on all knots.
90 //! Remark that, for instance with <continuity> = 2, even if not
91 //! all the knots can be passed to C2, all knots which can be are.
92 Standard_EXPORT static Standard_Integer IncreaseSurfaceContinuity (const Handle(Geom_BSplineSurface)& surface, const Standard_Real epsgeom, const Standard_Integer continuity = 2);
93
94
95
96
97protected:
98
99
100
101
102
103private:
104
105
106
107
108friend class IGESConvGeom_GeomBuilder;
109
110};
111
112
113
114
115
116
117
118#endif // _IGESConvGeom_HeaderFile