CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
DbManagerSubentData.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, 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 Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 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 _DBMANAGERSUBENTDATA_INCLUDED_
25#define _DBMANAGERSUBENTDATA_INCLUDED_
26
27#include <OdaCommon.h>
28#include "UInt32Array.h"
29#include "DoubleArray.h"
30
36{
38 kFace = 3,
39 kEdge = 4,
41 kFillet = 6
42};
43
49{
50public:
52 virtual ~SubentDataBase() {};
53 virtual OdResult init(const OdUInt32Array& arr) = 0;
54};
55
61{
62
68{
69 //The number ids in second part.
70 //Usually it is 1 and sec number contain sec number in persubent attribute.
71 //There are another case.
72 //For example 5(m_lNumbIds) 1000000000 1001 1000000000 1002 1000000000 1003 1000000000 1004 1000000000 1
73 OdUInt32Array m_lEntTplIdArr;
74
75public:
77 {}
78
79 void set(const OdUInt32* pStart, OdUInt32& iShiftArr)
80 {
81 OdUInt32 iNumbIds = *(pStart + iShiftArr++);
82 if(iNumbIds > 0)
83 {
84 iNumbIds = iNumbIds*2;
85 m_lEntTplIdArr.resize(iNumbIds);
86 for (OdUInt32 i = 0; i < iNumbIds; ++i)
87 {
88 m_lEntTplIdArr.setAt(i, *(pStart + iShiftArr++));
89 }
90 }
91 }
92
93 OdUInt32Array& SubentDataArr() { return m_lEntTplIdArr; }
94};
96
102{
108};
110
116{
117 OdUInt32 m_iStIndex;
118 PerSubentData m_mainSubEntity; //The subentity which was used in operation. (For example set color)
119 PerSubentDataArray m_arrFaces;
120 OdUInt32 m_ivtxIndex1, m_ivtxIndex2;
121 PerSubentData m_vtxSubEntity1, m_vtxSubEntity2; //Vertices of the edge.
122 PerSubentDataArray m_arrFacesVtx1, m_arrFacesVtx2;//Arrays of faces which includes the vertex.
123 OdUInt32Array m_arrFPart1, m_arrFPart2;
124public:
125 EdgeData() : m_ivtxIndex1(0), m_ivtxIndex2(0), m_iStIndex(0) {};
126 virtual ~EdgeData() {};
127 virtual OdResult init(const OdUInt32Array& arr);
128};
129
135{
136 PerSubentData m_mainSubEntity; //The subentity which was used in operation. (For example set color)
137 PerSubentDataArray m_arrPerSubData;
138 OdUInt32Array m_arrLastPart;
139public:
141 virtual ~FaceData() {};
142 virtual OdResult init(const OdUInt32Array& arr);
144};
145
151{
152 SubentType m_SubentType;
153
154 OdUInt32 m_iFSize;// The size for first block ???
155 SubentDataBase* m_pSubData;
156public:
159 {
160 if (m_pSubData)
161 delete m_pSubData;
162 };
163 SubentType& getSubentType() {return m_SubentType;};
165;};
167
173{
174 FilletSubentDataArray m_dataArr;
175public:
177 virtual ~FilletData() {};
178 virtual OdResult init(const OdUInt32Array& arr);
179};
180
186{
187 PerSubentData m_mainSubEntity; //The subentity which was used in operation. (For example set color)
188 PerSubentDataArray m_arrPerSubData;
189 OdUInt32Array m_arrLastPart;
190public:
193 virtual OdResult init(const OdUInt32Array& arr);
194};
195
196};
197
203{
204 SubentType m_SubentType; // 3 - face, 4 - edge, 6 - chamfer, fillet.
205 //First elemet is history element id. (SubentColor, SubEntMaterial, Fillet, chamfer)
206 //Array indexes of entities in composite entity. (First number in persubent attribute.)
207 //In case face. Array faces and after it array edges.
210
212 {}
214 {
215 if (m_pSubData)
216 {
217 delete m_pSubData;
218 m_pSubData = NULL;
220 }
221 };
222};
224
225#endif //_DBMANAGERSUBENTDATA_INCLUDED_
226
@ kFillet
@ kUnknown
@ kFilletPart
OdArray< SubentData > SubentDataArray
unsigned int OdUInt32
OdResult
Definition: OdResult.h:29
OdArray & setAt(size_type arrayIndex, const T &value)
Definition: OdArray.h:1668
void resize(size_type logicalLength, const T &value)
Definition: OdArray.h:1185
virtual OdResult init(const OdUInt32Array &arr)
virtual OdResult init(const OdUInt32Array &arr)
virtual OdResult init(const OdUInt32Array &arr)
virtual OdResult init(const OdUInt32Array &arr)
OdResult parseSubData(const OdUInt32Array &arr, OdUInt32 &iShiftArr)
void set(const OdUInt32 *pStart, OdUInt32 &iShiftArr)
virtual ~SubentDataBase()
virtual OdResult init(const OdUInt32Array &arr)=0
OdArray< FilletSubentData > FilletSubentDataArray
OdArray< PerSubentData > PerSubentDataArray
OdArray< SubentRWData > SubentRWDataArray
SubentType m_SubentType
SubentDataBase * m_pSubData
OdUInt32Array m_arrMgrEntityId