DropGraphics.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 
14 
17 
19 
20 /*=================================================================================**/
27 {
28 public:
29 
30 enum Options
31 {
32 OPTION_None = (0),
33 OPTION_Text = (1<<0),
34 OPTION_Dimensions = (1<<1),
35 OPTION_Mlines = (1<<2),
36 OPTION_Complex = (1<<3),
37 OPTION_LinearSegments = (1<<4),
38 OPTION_SharedCells = (1<<5),
39 OPTION_Solids = (1<<6),
40 OPTION_AppData = (1<<7),
41 };
42 
44 {
45 DIMENSION_Geometry = 0,
46 DIMENSION_Segments = 1,
47 };
48 
50 {
51 SHAREDCELL_Geometry = 0,
52 SHAREDCELL_NormalCell = 1,
53 SHAREDCELL_NormalCellOneLevel = 2,
54 };
55 
56 enum Solids
57 {
58 SOLID_Surfaces = 0,
59 SOLID_Wireframe = 1,
60 };
61 
62 private:
63  virtual void MakeClassAbstract() = 0;
64 public:
65 public:
66 
67 DGNPLATFORM_EXPORT void SetOptions (Options options);
68 DGNPLATFORM_EXPORT Options GetOptions () const;
69 
70 DGNPLATFORM_EXPORT void SetDimensionOptions (Dimensions option);
71 DGNPLATFORM_EXPORT Dimensions GetDimensionOptions () const;
72 
73 DGNPLATFORM_EXPORT void SetSharedCellOptions (SharedCells option);
74 DGNPLATFORM_EXPORT SharedCells GetSharedCellOptions () const;
75 
76 DGNPLATFORM_EXPORT void SetSolidsOptions (Solids option);
77 DGNPLATFORM_EXPORT Solids GetSolidsOptions () const;
78 
81 DGNPLATFORM_EXPORT static DropGeometryPtr Create ();
82 
83 }; // DropGeometry
84 
86 
87 /*=================================================================================**/
94 {
95 public:
96 
97 enum Options
98 {
99 OPTION_None = (0),
100 OPTION_LineStyles = (1<<0),
101 OPTION_Patterns = (1<<1),
102 };
103 
105 {
106 BOUNDARY_Include = 0,
107 BOUNDARY_Ignore = 1,
108 BOUNDARY_Only = 2,
109 };
110 
111 private:
112  virtual void MakeClassAbstract() = 0;
113 public:
114 public:
115 
116 DGNPLATFORM_EXPORT void SetOptions (Options options);
117 DGNPLATFORM_EXPORT Options GetOptions () const;
118 
119 DGNPLATFORM_EXPORT void SetPatternIndex (int index);
120 DGNPLATFORM_EXPORT int GetPatternIndex () const;
121 
122 DGNPLATFORM_EXPORT void SetPatternBoundary (PatternBoundary boundary);
123 DGNPLATFORM_EXPORT PatternBoundary GetPatternBoundary () const;
124 
127 DGNPLATFORM_EXPORT static DropGraphicsPtr Create ();
128 
129 }; // DropGraphics
130 
131 /*=================================================================================**/
139 {
141 static DGNPLATFORM_EXPORT BentleyStatus ToElement (EditElementHandleR eeh, CurveVectorCR curves, ElementHandleCP templateEh, bool is3d, DgnModelRefR modelRef);
142 
144 static DGNPLATFORM_EXPORT BentleyStatus ToElement (EditElementHandleR eeh, ICurvePrimitiveCR curve, ElementHandleCP templateEh, bool is3d, DgnModelRefR modelRef);
145 
147 static DGNPLATFORM_EXPORT BentleyStatus ToElements (ElementAgendaR agenda, CurveVectorCR curves, ElementHandleCP templateEh, bool is3d, DgnModelRefR modelRef);
148 
150 static DGNPLATFORM_EXPORT BentleyStatus ToElement (EditElementHandleR eeh, ISolidPrimitiveCR solid, ElementHandleCP templateEh, DgnModelRefR modelRef);
151 
153 static DGNPLATFORM_EXPORT BentleyStatus ToElement (EditElementHandleR eeh, MSBsplineSurfaceCR surface, ElementHandleCP templateEh, DgnModelRefR modelRef);
154 
156 static DGNPLATFORM_EXPORT BentleyStatus ToElement (EditElementHandleR eeh, PolyfaceQueryCR meshData, ElementHandleCP templateEh, DgnModelRefR modelRef);
157 
159 static DGNPLATFORM_EXPORT BentleyStatus ToElement (EditElementHandleR eeh, ISolidKernelEntityCR entityData, ElementHandleCP templateEh, DgnModelRefR modelRef);
160 
162 static DGNPLATFORM_EXPORT BentleyStatus ToElement (EditElementHandleR eeh, IGeometryCR geom, ElementHandleCP templateEh, DgnModelRefR modelRef);
163 
165 static DGNPLATFORM_EXPORT BentleyStatus ToDroppedElements (ElementHandleCR eh, ElementAgendaR agenda, DropGraphicsCR graphics);
166 
167 }; // DraftingElementSchema
168 
170 
172 
struct PolyfaceQuery const & PolyfaceQueryCR
Definition: msgeomstructs_typedefs.h:178
#define END_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:69
SharedCells
Definition: DropGraphics.h:49
A writeable "handle" to an MSElement.
Definition: ElementHandle.h:470
struct CurveVector const & CurveVectorCR
Definition: msgeomstructs_typedefs.h:172
#define DGNPLATFORM_EXPORT
Definition: DgnPlatform/ExportMacros.h:58
PatternBoundary
Definition: DropGraphics.h:104
struct MSBsplineSurface const & MSBsplineSurfaceCR
Definition: msgeomstructs_typedefs.h:159
struct DgnPlatform::ISolidKernelEntity const & ISolidKernelEntityCR
Definition: DgnPlatform.h:331
DropGraphics is used by drop methods to request the output of common "graphics" not specific to an el...
Definition: DropGraphics.h:93
Solids
Definition: DropGraphics.h:56
Options
Definition: DropGraphics.h:30
RefCountedPtr< DropGraphics > DropGraphicsPtr
Definition: DropGraphics.h:85
BentleyStatus
Definition: Bentley.h:208
A DgnModelRef provides access to a model in a Bentley::DgnPlatform::DgnFile.
Definition: DgnModelRef.h:172
DropGeometry is suplied to DisplayHandler::Drop to allow the handler to produce a simplified represen...
Definition: DropGraphics.h:26
A bvector of EditElementHandle entries to be used for operating on groups of elements.
Definition: ElementAgenda.h:257
A shared pointer template for reference-counted objects.
Definition: RefCounted.h:119
struct DgnPlatform::ElementHandle const * ElementHandleCP
Definition: DgnPlatform.h:260
Dimensions
Definition: DropGraphics.h:43
struct ICurvePrimitive const & ICurvePrimitiveCR
Definition: msgeomstructs_typedefs.h:166
struct IGeometry const & IGeometryCR
Definition: msgeomstructs_typedefs.h:165
DraftingElementSchema methods are for creating the standard element type to represent the supplied ge...
Definition: DropGraphics.h:138
Options
Definition: DropGraphics.h:97
struct ISolidPrimitive const & ISolidPrimitiveCR
Definition: msgeomstructs_typedefs.h:185
#define BEGIN_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:68
Concrete class that can be used to implement the reference-counting pattern.
Definition: RefCounted.h:109
RefCountedPtr< DropGeometry > DropGeometryPtr
Definition: DropGraphics.h:18
struct DgnPlatform::ElementHandle const & ElementHandleCR
Definition: DgnPlatform.h:260
struct DgnPlatform::DropGraphics const & DropGraphicsCR
Definition: DgnPlatform.h:250

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