Constraint2dCoreAPI.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 /*=================================================================================**/
20 #ifdef __CONSTRAINT2DCORE_BUILD__
22  #define CONSTRAINT2DCORE_EXPORT __declspec(dllexport)
23 #else
24  #define CONSTRAINT2DCORE_EXPORT __declspec(dllimport)
25 #endif
26 
27 #define BEGIN_CONSTRAINT2D_NAMESPACE BEGIN_BENTLEY_DGNPLATFORM_NAMESPACE namespace Constraint2d {
28 #define END_CONSTRAINT2D_NAMESPACE }}}
29 #define USING_NAMESPACE_CONSTRAINT2D using namespace Bentley::DgnPlatform::Constraint2d;
30 
31 #define CONSTRAINT2D_CORE_TYPEDEFS(t) \
32  BEGIN_CONSTRAINT2D_NAMESPACE struct t; END_CONSTRAINT2D_NAMESPACE \
33  ADD_BENTLEY_TYPEDEFS (DgnPlatform::Constraint2d,t);
34 
35 CONSTRAINT2D_CORE_TYPEDEFS (Constraint2dSolverData)
36 CONSTRAINT2D_CORE_TYPEDEFS (CurveEntityIdentifier)
37 CONSTRAINT2D_CORE_TYPEDEFS (Constraint2dData)
38 CONSTRAINT2D_CORE_TYPEDEFS (Dimension2dData)
39 CONSTRAINT2D_CORE_TYPEDEFS (Drag2dInfo)
40 CONSTRAINT2D_CORE_TYPEDEFS (Constraint2dSolver)
42 
43 
47 BEGIN_CONSTRAINT2D_NAMESPACE
48 
49 
50 
51 
52 
54 enum class VertexType
55  {
56  Edge = 0,
57  Start = 1,
58  End = 2,
59  Center = 3,
60  Parameter = 4,
61  PointIndex = 5,
62  EllipseMajor1 = 6,
63  EllipseMajor2 = 7,
64  EllipseMinor1 = 8,
65  EllipseMinor2 = 9,
66  ArcPoint = 10,
67  EllipseMajorEdge = 11,
68  EllipseMinorEdge = 12,
69  PlanarFace = 13,
70  };
71 
73 enum class SectorAngleType
74  {
79  };
80 
81 
83 enum class Constraint2dType
84  {
85  Distance = 0,
86  Angle = 1,
91  Concentric = 2,
92  Radius = 3,
93  Parallel = 4,
94  Perpendicular = 5,
95  Coincident = 6,
96  Tangent = 7,
97  Identical = 8,
99  Symmetric = 9,
101  Major_Radius = 10,
102  Minor_Radius = 11,
103  Equal_Radius = 12,
104  Equal_Distance = 13,
105  Midpoint = 14,
108  Dependence = 15,
109  Patterned = 16,
110  Equal_Parameter = 17,
111  Normal = 18,
112  Equal_Direction = 19,
113  Equal_Curvature = 20,
114  Equal_First_Derivative = 21,
115  Equal_Second_Derivative = 22,
116  Offset = 23,
118  Simple_Dependence = 24,
121  Curve_Length = 25,
122  Patterned_2d = 26,
123  Pattern_Value = 27,
124  Pattern_2d_value_1 = 28,
125  Pattern_2d_value_2 = 29,
126  Equal_Relative_Transform = 30,
127  Arc_length = 31,
128  Offset_Dimension = 32,
130  //User-defined constraints
131  Area = 100,
132  Perimeter = 101,
133  Fix = 102,
134  Horizontal = 103,
141  Vertical = 104,
142  Equal = 105,
143  Planar_Distance = 106,
144 
146  //Invalid constraint type
147  Dummy = 1000,
149  };
150 
153  {
154  Unknown,
155  Between_Fixed,
157  Over_Defined,
158  Non_Algebraic,
163  Not_Solved,
164  Not_Changed,
165  Solved,
166  };//ConstraintStatus
167 
170  {
171  General,
172  Translation,
173  Radius,
174  Major_Radius,
175  Minor_Radius,
177  };//DragTransformType
178 // from DCM_half_space
180  {
181  Unspecified = 0,
182  Left = 1,
183  Right = 2,
184  };
185 
188  {
194  };
195 
196 
197 //=======================================================================================
198 //Identifier for sub-entitiy in curve vector
199 // @remark Required library : Contraint2dCore<ApiNumber>.lib i.e. Contraint2dCore1.lib
200 // @bsiclass Bentley Systems
201 //=======================================================================================
203 {
204 private:
205  CurveVectorPtr m_curveVectorPtr;
206  UInt32 m_pepIndex;
207  ElementRefP m_elementRef;
208 
209  CurvePrimitiveIdPtr m_edgeId;
210  size_t m_subEdgeIndex;
211  VertexType m_vertexType;
212 
213  UInt32 m_segmentsInCurveVector;
214 
215  // The following members are used during solving - but not persisted.
216  mutable bool m_fixed;
217  mutable bool m_hosted;
218 
219 public:
221  CONSTRAINT2DCORE_EXPORT CurveEntityIdentifier ();
222 
229  CONSTRAINT2DCORE_EXPORT CurveEntityIdentifier (CurveVectorR curve, CurvePrimitiveIdCP edgeId, size_t subIndex, VertexType vertexType, ElementRefP elementRef);
230 
236  CONSTRAINT2DCORE_EXPORT CurveEntityIdentifier (CurveVectorR curve, CurveLocationDetailCR location, VertexType vertexType, ElementRefP elementRef);
237 
241  CONSTRAINT2DCORE_EXPORT bool operator == (CurveEntityIdentifierCR rhs) const;
242 
246  CONSTRAINT2DCORE_EXPORT bool operator < (CurveEntityIdentifierCR rhs) const;
247 
250  CONSTRAINT2DCORE_EXPORT bool IsValid () const;
254  CONSTRAINT2DCORE_EXPORT void SetEdgeId (CurvePrimitiveIdP edgeId);
257  CONSTRAINT2DCORE_EXPORT CurvePrimitiveIdCP GetEdgeId () const;
258 
261  CONSTRAINT2DCORE_EXPORT void SetSubEdgeIndex (size_t subEdgeIndex);
264  CONSTRAINT2DCORE_EXPORT size_t GetSubEdgeIndex () const;
265 
268  CONSTRAINT2DCORE_EXPORT void SetVertexType (VertexType vertexType);
269 
271  // Put here, no need to expose another class for SDK examples
276  CONSTRAINT2DCORE_EXPORT static StatusInt ElementToCurveVector (CurveVectorPtr& curveVector, ElementHandleCR eh);
277 
280  CONSTRAINT2DCORE_EXPORT VertexType GetVertexType () const;
281 
284  CONSTRAINT2DCORE_EXPORT void SetPointIndex (size_t pointIndex);
287  CONSTRAINT2DCORE_EXPORT size_t GetPointIndex () const;
288 };//CurveEntityIdentifier
289 
291 typedef bvector<CurveEntityIdentifier> T_CurveEntityIdArray;
292 typedef bset<CurveEntityIdentifier> T_CurveEntityIdSet;
294 
295 
296 //=======================================================================================
297 //Structure to hold data for constraint
298 // @remark Required library : Contraint2dCore<ApiNumber>.lib i.e. Contraint2dCore1.lib
299 // @bsiclass Bentley Systems
300 //=======================================================================================
302 {
303 private:
304  Constraint2dType m_constraintType;
305  Constraint2dStatus m_constraintStatus;
306  T_CurveEntityIdArray m_curveIds;
307 
308  mutable bool m_filtered;
309  UInt32 m_version;
310 
311 protected:
313  virtual BentleyStatus _Load (DataInternalizer& source);
314  virtual void _Store (DataExternalizer& sink) const;
316 public:
318  CONSTRAINT2DCORE_EXPORT Constraint2dData ();
319 
322  CONSTRAINT2DCORE_EXPORT Constraint2dData (Constraint2dType constraintType);
323 
324  CONSTRAINT2DCORE_EXPORT virtual ~Constraint2dData () {;}
325 
326  CONSTRAINT2DCORE_EXPORT Constraint2dData (Constraint2dData const& c2);
327  CONSTRAINT2DCORE_EXPORT Constraint2dData& operator = (Constraint2dData const& c2);
328 
331  CONSTRAINT2DCORE_EXPORT void SetConstraintType (Constraint2dType type);
334  CONSTRAINT2DCORE_EXPORT Constraint2dType GetConstraintType () const;
335 
338  CONSTRAINT2DCORE_EXPORT void SetConstraintStatus (Constraint2dStatus status);
341  CONSTRAINT2DCORE_EXPORT Constraint2dStatus GetConstraintStatus () const;
344  CONSTRAINT2DCORE_EXPORT void AddCurveIdentifier (CurveEntityIdentifierCR id);
347  CONSTRAINT2DCORE_EXPORT T_CurveEntityIdArray const& GetCurveIdentifiers () const;
348 };//Constraint2dData
349 
350 
351 //=======================================================================================
352 //Structure to hold data for dimensional constraint
353 // @remark Required library : Contraint2dCore<ApiNumber>.lib i.e. Contraint2dCore1.lib
354 // @bsiclass Bentley Systems
355 //=======================================================================================
357 {
358 private:
359  double m_dimensionValue;
360  WString m_variableName;
361  DVec2d m_textOffset;
362  double m_fraction;
363  SectorAngleType m_sectorAngleType;
364  UInt32 m_angleSectorIndex;
365  DimensionHalfSpace m_halfSpace1;
366  DimensionHalfSpace m_halfSpace2;
367  DimensionAlignmentType m_alignType;
368  UInt32 m_diaType;
369 
370  ElementId m_dimensionStyle;
371  bvector<DVec2d> m_leaderLines;
372  UInt32 m_dimensionOptions;
373 
374 public:
376  CONSTRAINT2DCORE_EXPORT Dimension2dData ();
379  CONSTRAINT2DCORE_EXPORT Dimension2dData (Constraint2dType constraintType);
380 
381  CONSTRAINT2DCORE_EXPORT Dimension2dData (Dimension2dData const& d2);
382  CONSTRAINT2DCORE_EXPORT Dimension2dData& operator = (Dimension2dData const& d2);
383 
386  CONSTRAINT2DCORE_EXPORT void SetDimensionValue (double value);
389  CONSTRAINT2DCORE_EXPORT double GetDimensionValue () const;
392  CONSTRAINT2DCORE_EXPORT void SetVariableName (WStringCR name);
395  CONSTRAINT2DCORE_EXPORT WStringCR GetVariableName () const;
396 
397  CONSTRAINT2DCORE_EXPORT void SetSectorAngleType (SectorAngleType type);
398  CONSTRAINT2DCORE_EXPORT SectorAngleType GetSectorAngleType () const;
399 
400  CONSTRAINT2DCORE_EXPORT void SetDimensionHeight (double value);
401  CONSTRAINT2DCORE_EXPORT double GetDimensionHeight () const;
402 
403  CONSTRAINT2DCORE_EXPORT void SetDimensionFraction (double value);
404  CONSTRAINT2DCORE_EXPORT double GetDimensionFraction () const;
405 
406  CONSTRAINT2DCORE_EXPORT void SetAngleSectorIndex (UInt32 sectorIndex);
407  CONSTRAINT2DCORE_EXPORT UInt32 GetAngleSectorIndex () const;
408 
409  CONSTRAINT2DCORE_EXPORT void SetHalfSpace1 (DimensionHalfSpace halfSpace);
410  CONSTRAINT2DCORE_EXPORT DimensionHalfSpace GetHalfSpace1 () const;
411  CONSTRAINT2DCORE_EXPORT void SetHalfSpace2 (DimensionHalfSpace halfSpace);
412  CONSTRAINT2DCORE_EXPORT DimensionHalfSpace GetHalfSpace2 () const;
413 
414  CONSTRAINT2DCORE_EXPORT void SetDimensionAlignmentType (DimensionAlignmentType type);
415  CONSTRAINT2DCORE_EXPORT DimensionAlignmentType GetDimensionAlignmentType () const;
416 
417  CONSTRAINT2DCORE_EXPORT bool operator == (Dimension2dDataCR rhs) const;
418 
419  CONSTRAINT2DCORE_EXPORT void SetDimensionXOffset (double value);
420  CONSTRAINT2DCORE_EXPORT double GetDimensionXOffset () const;
421 
422  CONSTRAINT2DCORE_EXPORT void SetDiaType (UInt32 value);
423  CONSTRAINT2DCORE_EXPORT UInt32 GetDiaType () const;
424 
425 
426 
427 };//Dimension2dData
428 
430 typedef bset <Constraint2dData> T_Constraint2dDataSet;
431 typedef bvector<Constraint2dData> T_Constraint2dDataArray;
432 
433 typedef bset <Dimension2dData> T_Dimension2dDataSet;
434 typedef bvector<Dimension2dData> T_Dimension2dDataArray;
436 
437 //=======================================================================================
438 //Structure to hold information for dragging manipulator
439 // @remark Required library : Contraint2dCore<ApiNumber>.lib i.e. Contraint2dCore1.lib
440 // @bsiclass Bentley Systems
441 //=======================================================================================
443 {
444 private:
445  CurveEntityIdentifier m_subEntityIdentifer;
446  DragTransformType m_transformType;
447  DVec3d m_moveValue;
448  double m_radius;
449 
450 public:
452  CONSTRAINT2DCORE_EXPORT Drag2dInfo ();
456  CONSTRAINT2DCORE_EXPORT Drag2dInfo (CurveEntityIdentifierCR identifer, DragTransformType transformType = DragTransformType::Translation);
457 
460  CONSTRAINT2DCORE_EXPORT CurveEntityIdentifierCR GetCurveEntityIdentifier () const;
463  CONSTRAINT2DCORE_EXPORT void SetCurveEntityIdentifier (CurveEntityIdentifierCR identifer);
464 
467  CONSTRAINT2DCORE_EXPORT DragTransformType GetDraggingTransform () const;
470  CONSTRAINT2DCORE_EXPORT void SetDraggingTransform (DragTransformType transformType);
471 
474  CONSTRAINT2DCORE_EXPORT DVec3dCR GetMoveValue () const;
477  CONSTRAINT2DCORE_EXPORT void SetMoveValue (DVec3dCR value);
478 
481  CONSTRAINT2DCORE_EXPORT double GetRadius () const;
484  CONSTRAINT2DCORE_EXPORT void SetRadius (double radius);
485  CONSTRAINT2DCORE_EXPORT void Clear ();
486 
487 };//Drag2dInfo
489 typedef bvector<Drag2dInfo> Drag2dInfoArray;
490 typedef bvector<Drag2dInfo>& Drag2dInfoArrayR;
492 //=======================================================================================
493 // @remark Required library : Contraint2dCore<ApiNumber>.lib i.e. Contraint2dCore1.lib
494 // @bsiclass Bentley Systems
495 //=======================================================================================
497 {
498 private:
499  struct D2dSolver* m_solverImp;
500 
501 public:
503  CONSTRAINT2DCORE_EXPORT Constraint2dSolver (double localToWorldScale, bool isAutoConstraining = false);
504 
506  CONSTRAINT2DCORE_EXPORT ~Constraint2dSolver ();
507 
512  CONSTRAINT2DCORE_EXPORT bool SetData (Constraint2dSolverDataCR data, double uorPerMaster = 1.0);
516  CONSTRAINT2DCORE_EXPORT void GetData (Constraint2dSolverDataR data);
517 
522  CONSTRAINT2DCORE_EXPORT BentleyStatus Evaluate (Drag2dInfoArray const& dragInfos, bool isDynamic);
523 
527  CONSTRAINT2DCORE_EXPORT BentleyStatus GetResultCurveVector (CurveVectorPtr& resultCurve, ElementRefP elementRef);
528 
529  };//Constraint2dSolver
530 //=======================================================================================
531 // @remark Required library : Contraint2dCore<ApiNumber>.lib i.e. Contraint2dCore1.lib
532 // @bsiclass Bentley Systems
533 //=======================================================================================
535 {
536  T_Constraint2dDataArray m_constraints;
537  T_Dimension2dDataArray m_dimensions;
538 
539 public:
541  CONSTRAINT2DCORE_EXPORT Constraint2dSolverData () {;}
543  CONSTRAINT2DCORE_EXPORT Constraint2dSolverData (Constraint2dSolverData const& rhs);
545  CONSTRAINT2DCORE_EXPORT Constraint2dSolverData& operator= (Constraint2dSolverData const& rhs);
546 
548  CONSTRAINT2DCORE_EXPORT void Clear () { m_constraints.clear(); m_dimensions.clear(); }
549 
552  CONSTRAINT2DCORE_EXPORT bool IsEmpty () const {return (m_constraints.empty() && m_dimensions.empty());}
555  CONSTRAINT2DCORE_EXPORT bool IsResolved () const;
558  CONSTRAINT2DCORE_EXPORT bool IsComplete () const;
559 
563  CONSTRAINT2DCORE_EXPORT size_t GetElementRefs (T_StdElementRefSet& elementRefs) const;
564 
568  CONSTRAINT2DCORE_EXPORT bool Merge (Constraint2dSolverData const& rhs);
569 
573  CONSTRAINT2DCORE_EXPORT size_t CollateByElement (bvector<Constraint2dSolverData>& childGroups) const;
574 
576  void RemoveDuplicates ();
578 
582  CONSTRAINT2DCORE_EXPORT bool RemoveElementRef (ElementRefP elementRef);
584  CONSTRAINT2DCORE_EXPORT void RemoveUnresolvedElementRefs ();
588  CONSTRAINT2DCORE_EXPORT void RemoveInvalidConstraints (size_t& invalidCount, ElementRefP elementRef);
589 
594  CONSTRAINT2DCORE_EXPORT bool Reverse (ElementRefP elementRef, CurveVectorCP curveVector = NULL);
595  CONSTRAINT2DCORE_EXPORT void Replace (ElementRefP oldElementRef, ElementRefP newElementRef);
596 
598  CONSTRAINT2DCORE_EXPORT bool IsCurvePlaneFixed (CurveEntityIdentifierCR curveId) const;
600  CONSTRAINT2DCORE_EXPORT bool IsCurvePlaneConstrained (CurveEntityIdentifierCR curveId) const;
601 
602 }; // Constraint2dSolverData
603 
604 
605 END_CONSTRAINT2D_NAMESPACE
606 
DragTransformType
The possible drag transform types.
Definition: Constraint2dCoreAPI.h:169
planar face (planar distance constraints only).
CONSTRAINT2DCORE_EXPORT double GetDimensionHeight() const
align constraint dimension value in -X direction;
bset< ElementRefP > T_StdElementRefSet
Definition: PersistentElementPath.h:21
Start point of major axis of an ellipse.
Indicates it is a point in an arc.
Distance dimensional constraint.
CONSTRAINT2DCORE_EXPORT bool RemoveElementRef(ElementRefP elementRef)
Remove all constraint data which are correlated to the the given element.
CONSTRAINT2DCORE_EXPORT Drag2dInfo()
A blank constructor.
Equal constraint.
VertexType
Enumerates for curve (segment) identifier type.
Definition: Constraint2dCoreAPI.h:54
The specified position is relative to the end of the file.
CONSTRAINT2DCORE_EXPORT void RemoveInvalidConstraints(size_t &invalidCount, ElementRefP elementRef)
Remove all invalid constraint data which are correlated to the the given element. ...
Fix constraint which has different meanings per entity type:
Definition: Constraint2dCoreAPI.h:356
given dimension value is inconsistent due to other causes
CONSTRAINT2DCORE_EXPORT DragTransformType GetDraggingTransform() const
Get dragging transform type.
CONSTRAINT2DCORE_EXPORT void SetDimensionValue(double value)
Set a new dimension value.
The default file attribute.
T_Dimension2dDataArray m_dimensions
Definition: Constraint2dCoreAPI.h:537
CONSTRAINT2DCORE_EXPORT void SetEdgeId(CurvePrimitiveIdP edgeId)
Set the edge id.
Definition: Constraint2dCoreAPI.h:301
CONSTRAINT2DCORE_EXPORT bool IsComplete() const
Determine if it is complete, i.e., its actual topology is identical to the datum description used...
Equal distance dimensional constraint.
CONSTRAINT2DCORE_EXPORT Dimension2dData()
A blank constructor.
struct Bentley::WString const & WStringCR
Definition: Bentley.h:239
Major radius dimensional constraint which is effective on ellipse.
dimension value is satisfied by solution
CONSTRAINT2DCORE_EXPORT void RemoveUnresolvedElementRefs()
Remove all constraint data whose target elements are not resolved.
CONSTRAINT2DCORE_EXPORT void SetHalfSpace1(DimensionHalfSpace halfSpace)
given dimension not changed
static CONSTRAINT2DCORE_EXPORT StatusInt ElementToCurveVector(CurveVectorPtr &curveVector, ElementHandleCR eh)
Get an editable curve vector of a given element.
given dimension value is inconsistent due to a bad dimensioning scheme
CONSTRAINT2DCORE_EXPORT Constraint2dSolverData & operator=(Constraint2dSolverData const &rhs)
Assignment constructor.
CONSTRAINT2DCORE_EXPORT void SetDimensionHeight(double value)
face pair for solid topology references.
Definition: GeomApi.r.h:69
CONSTRAINT2DCORE_EXPORT T_CurveEntityIdArray const & GetCurveIdentifiers() const
Get the curve identifiers.
CONSTRAINT2DCORE_EXPORT CurvePrimitiveIdCP GetEdgeId() const
Get the edge id.
align constraint dimension value in -Y direction;
Start point of minor axis of an ellipse.
the measured angle is rotating line1 to line2 by anticlockwise, and the two lines are antiparallel; ...
Constraint2dStatus
Enumerates for constraint statuses.
Definition: Constraint2dCoreAPI.h:152
virtual CONSTRAINT2DCORE_EXPORT ~Constraint2dData()
Definition: Constraint2dCoreAPI.h:324
Offset constraint.
CONSTRAINT2DCORE_EXPORT size_t CollateByElement(bvector< Constraint2dSolverData > &childGroups) const
Check and divide this constraint model into child per links among elements.
Coincident logical constraint.
CONSTRAINT2DCORE_EXPORT bool SetData(Constraint2dSolverDataCR data, double uorPerMaster=1.0)
Initialize model.
typedefBEGIN_BENTLEY_GEOMETRY_NAMESPACE struct CurvePrimitiveId * CurvePrimitiveIdP
Definition: CurvePrimitiveId.h:13
Area dimensional constraint.
Equal radius dimensional constraint.
CONSTRAINT2DCORE_EXPORT Constraint2dType GetConstraintType() const
Get the constraint type.
CONSTRAINT2DCORE_EXPORT void SetPointIndex(size_t pointIndex)
Set the point index in linestring.
Tangent logical constraint.
CONSTRAINT2DCORE_EXPORT bool IsValid() const
Test the CurveEntityIdentifier is valid or not.
Vector with x,y components.
Definition: dvec2d.h:25
T_Constraint2dDataArray m_constraints
Definition: Constraint2dCoreAPI.h:536
minor axis of an ellipse
CONSTRAINT2DCORE_EXPORT double GetDimensionXOffset() const
the measured angle is rotating line1 to line2 by clockwise, and the two lines are antiparallel; ...
dimension value inconsistent and there is insufficient information available to determine the cause ...
CONSTRAINT2DCORE_EXPORT VertexType GetVertexType() const
Get the vertex type.
Definition: Constraint2dCoreAPI.h:534
uint32_t UInt32
Definition: Bentley.r.h:128
#define NULL
Definition: Bentley.h:157
CONSTRAINT2DCORE_EXPORT DimensionHalfSpace GetHalfSpace2() const
rotation+translation
Definition: Constraint2dCoreAPI.h:496
DimensionHalfSpace
Definition: Constraint2dCoreAPI.h:179
End point of major axis of an ellipse.
CONSTRAINT2DCORE_EXPORT void SetSectorAngleType(SectorAngleType type)
CONSTRAINT2DCORE_EXPORT void SetSubEdgeIndex(size_t subEdgeIndex)
Set the sub edge index.
CONSTRAINT2DCORE_EXPORT void SetRadius(double radius)
Set radius.
CONSTRAINT2DCORE_EXPORT double GetDimensionValue() const
Get dimension value.
Parallel logical constraint.
CONSTRAINT2DCORE_EXPORT Dimension2dData & operator=(Dimension2dData const &d2)
CONSTRAINT2DCORE_EXPORT void SetDimensionAlignmentType(DimensionAlignmentType type)
the measured angle is rotating line1 to line2 by clockwise, and the two lines are parallel; ...
CONSTRAINT2DCORE_EXPORT void SetConstraintType(Constraint2dType type)
Set the constraint type.
dimension not solved as it is between members of the same set
CONSTRAINT2DCORE_EXPORT size_t GetPointIndex() const
Get the point index.
CONSTRAINT2DCORE_EXPORT Constraint2dData & operator=(Constraint2dData const &c2)
CONSTRAINT2DCORE_EXPORT void SetConstraintStatus(Constraint2dStatus status)
Set the constraint status.
CONSTRAINT2DCORE_EXPORT ~Constraint2dSolver()
Destructor.
given dimension value is inconsistent
CONSTRAINT2DCORE_EXPORT bool IsCurvePlaneFixed(CurveEntityIdentifierCR curveId) const
A curve plane is considered to be fixed if any portion of the curve is fixed.
Radius dimensional constraint.
SectorAngleType
Enumerates for the ways an angle is calculated.
Definition: Constraint2dCoreAPI.h:73
A zero-based index of point array.
CONSTRAINT2DCORE_EXPORT DVec3dCR GetMoveValue() const
Get moving value.
CONSTRAINT2DCORE_EXPORT Constraint2dSolverData()
A blank constructor.
Definition: Constraint2dCoreAPI.h:541
CONSTRAINT2DCORE_EXPORT bool operator==(Dimension2dDataCR rhs) const
Curve's start point.
CONSTRAINT2DCORE_EXPORT CurveEntityIdentifierCR GetCurveEntityIdentifier() const
Get curve identifier.
dimension can only be solved non-algebraically
CONSTRAINT2DCORE_EXPORT SectorAngleType GetSectorAngleType() const
BentleyStatus
Definition: Bentley.h:208
CONSTRAINT2DCORE_EXPORT BentleyStatus GetResultCurveVector(CurveVectorPtr &resultCurve, ElementRefP elementRef)
Get results for the given element.
Definition: Constraint2dCoreAPI.h:202
CONSTRAINT2DCORE_EXPORT void Clear()
DimensionAlignmentType
Enumerates for drawing dimension alignment.
Definition: Constraint2dCoreAPI.h:187
CONSTRAINT2DCORE_EXPORT void SetVertexType(VertexType vertexType)
Set new vertex type.
A shared pointer template for reference-counted objects.
Definition: RefCounted.h:119
CONSTRAINT2DCORE_EXPORT double GetDimensionFraction() const
Constraint2dType
Enumerates for constraint types.
Definition: Constraint2dCoreAPI.h:83
CONSTRAINT2DCORE_EXPORT void AddCurveIdentifier(CurveEntityIdentifierCR id)
Add curve identifier.
Base class to make a class non-copyable.
Definition: NonCopyableClass.h:23
CONSTRAINT2DCORE_EXPORT CurveEntityIdentifier()
A blank constructor.
Definition: Constraint2dCoreAPI.h:442
CONSTRAINT2DCORE_EXPORT void Clear()
Clear all data and set to empty.
Definition: Constraint2dCoreAPI.h:548
Interface that provides direct and efficient access to element data.
Definition: ElementRefBase.h:120
The whole curve (segment)
CONSTRAINT2DCORE_EXPORT Constraint2dSolver(double localToWorldScale, bool isAutoConstraining=false)
Constructor.
CONSTRAINT2DCORE_EXPORT Constraint2dStatus GetConstraintStatus() const
Get the constraint status.
the measured angle is rotating line1 to line2 by anticlockwise, and the two lines are parallel; ...
CONSTRAINT2DCORE_EXPORT void SetVariableName(WStringCR name)
Set variable name.
dimension not solved as it is either not satisfied or connected to geometries with a NOT_CHANGED stat...
Horizontal constraint which is always parallel to local X-axis.
CONSTRAINT2DCORE_EXPORT bool IsEmpty() const
Determine if it is empty.
Definition: Constraint2dCoreAPI.h:552
Determined by the parameter value, typically within [0,1].
CONSTRAINT2DCORE_EXPORT void SetCurveEntityIdentifier(CurveEntityIdentifierCR identifer)
Set curve identifier.
CONSTRAINT2DCORE_EXPORT void SetDimensionXOffset(double value)
int StatusInt
Definition: Bentley.h:222
UInt64 ElementId
Definition: DgnPlatformBaseType.r.h:83
struct CurvePrimitiveId const * CurvePrimitiveIdCP
Definition: CurvePrimitiveId.h:16
End point of minor axis of an ellipse.
Perpendicular logical constraint.
struct CurveLocationDetail const & CurveLocationDetailCR
Definition: msgeomstructs_typedefs.h:167
Perimeter dimensional constraint.
Minor radius dimensional constraint which is effective on ellipse.
CONSTRAINT2DCORE_EXPORT bool IsResolved() const
Determine if it is resolved, i.e., all member elements are available.
The Angle class has static methods for typical angle computations.
Definition: Angle.h:14
CONSTRAINT2DCORE_EXPORT void SetDraggingTransform(DragTransformType transformType)
Set dragging transform type.
CONSTRAINT2DCORE_EXPORT void SetAngleSectorIndex(UInt32 sectorIndex)
CONSTRAINT2DCORE_EXPORT Constraint2dData()
A blank constructor.
This file is the top-level include file to access all APIs supported by the DgnPlatform library and i...
Curve's middle point or arc's center.
CONSTRAINT2DCORE_EXPORT DimensionHalfSpace GetHalfSpace1() const
CONSTRAINT2DCORE_EXPORT void SetMoveValue(DVec3dCR value)
Set moving value.
CONSTRAINT2DCORE_EXPORT UInt32 GetAngleSectorIndex() const
CONSTRAINT2DCORE_EXPORT void SetDimensionFraction(double value)
dimension not solved as it is between fixed or frozen geometries
Planar distance constraint which applys on distance between two parallel planes.
struct DgnPlatform::ElementHandle const & ElementHandleCR
Definition: DgnPlatform.h:260
CONSTRAINT2DCORE_EXPORT bool IsCurvePlaneConstrained(CurveEntityIdentifierCR curveId) const
A curve plane is constrained if is by a plane distance dimension.
CONSTRAINT2DCORE_EXPORT WStringCR GetVariableName() const
Get variable name.
Concentric logical constraint.
struct DVec3d const & DVec3dCR
Definition: msgeomstructs_typedefs.h:89
struct CurveVector const * CurveVectorCP
Definition: msgeomstructs_typedefs.h:172
CONSTRAINT2DCORE_EXPORT BentleyStatus Evaluate(Drag2dInfoArray const &dragInfos, bool isDynamic)
Perform a evaluation.
CONSTRAINT2DCORE_EXPORT size_t GetElementRefs(T_StdElementRefSet &elementRefs) const
Query all member elements.
align constraint dimension value in Y direction;
Major axis of an ellipse.
CONSTRAINT2DCORE_EXPORT void Replace(ElementRefP oldElementRef, ElementRefP newElementRef)
CONSTRAINT2DCORE_EXPORT UInt32 GetDiaType() const
CONSTRAINT2DCORE_EXPORT bool operator<(CurveEntityIdentifierCR rhs) const
Test the CurveEntityIdentifier is less than rhs or not.
dimension specification is over-defined
Vector with x,y,z components.
Definition: dvec3d.h:110
Vertical constraint which is always parallel to local Y-axis.
CONSTRAINT2DCORE_EXPORT double GetRadius() const
Get radius.
CONSTRAINT2DCORE_EXPORT void SetHalfSpace2(DimensionHalfSpace halfSpace)
align constraint dimension value in X direction;
CONSTRAINT2DCORE_EXPORT DimensionAlignmentType GetDimensionAlignmentType() const
CONSTRAINT2DCORE_EXPORT bool Merge(Constraint2dSolverData const &rhs)
Merge another constraint model into this one.
CONSTRAINT2DCORE_EXPORT size_t GetSubEdgeIndex() const
Get the sub edge index.
CONSTRAINT2DCORE_EXPORT bool Reverse(ElementRefP elementRef, CurveVectorCP curveVector=NULL)
Update constraint data assuming the curve's direction was reversed.
CONSTRAINT2DCORE_EXPORT void SetDiaType(UInt32 value)
A string class that has many of the same capabilities as std::string, plus additional functions such ...
Definition: WString.h:51
A CurveVector is a collection of curve primitives.
Definition: CurveVector.h:78
Symmetric constraint.
CONSTRAINT2DCORE_EXPORT void GetData(Constraint2dSolverDataR data)
Initialize model.
CONSTRAINT2DCORE_EXPORT bool operator==(CurveEntityIdentifierCR rhs) const
Perform a comarsion.
unknown status (newly added to system)

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