AcDbAssocBlendSurfaceActionBody.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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: Pei Zhan March 2009
  12. //
  13. // DESCRIPTION:
  14. //
  15. //////////////////////////////////////////////////////////////////////////////
  16. #pragma once
  17. #include "dbgrip.h"
  18. #include "AcDbAssocPathBasedSurfaceActionBody.h"
  19. #pragma pack (push, 8)
  20. class AcDbLoftProfile;
  21. class AcDbBlendOptions;
  22. /// <summary>
  23. /// Action that sets the contents of AcDbSurface entity based on surface blend operation.
  24. /// If this action is erased, the surface it attached to will become a lofted surface and
  25. /// all the information stored in this action will get lost.
  26. /// The action can be fully associative or semi-associative. if fully associative, the resulting
  27. /// surface will always automatically regenerate when any input data is changed. If non-associative,
  28. /// when input surfaces are detached from the resulting surface, this action will be erased and
  29. /// the resulting surface will not regenerate and become a generic lofted surface.
  30. /// </summary>
  31. ///
  32. class ACDB_PORT AcDbAssocBlendSurfaceActionBody : public AcDbAssocPathBasedSurfaceActionBody
  33. {
  34. public:
  35. ACRX_DECLARE_MEMBERS(AcDbAssocBlendSurfaceActionBody);
  36. /// <summary> Default constructor. </summary>
  37. /// <param name="createImpObject"> See AcDbAssocCreateImpObject explanation. </param>
  38. ///
  39. explicit AcDbAssocBlendSurfaceActionBody(AcDbAssocCreateImpObject createImpObject = kAcDbAssocCreateImpObject);
  40. /// <summary><para>
  41. /// Get continuity of start profile that is used to create the resulting surface
  42. /// </para><para>
  43. /// the same parameter can be accessed through class AcDbAssocAction by calling method
  44. /// getValueParam with name "kContinuityParamName" and index "0".
  45. /// </para></summary>
  46. /// <param name="expression"> Expression of the parameter, empty string if no expression is being used. </param>
  47. /// <param name="evaluatorId"> The id of the expression evaluator that is used to parse the expression, empty string if no expression is being used </param>
  48. /// <returns> Continuity of start profile. It can be 0(G0), 1(G1), 2(G2) </returns>
  49. ///
  50. Adesk::Int16 startEdgeContinuity(AcString& expression = dummyString(), AcString& evaluatorId = dummyString()) const;
  51. /// <summary><para>
  52. /// Set continuity of start profile of the resulting surface
  53. /// </para><para>
  54. /// the same parameter can be set through class AcDbAssocAction by calling method
  55. /// setValueParam with name "kContinuityParamName" and index "0".
  56. /// </para></summary>
  57. /// <param name="value"> New value of the parameter. It can be 0(G0), 1(G1), 2(G2)</param>
  58. /// <param name="expression"> Expression of the parameter, if the value is controlled by other parameters</param>
  59. /// <param name="evaluatorId"> The id of the expression evaluator that is used to parse the expression, if an expression is used. </param>
  60. /// <returns> Acad::ErrorStatus. </returns>
  61. ///
  62. Acad::ErrorStatus setStartEdgeContinuity (Adesk::Int16 value, const AcString& expression = AcString(),
  63. const AcString& evaluatorId = AcString());
  64. /// <summary><para>
  65. /// Get continuity of end profile of the resulting surface
  66. /// </para><para>
  67. /// the same parameter can be accessed through class AcDbAssocAction by calling method
  68. /// getValueParam with name "kContinuityParamName" and index "1".
  69. /// </para></summary>
  70. /// <param name="expression"> Expression of the parameter, empty string if no expression is being used. </param>
  71. /// <param name="evaluatorId"> The id of the expression evaluator that is used to parse the expression, empty string if no expression is being used </param>
  72. /// <returns> Continuity of end edge. It can be 0(G0), 1(G1), 2(G2)</returns>
  73. ///
  74. Adesk::Int16 endEdgeContinuity(AcString& expression = dummyString(), AcString& evaluatorId = dummyString()) const;
  75. /// <summary><para>
  76. /// Set continuity of end profile of the resulting surface
  77. /// </para><para>
  78. /// the same parameter can be set through class AcDbAssocAction by calling method
  79. /// setValueParam with name "kContinuityParamName" and index "1".
  80. /// </para></summary>
  81. /// <param name="value"> New value of the parameter. it can be 0(G0), 1(G1), 2(G2)</param>
  82. /// <param name="expression"> Expression of the parameter, if the value is controlled by other parameters</param>
  83. /// <param name="evaluatorId"> The id of the expression evaluator that is used to parse the expression, if an expression is used. </param>
  84. /// <returns> Acad::ErrorStatus. </returns>
  85. ///
  86. Acad::ErrorStatus setEndEdgeContinuity (Adesk::Int16 value, const AcString& expression = AcString(),
  87. const AcString& evaluatorId = AcString());
  88. /// <summary><para>
  89. /// Get bulge factor of end profile and its possible expression
  90. /// </para><para>
  91. /// the same parameter can be accessed through class AcDbAssocAction by calling method
  92. /// getValueParam with name "kBulgeParamName" and index "0".
  93. /// </para></summary>
  94. /// <param name="expression"> Expression of the parameter, empty string if no expression is being used. </param>
  95. /// <param name="evaluatorId"> The id of the expression evaluator that is used to parse the expression, empty string if no expression is being used </param>
  96. /// <returns> Bulge factor of start profile. </returns>
  97. ///
  98. double startEdgeBulge(AcString& expression = dummyString(), AcString& evaluatorId = dummyString()) const;
  99. /// <summary><para>
  100. /// Set bulge factor of start profile of the resulting surface
  101. /// </para><para>
  102. /// the same parameter can be set through class AcDbAssocAction by calling method
  103. /// setValueParam with name "kBulgeParamName" and index "0".
  104. /// </para></summary>
  105. /// <param name="value"> New value of the parameter. Value must be positive or 0. </param>
  106. /// <param name="expression"> Expression of the parameter, if the value is controlled by other parameters</param>
  107. /// <param name="evaluatorId"> The id of the expression evaluator that is used to parse the expression, if an expression is used. </param>
  108. /// <returns> Acad::ErrorStatus. </returns>
  109. ///
  110. Acad::ErrorStatus setStartEdgeBulge(double value, const AcString& expression = AcString(),
  111. const AcString& evaluatorId = AcString());
  112. /// <summary><para>
  113. /// Get bulge factor of end profile and its possible expression
  114. /// </para><para>
  115. /// the same parameter can be accessed through class AcDbAssocAction by calling method
  116. /// getValueParam with name "kBulgeParamName" and index "1".
  117. /// </para></summary>
  118. /// <param name="expression"> Expression of the parameter, empty string if no expression is being used. </param>
  119. /// <param name="evaluatorId"> The id of the expression evaluator that is used to parse the expression, empty string if no expression is being used </param>
  120. /// <returns> Bulge factor of end edge. </returns>
  121. ///
  122. double endEdgeBulge(AcString& expression = dummyString(), AcString& evaluatorId = dummyString()) const;
  123. /// <summary><para>
  124. /// Set bulge factor of end profile that of the resulting surface.
  125. /// </para><para>
  126. /// the same parameter can be set through class AcDbAssocAction by calling method
  127. /// setValueParam with name "kBulgeParamName" and index "1".
  128. /// </para></summary>
  129. /// <param name="value"> New value of the parameter. Value must be positive or 0. </param>
  130. /// <param name="expression"> Expression of the parameter, if the value is controlled by other parameters</param>
  131. /// <param name="evaluatorId"> The id of the expression evaluator that is used to parse the expression, if an expression is used. </param>
  132. /// <returns> Acad::ErrorStatus. </returns>
  133. ///
  134. Acad::ErrorStatus setEndEdgeBulge(double value, const AcString& expression = AcString(),
  135. const AcString& evaluatorId = AcString());
  136. /// <summary>
  137. /// Get location of continuity grip points
  138. /// </summary>
  139. /// <param name="startEdgePt"> Continuity grip point at start edge. </param>
  140. /// <param name="endEdgePt"> Continuity grip point at end edge. </param>
  141. /// <returns> Acad::ErrorStatus. </returns>
  142. ///
  143. Acad::ErrorStatus getContinuityGripPoints(AcGePoint3d& startEdgePt,
  144. AcGePoint3d& endEdgePt) const;
  145. /// <summary>
  146. /// Get profiles that are used to create the blend surface during action evaluation
  147. /// caller is reponsible for releasing the returned pointers
  148. /// </summary>
  149. /// <param name="pStartProfile"> Start profile. </param>
  150. /// <param name="pEndProfile"> End profile. </param>
  151. /// <returns> Acad::ErrorStatus. </returns>
  152. ///
  153. Acad::ErrorStatus getProfiles(AcDbLoftProfile* & pStartProfile,
  154. AcDbLoftProfile* & pEndProfile) const;
  155. /// <summary>
  156. /// Get blend options used for blend surface
  157. /// </summary>
  158. /// <param name="AcDbBlendOptions"> Blend options. </param>
  159. /// <returns> Acad::ErrorStatus. </returns>
  160. ///
  161. Acad::ErrorStatus getBlendOptions( AcDbBlendOptions& blendOptions ) const;
  162. /// <summary>
  163. /// Set blend options for blend surface
  164. /// </summary>
  165. /// <param name="AcDbBlendOptions"> New blend options. </param>
  166. /// <returns> Acad::ErrorStatus. </returns>
  167. ///
  168. Acad::ErrorStatus setBlendOptions (const AcDbBlendOptions& blendOptions );
  169. /// <summary>
  170. /// Create an instance of AcDbAssocBlendSurfaceActionBody
  171. /// </summary>
  172. /// <param name="resultingSurfaceId"> Id of the resulting surface that will get re-evaluated in the action. </param>
  173. /// <param name="startProfile"> Start profile that is used to create the blend surface. </param>
  174. /// <param name="endProfile"> End profile that is used to create the blend surface. </param>
  175. /// <param name="blendOptions"> Various options used to create the blend surface in ASM. </param>
  176. /// <param name="bEnabled"> Specify if the action is fully associative. If True, the resulting surface will
  177. /// <param name="createdActionId"> Id of created blend surface action. </param>
  178. /// always automatically regenerate itself when any input surfaces are changed. If false, it will be
  179. /// non-associative, which means when input surfaces are detached from the resulting surface, this
  180. /// action will be erased and the resulting surface will not regenerate and become a generic lofted surface. </param>
  181. /// <returns> Acad::ErrorStatus. </returns>
  182. ///
  183. static Acad::ErrorStatus createInstance( const AcDbObjectId& resultingSurfaceId,
  184. const AcDbLoftProfile* startProfile,
  185. const AcDbLoftProfile* endProfile,
  186. const AcDbBlendOptions& blendOptions,
  187. bool bEnabled,
  188. AcDbObjectId& createdActionId);
  189. }; // class AcDbAssocBlendSurfaceActionBody
  190. #pragma pack (pop)