Constraint3dElementApi.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
10 
11 
12 #ifdef __CONSTRAINT3DELEMENT_BUILD__
13  #define CONSTRAINT3DELEMENT_EXPORT __declspec(dllexport)
14 #else
15  #define CONSTRAINT3DELEMENT_EXPORT __declspec(dllimport)
16 #endif
17 
18 BEGIN_CONSTRAINT3D_NAMESPACE
19 
20 
21 //=======================================================================================
22 // @bsiclass Bentley Systems
23 //=======================================================================================
25 {
27 
29  CONSTRAINT3DELEMENT_EXPORT static BentleyStatus GetHostElement (EditElementHandleR hostEeh, ElementHandleCR eh, bool searchGroup = false);
32  CONSTRAINT3DELEMENT_EXPORT static BentleyStatus GetExistingConstraints (T_StdElementRefSet& hosts, T_Constraints& constraints, T_StdElementRefSet& elementRefs, DgnModelRefP modelRef, bool doGroups);
34  CONSTRAINT3DELEMENT_EXPORT static BentleyStatus GetConstraints (T_Constraints& constraints, DataInternalizer& source, DgnModelRefR modelRef, Constraint3dBodyCacheP bodyCache);
36  CONSTRAINT3DELEMENT_EXPORT static BentleyStatus SaveConstraints (DataExternalizer& sink, T_Constraints& constraints);
37  static StatusInt SaveConstraints (IReplaceXAttribute* tbr, T_Constraints& constraints);
40  CONSTRAINT3DELEMENT_EXPORT static BentleyStatus ReevaluateAndUpdate (bool& anyUpdated, ElementHandleCR dependentEh, T_Constraints& constraints, bool constraintsModified, bool* rootsUpdated = NULL, T_StdElementRefSet* rootSet = NULL);
42  CONSTRAINT3DELEMENT_EXPORT static BentleyStatus GetDegreesOfFreedom (int& dof, int& removedDof, int& rigidDof, T_Constraints const& constraints, DgnModelRefR modelRef);
43 
44 
45 };
46 
47 //=======================================================================================
48 // @bsiclass Bentley Systems
49 //=======================================================================================
51 {
52  CONSTRAINT3DELEMENT_EXPORT static void OpenDimensionDialog (double& dimensionValue, WStringR variableAccess, DgnModelRefR modelRef, ViewportP viewport, DPoint3dCP origin);
53  CONSTRAINT3DELEMENT_EXPORT static void OpenAngleDialog (double& dimensionValue, WStringR variableAccess, DgnModelRefR modelRef, ViewportP viewport, DPoint3dCP origin);
55 
56 
57 }; // Constraint3dGUI
58 
59 //=======================================================================================
60 // @bsiclass Bentley Systems
61 //=======================================================================================
63 {
64  CONSTRAINT3DELEMENT_EXPORT static void DrawConstraints (ElementHandleCR el, ViewContextR viewContext, bool drawConstraintMarkers, bool drawDimensions);
65  CONSTRAINT3DELEMENT_EXPORT static void DrawPath (DisplayPathCR path, ViewContextR viewContext);
66 };
67 
68 
69 
70 END_CONSTRAINT3D_NAMESPACE
71 
72 
73 
74 
75 
76 
77 
static BentleyStatus ReevaluateAndUpdate(bool &anyUpdated, ElementHandleCR dependentEh, T_Constraints &constraints, bool constraintsModified, bool *rootsUpdated=NULL, T_StdElementRefSet *rootSet=NULL)
bset< ElementRefP > T_StdElementRefSet
Definition: PersistentElementPath.h:21
bvector< Constraint3dPtr > T_Constraints
Definition: Constraint3dCoreApi.h:131
static BentleyStatus GetConstraints(T_Constraints &constraints, ElementHandleCR hostEh)
#define CONSTRAINT3DELEMENT_EXPORT
Definition: Constraint3dElementApi.h:15
static bool IsGroupedToConstraint(ElementHandleCR eh)
Definition: ViewContext.h:358
struct DPoint3d const * DPoint3dCP
Definition: msgeomstructs_typedefs.h:79
static BentleyStatus SaveConstraints(EditElementHandleR eeh, T_Constraints &constraints)
static void OpenAngleDialog(double &dimensionValue, WStringR variableAccess, DgnModelRefR modelRef, ViewportP viewport, DPoint3dCP origin)
Definition: Constraint3dElementApi.h:62
static void CloseDimensionDialog()
Status
Definition: Constraint3dCoreApi.h:184
static void OpenDimensionDialog(double &dimensionValue, WStringR variableAccess, DgnModelRefR modelRef, ViewportP viewport, DPoint3dCP origin)
A writeable "handle" to an MSElement.
Definition: ElementHandle.h:470
static void DrawPath(DisplayPathCR path, ViewContextR viewContext)
Definition: Constraint3dElementApi.h:50
static BentleyStatus GetConstraintDescription(WStringR string, Constraint3dType type, GeometryId::Status geometryStatus)
#define NULL
Definition: Bentley.h:157
static BentleyStatus GetDegreesOfFreedom(int &dof, int &removedDof, int &rigidDof, T_Constraints const &constraints, DgnModelRefR modelRef)
struct DgnPlatform::DisplayPath const & DisplayPathCR
Definition: DgnPlatform.h:236
BentleyStatus
Definition: Bentley.h:208
static void RegisterHandlers()
A DgnModelRef provides access to a model in a Bentley::DgnPlatform::DgnFile.
Definition: DgnModelRef.h:172
static bool IsConstraintElement(ElementHandleCR eeh)
static BentleyStatus GetHostElement(EditElementHandleR hostEeh, ElementHandleCR eh, bool searchGroup=false)
static BentleyStatus RemoveElementConstraints(ElementHandleCR eh)
static BentleyStatus GetExistingConstraints(T_StdElementRefSet &hosts, T_Constraints &constraints, T_StdElementRefSet &elementRefs, DgnModelRefP modelRef, bool doGroups)
int StatusInt
Definition: Bentley.h:222
Constraint3dType
Definition: Constraint3dCoreApi.h:70
static bool HasConstraints(ElementHandleCR eh)
static BentleyStatus Create(EditElementHandleR eeh, DgnModelRefR destinationModelRef)
static void DrawConstraints(ElementHandleCR el, ViewContextR viewContext, bool drawConstraintMarkers, bool drawDimensions)
struct DgnPlatform::ElementHandle const & ElementHandleCR
Definition: DgnPlatform.h:260
Definition: Constraint3dElementApi.h:24
A string class that has many of the same capabilities as std::string, plus additional functions such ...
Definition: WString.h:51
Definition: DgnViewport.h:186

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