Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:03

0001 // Created on: 1994-06-02
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 _IGESSelect_SplineToBSpline_HeaderFile
0018 #define _IGESSelect_SplineToBSpline_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <IFSelect_Transformer.hxx>
0024 class Interface_CopyControl;
0025 class Interface_Graph;
0026 class Interface_Protocol;
0027 class Interface_CheckIterator;
0028 class Interface_InterfaceModel;
0029 class Standard_Transient;
0030 class TCollection_AsciiString;
0031 
0032 
0033 class IGESSelect_SplineToBSpline;
0034 DEFINE_STANDARD_HANDLE(IGESSelect_SplineToBSpline, IFSelect_Transformer)
0035 
0036 //! This type of Transformer allows to convert Spline Curves (IGES
0037 //! type 112) and Surfaces (IGES Type 126) to BSpline Curves (IGES
0038 //! type 114) and Surfac (IGES Type 128). All other entities are
0039 //! rebuilt as identical but on the basis of this conversion.
0040 //!
0041 //! It also gives an option to, either convert as such (i.e. each
0042 //! starting part of the spline becomes a segment of the bspline,
0043 //! with continuity C0 between segments), or try to increase
0044 //! continuity as far as possible to C1 or to C2.
0045 //!
0046 //! It does nothing if the starting model contains no Spline
0047 //! Curve (IGES Type 112) or Surface (IGES Type 126). Else,
0048 //! converting and rebuilding implies copying of entities.
0049 class IGESSelect_SplineToBSpline : public IFSelect_Transformer
0050 {
0051 
0052 public:
0053 
0054   
0055   //! Creates a Transformer SplineToBSpline. If <tryC2> is True,
0056   //! it will in addition try to upgrade continuity up to C2.
0057   Standard_EXPORT IGESSelect_SplineToBSpline(const Standard_Boolean tryC2);
0058   
0059   //! Returns the option TryC2 given at creation time
0060   Standard_EXPORT Standard_Boolean OptionTryC2() const;
0061   
0062   //! Performs the transformation, if there is at least one Spline
0063   //! Curve (112) or Surface (126). Does nothing if there is none.
0064   Standard_EXPORT Standard_Boolean Perform (const Interface_Graph& G, const Handle(Interface_Protocol)& protocol, Interface_CheckIterator& checks, Handle(Interface_InterfaceModel)& newmod) Standard_OVERRIDE;
0065   
0066   //! Returns the transformed entities.
0067   //! If original data contained no Spline Curve or Surface,
0068   //! the result is identity : <entto> = <entfrom>
0069   //! Else, the copied counterpart is returned : for a Spline Curve
0070   //! or Surface, it is a converted BSpline Curve or Surface. Else,
0071   //! it is the result of general service Copy (rebuilt as necessary
0072   //! by BSPlines replacing Splines).
0073   Standard_EXPORT Standard_Boolean Updated (const Handle(Standard_Transient)& entfrom, Handle(Standard_Transient)& entto) const Standard_OVERRIDE;
0074   
0075   //! Returns a text which defines the way a Transformer works :
0076   //! "Conversion Spline to BSpline" and as opted,
0077   //! " trying to upgrade continuity"
0078   Standard_EXPORT TCollection_AsciiString Label() const Standard_OVERRIDE;
0079 
0080 
0081 
0082 
0083   DEFINE_STANDARD_RTTIEXT(IGESSelect_SplineToBSpline,IFSelect_Transformer)
0084 
0085 protected:
0086 
0087 
0088 
0089 
0090 private:
0091 
0092 
0093   Standard_Boolean thetryc2;
0094   Standard_Boolean thefound;
0095   Handle(Interface_CopyControl) themap;
0096 
0097 
0098 };
0099 
0100 
0101 
0102 
0103 
0104 
0105 
0106 #endif // _IGESSelect_SplineToBSpline_HeaderFile