AssociativePoint.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------------------+
2 |
3 | Supplied under applicable software license agreement.
4 |
5 | Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
6 |
7 +---------------------------------------------------------------------------------------*/
8 #pragma once
9 
11 
12 /*=================================================================================**/
37 {
39  {
40  CREATE_ASSOC_Normal = 0,
41  CREATE_ASSOC_DisallowFarElm = (1 << 0),
42  CREATE_ASSOC_DisallowCustom = (1 << 1),
43  CREATE_ASSOC_AllowAdjustedPoints = (1 << 2),
44  };
45 
47  {
48  CREATE_ASSOC_MASK_DIMENSION = (1 << 0),
49  CREATE_ASSOC_MASK_MLINE = (1 << 1),
50  CREATE_ASSOC_MASK_CELLS = (1 << 2),
51  CREATE_ASSOC_MASK_LINEAR = (1 << 3),
52  CREATE_ASSOC_MASK_NOTE = (1 << 4),
53  CREATE_ASSOC_MASK_TEXT = (1 << 5),
54  };
55 
57  {
58  ARC_ANGLE = 0,
59  ARC_CENTER = 1,
60  ARC_START = 2,
61  ARC_END = 3,
62  };
63 
64 
70 DGNPLATFORM_EXPORT static BentleyStatus IsValid
71 (
72 AssocPoint& assocPoint,
73 DgnModelRefP pathRoot,
74 DgnModelRefP parentModel
75 );
76 
86 DGNPLATFORM_EXPORT static BentleyStatus SetRoot
87 (
88 AssocPoint& assocPoint,
89 ElementId elemId,
90 ElementId refAttId,
91 int rootIndex = 0
92 );
93 
103 DGNPLATFORM_EXPORT static BentleyStatus SetRoot
104 (
105 AssocPoint& assocPoint,
106 DisplayPathCP path,
107 DgnModelRefP parentModel,
108 bool allowFarElm,
109 int rootIndex = 0
110 );
111 
119 DGNPLATFORM_EXPORT static BentleyStatus GetRoot
120 (
121 DisplayPathP path, // <=> seed display path
122 int* nRootsP, // <= intersect assoc will return 2, all others return 1
123 AssocPoint const& assocPoint, // => assoc point to build a displaypath for
124 DgnModelRefP modelRef, // => model ref of element this assoc is from
125 int rootIndex = 0 // => which root to get (Use 0 for single elem assoc
126 );
127 
136 DGNPLATFORM_EXPORT static void InitKeypoint
137 (
138 AssocPoint& assocPoint,
139 UShort vertex,
140 UShort nVertex,
141 UShort numerator,
142 UShort divisor
143 );
144 
149 DGNPLATFORM_EXPORT static void InitOrigin
150 (
151 AssocPoint& assocPoint,
152 UShort option
153 );
154 
164 DGNPLATFORM_EXPORT static void InitArc
165 (
166 AssocPoint& assocPoint,
167 ArcLocation keyPoint,
168 double angle = 0.0
169 );
170 
176 DGNPLATFORM_EXPORT static void InitProjection
177 (
178 AssocPoint& assocPoint,
179 UShort vertex,
180 UShort nVertex,
181 double ratio
182 );
183 
191 DGNPLATFORM_EXPORT static void InitMline
192 (
193 AssocPoint& assocPoint,
194 UShort vertex,
195 UShort nVertex,
196 UShort lineNo,
197 double offset,
198 bool joint
199 );
200 
204 DGNPLATFORM_EXPORT static void InitBCurve
205 (
206 AssocPoint& assocPoint,
207 double uParam
208 );
209 
214 DGNPLATFORM_EXPORT static void InitBSurface
215 (
216 AssocPoint& assocPoint,
217 double uParam,
218 double vParam
219 );
220 
226 DGNPLATFORM_EXPORT static void InitMeshEdge
227 (
228 AssocPoint& assocPoint,
229 int edgeIndex,
230 int nEdge,
231 double uParam
232 );
233 
238 DGNPLATFORM_EXPORT static void InitMeshVertex
239 (
240 AssocPoint& assocPoint,
241 int vertexIndex,
242 int nVertex
243 );
244 
252 DGNPLATFORM_EXPORT static void InitIntersection
253 (
254 AssocPoint& assocPoint,
255 byte index,
256 UShort seg1,
257 UShort seg2,
258 int nSeg1,
259 int nSeg2
260 );
261 
268 DGNPLATFORM_EXPORT static StatusInt ExtractPoint
269 (
270 AssocPoint& assocPoint,
271 ElementHandleCR element,
272 int pointNum,
273 int maxPoints
274 );
275 
283 DGNPLATFORM_EXPORT static StatusInt InsertPoint
284 (
285 EditElementHandleR element,
286 AssocPoint const& assocPoint,
287 int pointNum,
288 int maxPoints
289 );
290 
296 DGNPLATFORM_EXPORT static BentleyStatus GetPoint
297 (
298 DPoint3dP outPoint,
299 AssocPoint const& assocPoint,
300 DgnModelRefP modelRef
301 );
302 
308 DGNPLATFORM_EXPORT static StatusInt RemovePoint
309 (
310 EditElementHandleR element,
311 int pointNum,
312 int maxPoints
313 );
314 
318 DGNPLATFORM_EXPORT static StatusInt RemoveAllAssociations
319 (
320 EditElementHandleR element
321 );
322 
330 DGNPLATFORM_EXPORT static StatusInt CreateFromSnap
331 (
332 AssocPoint& assocPoint,
333 SnapPathCP pathIn,
334 int modifierMask,
335 DgnModelRefP parentModel,
336 CreateOptions options
337 );
338 
340 DGNPLATFORM_EXPORT static void RegisterExtensions ();
341 
342 }; // AssociativePoint
343 
344 
346 
#define END_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:69
CreateOptions
Definition: AssociativePoint.h:38
A writeable "handle" to an MSElement.
Definition: ElementHandle.h:470
#define DGNPLATFORM_EXPORT
Definition: DgnPlatform/ExportMacros.h:58
ArcLocation
Definition: AssociativePoint.h:56
Definition: AssociativePoint.h:36
CreateMask
Definition: AssociativePoint.h:46
Definition: DisplayPath.h:38
Definition: DgnPlatform.h:1622
struct DgnPlatform::SnapPath const * SnapPathCP
Definition: DgnPlatform.h:451
struct DgnPlatform::DisplayPath const * DisplayPathCP
Definition: DgnPlatform.h:236
3d point coordinates.
Definition: dpoint3d.h:19
BentleyStatus
Definition: Bentley.h:208
A DgnModelRef provides access to a model in a Bentley::DgnPlatform::DgnFile.
Definition: DgnModelRef.h:172
unsigned short UShort
Definition: Bentley.r.h:133
unsigned char byte
Definition: Bentley.r.h:144
#define BEGIN_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:68
int StatusInt
Definition: Bentley.h:222
UInt64 ElementId
Definition: DgnPlatformBaseType.r.h:83
struct DgnPlatform::ElementHandle const & ElementHandleCR
Definition: DgnPlatform.h:260

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.