|
|
|||
File indexing completed on 2026-10-04 09:14:51
0001 // Created on: 1994-09-01 0002 // Created by: Christian CAILLET 0003 // Copyright (c) 1994-1999 Matra Datavision 0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS 0005 // 0006 // This file is part of Open CASCADE Technology software library. 0007 // 0008 // This library is free software; you can redistribute it and/or modify it under 0009 // the terms of the GNU Lesser General Public License version 2.1 as published 0010 // by the Free Software Foundation, with special exception defined in the file 0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0012 // distribution for complete text of the license and disclaimer of any warranty. 0013 // 0014 // Alternatively, this file may be used under the terms of Open CASCADE 0015 // commercial license or contractual agreement. 0016 0017 #ifndef _IGESConvGeom_HeaderFile 0018 #define _IGESConvGeom_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <Standard_Integer.hxx> 0025 #include <Standard_Real.hxx> 0026 class IGESGeom_SplineCurve; 0027 class Geom_BSplineCurve; 0028 class Geom2d_BSplineCurve; 0029 class IGESGeom_SplineSurface; 0030 class Geom_BSplineSurface; 0031 0032 //! This package is intended to gather geometric conversion which 0033 //! are not immediate but can be used for several purposes : 0034 //! mainly, standard conversion to and from CasCade geometric and 0035 //! topologic data, and adaptations of IGES files as required 0036 //! (as replacing Spline entities to BSpline equivalents). 0037 class IGESConvGeom 0038 { 0039 public: 0040 DEFINE_STANDARD_ALLOC 0041 0042 //! basic tool to build curves from IGESGeom (arrays of points, 0043 //! Transformations, evaluation of points in a datum) 0044 //! Converts a SplineCurve from IGES to a BSplineCurve from CasCade 0045 //! <epscoef> gives tolerance to consider coefficient to be nul 0046 //! <epsgeom> gives tolerance to consider poles to be equal 0047 //! The returned value is a status with these possible values : 0048 //! - 0 OK, done 0049 //! - 1 the result is not guaranteed to be C0 (with <epsgeom>) 0050 //! - 2 SplineType not processed (allowed : max 3) 0051 //! (no result produced) 0052 //! - 3 error during creation of control points 0053 //! (no result produced) 0054 //! - 4 polynomial equation is not correct (no result produced) 0055 //! - 5 less than one segment (no result produced) 0056 Standard_EXPORT static int SplineCurveFromIGES(const occ::handle<IGESGeom_SplineCurve>& igesent, 0057 const double epscoef, 0058 const double epsgeom, 0059 occ::handle<Geom_BSplineCurve>& result); 0060 0061 //! Tries to increase curve continuity with tolerance <epsgeom> 0062 //! <continuity> is the new desired continuity, can be 1 or 2 0063 //! (more than 2 is considered as 2). 0064 //! Returns the new maximum continuity obtained on all knots. 0065 //! Remark that, for instance with <continuity> = 2, even if not 0066 //! all the knots can be passed to C2, all knots which can be are. 0067 Standard_EXPORT static int IncreaseCurveContinuity(const occ::handle<Geom_BSplineCurve>& curve, 0068 const double epsgeom, 0069 const int continuity = 2); 0070 0071 Standard_EXPORT static int IncreaseCurveContinuity(const occ::handle<Geom2d_BSplineCurve>& curve, 0072 const double epsgeom, 0073 const int continuity = 2); 0074 0075 //! Converts a SplineSurface from IGES to a BSplineSurface from CasCade 0076 //! <epscoef> gives tolerance to consider coefficient to be nul 0077 //! <epsgeom> gives tolerance to consider poles to be equal 0078 //! The returned value is a status with these possible values : 0079 //! - 0 OK, done 0080 //! - 1 the result is not guaranteed to be C0 (with <epsgeom>) 0081 //! - 2 degree is not compatible with code boundary type 0082 //! (warning) but C0 is OK 0083 //! - 3 idem but C0 is not guaranteed (warning) 0084 //! - 4 degree has been determined to be nul, either in U or V 0085 //! (no result produced) 0086 //! - 5 less than one segment in U or V (no result produced) 0087 Standard_EXPORT static int SplineSurfaceFromIGES( 0088 const occ::handle<IGESGeom_SplineSurface>& igesent, 0089 const double epscoef, 0090 const double epsgeom, 0091 occ::handle<Geom_BSplineSurface>& result); 0092 0093 //! Tries to increase Surface continuity with tolerance <epsgeom> 0094 //! <continuity> is the new desired continuity, can be 1 or 2 0095 //! (more than 2 is considered as 2). 0096 //! Returns the new maximum continuity obtained on all knots. 0097 //! Remark that, for instance with <continuity> = 2, even if not 0098 //! all the knots can be passed to C2, all knots which can be are. 0099 Standard_EXPORT static int IncreaseSurfaceContinuity( 0100 const occ::handle<Geom_BSplineSurface>& surface, 0101 const double epsgeom, 0102 const int continuity = 2); 0103 }; 0104 0105 #endif // _IGESConvGeom_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|