7fd59977 |
1 | //-------------------------------------------------------------------- |
2 | // |
3 | // File Name : IGESGeom_Boundary.cxx |
4 | // Date : |
5 | // Author : CKY / Contract Toubro-Larsen |
6 | // Copyright : MATRA-DATAVISION 1993 |
7 | // |
8 | //-------------------------------------------------------------------- |
9 | |
10 | #include <IGESGeom_Boundary.ixx> |
11 | |
12 | |
13 | IGESGeom_Boundary::IGESGeom_Boundary () { } |
14 | |
15 | |
16 | void IGESGeom_Boundary::Init |
17 | (const Standard_Integer aType, |
18 | const Standard_Integer aPreference, |
19 | const Handle(IGESData_IGESEntity)& aSurface, |
20 | const Handle(IGESData_HArray1OfIGESEntity)& allModelCurves, |
21 | const Handle(TColStd_HArray1OfInteger)& allSenses, |
22 | const Handle(IGESBasic_HArray1OfHArray1OfIGESEntity)& allParameterCurves) |
23 | { |
24 | Standard_Integer num1 = allSenses->Length(); |
25 | if ( allSenses->Lower() != 1 || |
26 | (allModelCurves->Lower() != 1 || allModelCurves->Length() != num1) || |
27 | (allParameterCurves->Lower() != 1 || allParameterCurves->Length() != num1)) |
28 | Standard_DimensionMismatch::Raise("IGESGeom_Boundary: Init"); |
29 | |
30 | theType = aType; |
31 | thePreference = aPreference; |
32 | theSurface = aSurface; |
33 | theModelCurves = allModelCurves; |
34 | theSenses = allSenses; |
35 | theParameterCurves = allParameterCurves; |
36 | InitTypeAndForm(141,0); |
37 | } |
38 | |
39 | |
40 | Standard_Integer IGESGeom_Boundary::BoundaryType () const |
41 | { |
42 | return theType; |
43 | } |
44 | |
45 | Standard_Integer IGESGeom_Boundary::PreferenceType () const |
46 | { |
47 | return thePreference; |
48 | } |
49 | |
50 | Handle(IGESData_IGESEntity) IGESGeom_Boundary::Surface () const |
51 | { |
52 | return theSurface; |
53 | } |
54 | |
55 | Standard_Integer IGESGeom_Boundary::NbModelSpaceCurves () const |
56 | { |
57 | return theModelCurves->Length(); |
58 | } |
59 | |
60 | Standard_Integer IGESGeom_Boundary::Sense (const Standard_Integer Index) const |
61 | { |
62 | return theSenses->Value(Index); |
63 | } |
64 | |
65 | Handle(IGESData_IGESEntity) IGESGeom_Boundary::ModelSpaceCurve |
66 | (const Standard_Integer Index) const |
67 | { |
68 | return theModelCurves->Value(Index); |
69 | } |
70 | |
71 | Standard_Integer IGESGeom_Boundary::NbParameterCurves |
72 | (const Standard_Integer Index) const |
73 | { |
74 | if (theParameterCurves->Value(Index).IsNull()) return 0; |
75 | return theParameterCurves->Value(Index)->Length(); |
76 | } |
77 | |
78 | Handle(IGESData_HArray1OfIGESEntity) IGESGeom_Boundary::ParameterCurves |
79 | (const Standard_Integer Index) const |
80 | { |
81 | return theParameterCurves->Value(Index); |
82 | } |
83 | |
84 | Handle(IGESData_IGESEntity) IGESGeom_Boundary::ParameterCurve |
85 | (const Standard_Integer Index, const Standard_Integer Num) const |
86 | { |
87 | return theParameterCurves->Value(Index)->Value(Num); |
88 | } |