CFx SDK Documentation  2023 SP0
AECGridAssemblyCell.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 
24 #ifndef __AECGRIDASSEMBLYCELL_H__
25 #define __AECGRIDASSEMBLYCELL_H__
26 
28 #include <Ge/GePoint2d.h>
29 
30 class AECGeProfile;
33 
39 class AECBASE_API AECGridAssemblyCell : public AECLayoutCell
40 {
42 
43  public:
50  void GetCellPath( std::vector<OdUInt16>& aPath ) const;
51 
58  void SetCellPath( const std::vector<OdUInt16>& aPath );
59 
67 
74  void SetCellAssignmentIndex( OdUInt16 iCellAssignmentIndex );
75 
85  bool GetInfillIndex( OdUInt16& iIndex ) const;
86 
96  void SetInfillIndex( OdUInt16 iIndex );
97 
109 
120  void SetInfillStyle( const OdDbObjectId& hpidInfillStyle );
121 
125  bool IsConsumed() const;
126 
130  void SetIsConsumed( bool bOn );
131 
135  bool IsRectangular() const;
136 
140  void SetIsRectangular( bool bOn );
141 
145  bool IsSplitted() const;
146 
150  void SetIsSplitted( bool bOn );
151 
155  bool IsCutStartMiter() const;
156 
160  void SetIsCutStartMiter( bool bOn );
161 
165  bool IsCutEndMiter() const;
166 
170  void SetIsCutEndMiter( bool bOn );
171 
178  void GetMinMaxPoints( OdGePoint2d& ptLower, OdGePoint2d& ptUpper ) const;
179 
186  void SetMinMaxPoints( const OdGePoint2d& ptLower, const OdGePoint2d& ptUpper );
187 
194  void GetInteriorMinMaxPoints( OdGePoint2d& ptLower, OdGePoint2d& ptUpper ) const;
195 
202  void SetInteriorMinMaxPoints( const OdGePoint2d& ptLower, const OdGePoint2d& ptUpper );
203 
211 
216 
221 
222  protected:
224  // This union represents first flags group structure.
225  union Flags1
226  {
228  struct
229  {
230 #ifdef ODA_BIGENDIAN
231  OdUInt16 uReserved3 : 8;
232  OdUInt16 bConsumed : 1;
233  OdUInt16 uReserved2 : 1;
234  OdUInt16 bCutEndMiter : 1;
235  OdUInt16 bCutStartMiter : 1;
236  OdUInt16 bHasCellOverride : 1;
237  OdUInt16 uReserved1 : 1;
238  OdUInt16 bNonRectangular : 1;
239  OdUInt16 bNonSplitted : 1;
240 #else
250 #endif
251  } m_bBits;
252  };
253 
254  protected:
255  // First flag structure for grid assembly cell descriptor.
257 
258  // Index of the cell assignment applied to this cell.
260 
261  // "Infill" entity.
262  // The to pointer the cell`s interior will be filled with while rendering.
264 
265  // The minimum x-coordinate of a cell`s interior.
266  // Used only for rectangular cells.
268 
269  // The maximum x-coordinate of a cell`s interior.
270  // Used only for rectangular cells.
272 
273  // The minimum y-coordinate of a cell`s interior.
274  // Used only for rectangular cells.
276 
277  // The maximum y-coordinate of a cell`s interior.
278  // Used only for rectangular cells.
280 
281  // Interior profile.
282  // Used only for non-rectangular cells.
284 
285  // The minimum x-coordinate of a cell.
286  double m_dMinX;
287 
288  // The maximum x-coordinate of a cell.
289  double m_dMaxX;
290 
291  // The minimum y-coordinate of a cell.
292  double m_dMinY;
293 
294  // The maximum y-coordinate of a cell.
295  double m_dMaxY;
296 
297  // The overridden infill index.
298  // Used and present in file data only with *bHasCellOverride* flag on.
300 
301  // Array of indices each is the index of cell in some hierarchy level.
302  // The start index is the level in top most hierarchy.
303  std::vector<OdUInt16> m_aPathToCell;
304 };
305 
308 
309 #endif //__AECGRIDASSEMBLYCELL_H__
OdSmartPtr< AECGridAssemblyCell > AECGridAssemblyCellPtr
OdSmartPtr< AECGeProfile > AECGeProfilePtr
AECSubPtr< AECGridAssemblyCell > AECGridAssemblyCellSubPtr
AECSubPtr< AECGeProfile > AECGeProfileSubPtr
#define AEC_DECLARE_MEMBERS(ClassName)
Definition: AECMacros.h:54
unsigned short OdUInt16
void GetInteriorMinMaxPoints(OdGePoint2d &ptLower, OdGePoint2d &ptUpper) const
bool IsRectangular() const
bool IsConsumed() const
void GetCellPath(std::vector< OdUInt16 > &aPath) const
void SetInfillStyle(const OdDbObjectId &hpidInfillStyle)
void SetIsConsumed(bool bOn)
void SetInfillIndex(OdUInt16 iIndex)
OdDbHardPointerId m_hpidInfillStyle
void SetInteriorMinMaxPoints(const OdGePoint2d &ptLower, const OdGePoint2d &ptUpper)
std::vector< OdUInt16 > m_aPathToCell
void SetIsRectangular(bool bOn)
OdUInt16 GetCellAssignmentIndex() const
void SetIsCutStartMiter(bool bOn)
AECGeProfileSubPtr GetInteriorProfile() const
void SetCellPath(const std::vector< OdUInt16 > &aPath)
void SetIsSplitted(bool bOn)
void SetIsCutEndMiter(bool bOn)
void SetCellAssignmentIndex(OdUInt16 iCellAssignmentIndex)
void GetMinMaxPoints(OdGePoint2d &ptLower, OdGePoint2d &ptUpper) const
OdDbObjectId GetInfillStyle() const
bool IsCutEndMiter() const
AECGeProfilePtr m_pInteriorProfile
void SetMinMaxPoints(const OdGePoint2d &ptLower, const OdGePoint2d &ptUpper)
bool IsCutStartMiter() const
bool IsSplitted() const
void RemoveInteriorProfile()
AECGeProfileSubPtr NewInteriorProfile()
bool GetInfillIndex(OdUInt16 &iIndex) const