AcDbAssocEdgeChamferActionBody.h 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2015 Autodesk, Inc. All rights reserved.
  4. //
  5. // Use of this software is subject to the terms of the Autodesk license
  6. // agreement provided at the time of installation or download, or which
  7. // otherwise accompanies this software in either electronic or hard copy form.
  8. //
  9. //////////////////////////////////////////////////////////////////////////////
  10. //
  11. // CREATED BY: Sharad Jaiswal Sept 2009
  12. //
  13. //////////////////////////////////////////////////////////////////////////////
  14. #pragma once
  15. #include "acdbassocpathbasedsurfaceactionbody.h"
  16. #pragma pack (push, 8)
  17. /// <summary>
  18. /// AcDbAssocEdgeChamferActionBody is an action body that controls edge chamfer
  19. /// applied to a surface with the set of input data of the action.
  20. /// The "input data" for this action are list of edges, chamfer distances, base
  21. /// face from which chamfer base distance is measured and the surface to which
  22. /// the input edges belongs.
  23. /// </summary>
  24. ///
  25. class ACDB_PORT AcDbAssocEdgeChamferActionBody : public AcDbAssocPathBasedSurfaceActionBody
  26. {
  27. public:
  28. ACRX_DECLARE_MEMBERS(AcDbAssocEdgeChamferActionBody);
  29. /// <summary> Default constructor. </summary>
  30. /// <param name="createImpObject"> See AcDbAssocCreateImpObject. </param>
  31. ///
  32. explicit AcDbAssocEdgeChamferActionBody(AcDbAssocCreateImpObject createImpObject = kAcDbAssocCreateImpObject);
  33. /// <summary> Method to set input edges for chamfer. </summary>
  34. /// <param name="chamferEdges"> List of input edges. </param>
  35. /// <param name="baseFace"> Face subent id for base face from which chamfer
  36. /// base distance is to be measured. </param>
  37. /// <returns> Acad::ErrorStatus. </returns>
  38. ///
  39. Acad::ErrorStatus setInput(const AcDbFullSubentPathArray& chamferEdges, const AcDbSubentId& baseFace);
  40. /// <summary><para>
  41. /// Sets base distance value for chamfer, expression and evaluatorId for
  42. /// this action. If there is no expression, the expression string and the
  43. /// evaluatorId must be empty strings.
  44. /// </para><para>
  45. /// Base distance can also be set using setValueParam method with paramName
  46. /// kChamferDistanceParamName and value index 0.
  47. /// </para></summary>
  48. /// <param name="baseDistance"> new value of baseDistance parameter. </param>
  49. /// <param name="expression"> expression of baseDistance parameter. </param>
  50. /// <param name="evaluatorId"> evaluator id. </param>
  51. /// <returns> Acad::ErrorStatus. </returns>
  52. ///
  53. Acad::ErrorStatus setBaseDistance(double baseDistance, const AcString& expression = AcString(),
  54. const AcString& evaluatorId = AcString());
  55. /// <summary><para>
  56. /// Sets other distance value for chamfer, expression and evaluatorId for
  57. /// this action. If there is no expression, the expression string and the
  58. /// evaluatorId must be empty strings.
  59. /// </para><para>
  60. /// Other distance can also be set using setValueParam method with paramName
  61. /// kChamferDistanceParamName and value index 1.
  62. /// </para></summary>
  63. /// <param name="otherDistance"> new value of otherDistance parameter. </param>
  64. /// <param name="expression"> expression of otherDistance parameter. </param>
  65. /// <param name="evaluatorId"> evaluator id. </param>
  66. /// <returns> Acad::ErrorStatus. </returns>
  67. ///
  68. Acad::ErrorStatus setOtherDistance(double otherDistance, const AcString& expression = AcString(),
  69. const AcString& evaluatorId = AcString());
  70. /// <summary><para>
  71. /// Gets base distance value for chamfer, expression and evaluatorId for
  72. /// this action. If there is no expression, the expression string and the
  73. /// evaluatorId are empty strings.
  74. /// </para><para>
  75. /// Base distance can also be obtained using getValueParam method with
  76. /// paramName kChamferDistanceParamName and value index 0.
  77. /// </para></summary>
  78. /// <param name="expression"> expression of the parameter. </param>
  79. /// <param name="evaluatorId"> evaluator id. </param>
  80. /// <returns> base distance value. </returns>
  81. ///
  82. double baseDistance(AcString& expression = dummyString(), AcString& evaluatorId = dummyString()) const;
  83. /// <summary><para>
  84. /// Gets other distance value for chamfer, expression and evaluatorId for
  85. /// this action. If there is no expression, the expression string and the
  86. /// evaluatorId are empty strings.
  87. /// </para><para>
  88. /// Other distance can also be obtained using getValueParam method with
  89. /// paramName kChamferDistanceParamName and value index 1.
  90. /// </para></summary>
  91. /// <param name="expression"> expression of the parameter. </param>
  92. /// <param name="evaluatorId"> evaluator id. </param>
  93. /// <returns> other distance value. </returns>
  94. ///
  95. double otherDistance(AcString& expression = dummyString(), AcString& evaluatorId = dummyString()) const;
  96. /// <summary>
  97. /// Implements abstract method AcDbAssocActionBody::evaluateOverride(), this
  98. /// method is called while evaluating the parent action that owns this action
  99. /// body object.
  100. /// </summary>
  101. ///
  102. virtual void evaluateOverride();
  103. /// <summary>
  104. /// Utility function to create AcDbAssocEdgeChamferActionBody and attach
  105. /// dependencies and actions for given chamferEdges.
  106. /// </summary>
  107. /// <param name="chamferEdges"> List of input edges. </param>
  108. /// <param name="baseFace"> Face subent id for base face. </param>
  109. /// <param name="baseDistance"> Base distance value. </param>
  110. /// <param name="otherDistance"> Other distance value. </param>
  111. /// <param name="bEnabled"> Specify if the action is fully associative. </param>
  112. /// <param name="createdActionId"> Object id for action owning
  113. /// created instance of AcDbAssocEdgeChamferActionBody. </param>
  114. /// <returns> Acad::ErrorStatus. </returns>
  115. ///
  116. static Acad::ErrorStatus createInstance( const AcDbFullSubentPathArray& chamferEdges,
  117. const AcDbSubentId& baseFace,
  118. double baseDistance,
  119. double otherDistance,
  120. bool bEnabled,
  121. AcDbObjectId& createdActionId);
  122. };
  123. #pragma pack (pop)