summaryrefslogtreecommitdiff
path: root/src/IGESDraw/IGESDraw_SegmentedViewsVisible.cxx
blob: 66c831304152174c824f9709948226e9e073d4bd (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
//--------------------------------------------------------------------
//
//  File Name : IGESDraw_SegmentedViewsVisible.cxx
//  Date      :
//  Author    : CKY / Contract Toubro-Larsen
//  Copyright : MATRA-DATAVISION 1993
//
//--------------------------------------------------------------------

#include <IGESDraw_SegmentedViewsVisible.ixx>


    IGESDraw_SegmentedViewsVisible::IGESDraw_SegmentedViewsVisible ()    {  }


    void IGESDraw_SegmentedViewsVisible::Init
  (const Handle(IGESDraw_HArray1OfViewKindEntity)&  allViews,
   const Handle(TColStd_HArray1OfReal)&             allBreakpointParameters,
   const Handle(TColStd_HArray1OfInteger)&          allDisplayFlags,
   const Handle(TColStd_HArray1OfInteger)&          allColorValues,
   const Handle(IGESGraph_HArray1OfColor)&          allColorDefinitions,
   const Handle(TColStd_HArray1OfInteger)&          allLineFontValues,
   const Handle(IGESBasic_HArray1OfLineFontEntity)& allLineFontDefinitions,
   const Handle(TColStd_HArray1OfInteger)&          allLineWeights)
{
  Standard_Integer Len = allViews->Length();
  if ( allViews->Lower() != 1 ||
      (allBreakpointParameters->Lower() != 1 || allBreakpointParameters->Length() != Len) ||
      (allDisplayFlags->Lower() != 1 || allDisplayFlags->Length() != Len) ||
      (allColorValues->Lower()  != 1 || allColorValues->Length()  != Len) ||
      (allColorDefinitions->Lower() != 1 || allColorDefinitions->Length() != Len) ||
      (allLineFontValues->Lower()   != 1 || allLineFontValues->Length()   != Len) ||
      (allLineFontDefinitions->Lower() != 1 || allLineFontDefinitions->Length()  != Len) ||
      (allLineWeights->Lower()  != 1 || allLineWeights->Length()  != Len) )
    Standard_DimensionMismatch::Raise("IGESDraw_SegmentedViewsVisible : Init");

  theViews                = allViews;
  theBreakpointParameters = allBreakpointParameters;
  theDisplayFlags         = allDisplayFlags;
  theColorValues          = allColorValues;
  theColorDefinitions     = allColorDefinitions;
  theLineFontValues       = allLineFontValues;
  theLineFontDefinitions  = allLineFontDefinitions;
  theLineWeights          = allLineWeights;
  InitTypeAndForm(402,19);
}

    Standard_Boolean IGESDraw_SegmentedViewsVisible::IsSingle () const
{
  return Standard_False;
}

    Standard_Integer IGESDraw_SegmentedViewsVisible::NbViews () const
{
  return theViews->Length();
}

    Standard_Integer IGESDraw_SegmentedViewsVisible::NbSegmentBlocks () const
{
  return theViews->Length();
}

    Handle(IGESData_ViewKindEntity) IGESDraw_SegmentedViewsVisible::ViewItem
  (const Standard_Integer ViewIndex) const
{
  return theViews->Value(ViewIndex);
}

    Standard_Real IGESDraw_SegmentedViewsVisible::BreakpointParameter
  (const Standard_Integer BreakpointIndex) const
{
  return theBreakpointParameters->Value(BreakpointIndex);
}

    Standard_Integer IGESDraw_SegmentedViewsVisible::DisplayFlag
  (const Standard_Integer FlagIndex) const
{
  return theDisplayFlags->Value(FlagIndex);
}

    Standard_Boolean IGESDraw_SegmentedViewsVisible::IsColorDefinition
  (const Standard_Integer ColorIndex) const
{
  return ( !theColorDefinitions->Value(ColorIndex).IsNull() );
}

    Standard_Integer IGESDraw_SegmentedViewsVisible::ColorValue
  (const Standard_Integer ColorIndex) const
{
  return theColorValues->Value(ColorIndex);
}

    Handle(IGESGraph_Color) IGESDraw_SegmentedViewsVisible::ColorDefinition
  (const Standard_Integer ColorIndex) const
{
  return theColorDefinitions->Value(ColorIndex);
}

    Standard_Boolean IGESDraw_SegmentedViewsVisible::IsFontDefinition
  (const Standard_Integer FontIndex) const
{
  return ( !theLineFontDefinitions->Value(FontIndex).IsNull() );
}

    Standard_Integer IGESDraw_SegmentedViewsVisible::LineFontValue
  (const Standard_Integer FontIndex) const
{
  return theLineFontValues->Value(FontIndex);
}

    Handle(IGESData_LineFontEntity) 
    IGESDraw_SegmentedViewsVisible::LineFontDefinition
  (const Standard_Integer FontIndex) const
{
  return theLineFontDefinitions->Value(FontIndex);
}

    Standard_Integer IGESDraw_SegmentedViewsVisible::LineWeightItem
  (const Standard_Integer WeightIndex) const
{
  return theLineWeights->Value(WeightIndex);
}