blob: 31bdeb800254266e12adb9bdaabbbd6edda0aa28 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
#include <IGESSelect_SplineToBSpline.ixx>
#include <IGESData_IGESEntity.hxx>
#include <Interface_Macros.hxx>
#include <Interface_Check.hxx>
IGESSelect_SplineToBSpline::IGESSelect_SplineToBSpline
(const Standard_Boolean tryC2)
{
thetryc2 = tryC2; thefound = Standard_False;
}
Standard_Boolean IGESSelect_SplineToBSpline::OptionTryC2 () const
{
return thetryc2;
}
Standard_Boolean IGESSelect_SplineToBSpline::Perform
(const Interface_Graph& G, const Handle(Interface_Protocol)&,
Interface_CheckIterator& checks,
Handle(Interface_InterfaceModel)& newmod)
{
Standard_Integer nbe = G.Size();
thefound = Standard_False;
themap.Nullify();
for (Standard_Integer i = 1; i <= nbe; i ++) {
DeclareAndCast(IGESData_IGESEntity,ent,G.Entity(i));
if (ent.IsNull()) continue;
Standard_Integer it = ent->TypeNumber();
if (it == 112 || it == 126) {
thefound = Standard_True;
#ifdef DEB
cout<<"IGESSelect_SplineToBSpline : n0."<<i
<< (it == 112 ? ", Curve" : ", Surface")<<" to convert"<<endl;
#endif
}
}
newmod.Nullify();
if (!thefound) return Standard_True;
// Il faudrait convertir ...
checks.CCheck(0)->AddFail("IGESSelect_SplineToBSpline : not yet implemented");
return Standard_False;
}
Standard_Boolean IGESSelect_SplineToBSpline::Updated
(const Handle(Standard_Transient)& entfrom,
Handle(Standard_Transient)& entto) const
{
if (!thefound) {
entto = entfrom;
return Standard_True;
}
if (themap.IsNull()) return Standard_False;
return themap->Search(entfrom,entto);
}
TCollection_AsciiString IGESSelect_SplineToBSpline::Label () const
{
if (thetryc2) return TCollection_AsciiString
("Convert Spline Forms to BSpline, trying to recover C1-C2 continuity");
else return TCollection_AsciiString ("Convert Spline Forms to BSpline");
}
|