0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / IGESSelect / IGESSelect_SplineToBSpline.hxx
CommitLineData
42cf5bc1 1// Created on: 1994-06-02
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 _IGESSelect_SplineToBSpline_HeaderFile
18#define _IGESSelect_SplineToBSpline_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
42cf5bc1 23#include <IFSelect_Transformer.hxx>
24class Interface_CopyControl;
25class Interface_Graph;
26class Interface_Protocol;
27class Interface_CheckIterator;
28class Interface_InterfaceModel;
29class Standard_Transient;
30class TCollection_AsciiString;
31
32
33class IGESSelect_SplineToBSpline;
34DEFINE_STANDARD_HANDLE(IGESSelect_SplineToBSpline, IFSelect_Transformer)
35
36//! This type of Transformer allows to convert Spline Curves (IGES
37//! type 112) and Surfaces (IGES Type 126) to BSpline Curves (IGES
38//! type 114) and Surfac (IGES Type 128). All other entities are
39//! rebuilt as identical but on the basis of this conversion.
40//!
41//! It also gives an option to, either convert as such (i.e. each
42//! starting part of the spline becomes a segment of the bspline,
43//! with continuity C0 between segments), or try to increase
44//! continuity as far as possible to C1 or to C2.
45//!
46//! It does nothing if the starting model contains no Spline
47//! Curve (IGES Type 112) or Surface (IGES Type 126). Else,
48//! converting and rebuilding implies copying of entities.
49class IGESSelect_SplineToBSpline : public IFSelect_Transformer
50{
51
52public:
53
54
55 //! Creates a Transformer SplineToBSpline. If <tryC2> is True,
56 //! it will in addition try to upgrade continuity up to C2.
57 Standard_EXPORT IGESSelect_SplineToBSpline(const Standard_Boolean tryC2);
58
59 //! Returns the option TryC2 given at creation time
60 Standard_EXPORT Standard_Boolean OptionTryC2() const;
61
62 //! Performs the transformation, if there is at least one Spline
63 //! Curve (112) or Surface (126). Does nothing if there is none.
79104795 64 Standard_EXPORT Standard_Boolean Perform (const Interface_Graph& G, const Handle(Interface_Protocol)& protocol, Interface_CheckIterator& checks, Handle(Interface_InterfaceModel)& newmod) Standard_OVERRIDE;
42cf5bc1 65
66 //! Returns the transformed entities.
67 //! If original data contained no Spline Curve or Surface,
68 //! the result is identity : <entto> = <entfrom>
69 //! Else, the copied counterpart is returned : for a Spline Curve
70 //! or Surface, it is a converted BSpline Curve or Surface. Else,
71 //! it is the result of general service Copy (rebuilt as necessary
72 //! by BSPlines replacing Splines).
79104795 73 Standard_EXPORT Standard_Boolean Updated (const Handle(Standard_Transient)& entfrom, Handle(Standard_Transient)& entto) const Standard_OVERRIDE;
42cf5bc1 74
75 //! Returns a text which defines the way a Transformer works :
76 //! "Conversion Spline to BSpline" and as opted,
77 //! " trying to upgrade continuity"
79104795 78 Standard_EXPORT TCollection_AsciiString Label() const Standard_OVERRIDE;
42cf5bc1 79
80
81
82
92efcf78 83 DEFINE_STANDARD_RTTIEXT(IGESSelect_SplineToBSpline,IFSelect_Transformer)
42cf5bc1 84
85protected:
86
87
88
89
90private:
91
92
93 Standard_Boolean thetryc2;
94 Standard_Boolean thefound;
95 Handle(Interface_CopyControl) themap;
96
97
98};
99
100
101
102
103
104
105
106#endif // _IGESSelect_SplineToBSpline_HeaderFile