1 // Created on: 1993-01-09 2 // Created by: CKY / Contract Toubro-Larsen ( TCD ) 3 // Copyright (c) 1993-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 _IGESDraw_SegmentedViewsVisible_HeaderFile 18 #define _IGESDraw_SegmentedViewsVisible_HeaderFile 19 20 #include <Standard.hxx> 21 #include <Standard_Type.hxx> 22 23 #include <IGESDraw_HArray1OfViewKindEntity.hxx> 24 #include <TColStd_HArray1OfReal.hxx> 25 #include <TColStd_HArray1OfInteger.hxx> 26 #include <IGESGraph_HArray1OfColor.hxx> 27 #include <IGESBasic_HArray1OfLineFontEntity.hxx> 28 #include <IGESData_ViewKindEntity.hxx> 29 #include <Standard_Boolean.hxx> 30 #include <Standard_Integer.hxx> 31 #include <Standard_Real.hxx> 32 class IGESGraph_Color; 33 class IGESData_LineFontEntity; 34 35 36 class IGESDraw_SegmentedViewsVisible; 37 DEFINE_STANDARD_HANDLE(IGESDraw_SegmentedViewsVisible, IGESData_ViewKindEntity) 38 39 //! defines IGESSegmentedViewsVisible, Type <402> Form <19> 40 //! in package IGESDraw 41 //! 42 //! Permits the association of display parameters with the 43 //! segments of curves in a given view 44 class IGESDraw_SegmentedViewsVisible : public IGESData_ViewKindEntity 45 { 46 47 public: 48 49 50 Standard_EXPORT IGESDraw_SegmentedViewsVisible(); 51 52 //! This method is used to set the fields of the class 53 //! SegmentedViewsVisible 54 //! - allViews : Pointers to View Entities 55 //! - allBreakpointParameters : Parameters of breakpoints 56 //! - allDisplayFlags : Display flags 57 //! - allColorValues : Color Values 58 //! - allColorDefinitions : Color Definitions 59 //! - allLineFontValues : LineFont values 60 //! - allLineFontDefinitions : LineFont Definitions 61 //! - allLineWeights : Line weights 62 //! raises exception if Lengths of allViews, allBreakpointParameters, 63 //! allDisplayFlags, allColorValues, allColorDefinitions, 64 //! allLineFontValues, allLineFontDefinitions and allLineWeights 65 //! are not same. 66 Standard_EXPORT void 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); 67 68 //! Returns False (for a complex view) 69 Standard_EXPORT Standard_Boolean IsSingle() const Standard_OVERRIDE; 70 71 //! Returns the count of Views referenced by <me> (inherited) 72 Standard_EXPORT Standard_Integer NbViews() const Standard_OVERRIDE; 73 74 //! returns the number of view/segment blocks in <me> 75 //! Similar to NbViews but has a more general significance 76 Standard_EXPORT Standard_Integer NbSegmentBlocks() const; 77 78 //! returns the View entity indicated by ViewIndex 79 //! raises an exception if ViewIndex <= 0 or 80 //! ViewIndex > NbSegmentBlocks() 81 Standard_EXPORT Handle(IGESData_ViewKindEntity) ViewItem (const Standard_Integer ViewIndex) const Standard_OVERRIDE; 82 83 //! returns the parameter of the breakpoint indicated by 84 //! BreakpointIndex 85 //! raises an exception if BreakpointIndex <= 0 or 86 //! BreakpointIndex > NbSegmentBlocks(). 87 Standard_EXPORT Standard_Real BreakpointParameter (const Standard_Integer BreakpointIndex) const; 88 89 //! returns the Display flag indicated by FlagIndex 90 //! raises an exception if FlagIndex <= 0 or 91 //! FlagIndex > NbSegmentBlocks(). 92 Standard_EXPORT Standard_Integer DisplayFlag (const Standard_Integer FlagIndex) const; 93 94 //! returns True if the ColorIndex'th value of the 95 //! "theColorDefinitions" field of <me> is a pointer 96 //! raises an exception if ColorIndex <= 0 or 97 //! ColorIndex > NbSegmentBlocks(). 98 Standard_EXPORT Standard_Boolean IsColorDefinition (const Standard_Integer ColorIndex) const; 99 100 //! returns the Color value indicated by ColorIndex 101 //! raises an exception if ColorIndex <= 0 or 102 //! ColorIndex > NbSegmentBlocks(). 103 Standard_EXPORT Standard_Integer ColorValue (const Standard_Integer ColorIndex) const; 104 105 //! returns the Color definition entity indicated by ColorIndex 106 //! raises an exception if ColorIndex <= 0 or 107 //! ColorIndex > NbSegmentBlocks(). 108 Standard_EXPORT Handle(IGESGraph_Color) ColorDefinition (const Standard_Integer ColorIndex) const; 109 110 //! returns True if the FontIndex'th value of the 111 //! "theLineFontDefinitions" field of <me> is a pointer 112 //! raises an exception if FontIndex <= 0 or 113 //! FontIndex > NbSegmentBlocks(). 114 Standard_EXPORT Standard_Boolean IsFontDefinition (const Standard_Integer FontIndex) const; 115 116 //! returns the LineFont value indicated by FontIndex 117 //! raises an exception if FontIndex <= 0 or 118 //! FontIndex > NbSegmentBlocks(). 119 Standard_EXPORT Standard_Integer LineFontValue (const Standard_Integer FontIndex) const; 120 121 //! returns the LineFont definition entity indicated by FontIndex 122 //! raises an exception if FontIndex <= 0 or 123 //! FontIndex > NbSegmentBlocks(). 124 Standard_EXPORT Handle(IGESData_LineFontEntity) LineFontDefinition (const Standard_Integer FontIndex) const; 125 126 //! returns the LineWeight value indicated by WeightIndex 127 //! raises an exception if WeightIndex <= 0 or 128 //! WeightIndex > NbSegmentBlocks(). 129 Standard_EXPORT Standard_Integer LineWeightItem (const Standard_Integer WeightIndex) const; 130 131 132 133 134 DEFINE_STANDARD_RTTIEXT(IGESDraw_SegmentedViewsVisible,IGESData_ViewKindEntity) 135 136 protected: 137 138 139 140 141 private: 142 143 144 Handle(IGESDraw_HArray1OfViewKindEntity) theViews; 145 Handle(TColStd_HArray1OfReal) theBreakpointParameters; 146 Handle(TColStd_HArray1OfInteger) theDisplayFlags; 147 Handle(TColStd_HArray1OfInteger) theColorValues; 148 Handle(IGESGraph_HArray1OfColor) theColorDefinitions; 149 Handle(TColStd_HArray1OfInteger) theLineFontValues; 150 Handle(IGESBasic_HArray1OfLineFontEntity) theLineFontDefinitions; 151 Handle(TColStd_HArray1OfInteger) theLineWeights; 152 153 154 }; 155 156 157 158 159 160 161 162 #endif // _IGESDraw_SegmentedViewsVisible_HeaderFile 163