AcDbAssocExtendSurfaceActionBody.h 5.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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 May 2009
  12. //
  13. //////////////////////////////////////////////////////////////////////////////
  14. #pragma once
  15. #include "AcDbAssocPathBasedSurfaceActionBody.h"
  16. #pragma pack (push, 8)
  17. /// <summary>
  18. /// Action that sets the contents of AcDbSurface created by edge extension, this action can works
  19. /// for both the extend modes: 1. append mode and it is a creation action, a new surface is created
  20. /// by extending given edges of the input surface. The surface will update itself when input surface
  21. /// is modified. In this mode, the action can be fully associative or semi-associative. if fully
  22. /// associative, the resulting surface will always automatically regenerate when any input data is changed.
  23. /// If semi-associative, when input surfaces are detached from the resulting surface, this action will be
  24. /// erased and the resulting surface will not regenerate and become a generic surface.
  25. /// 2. merge mode as a modification action, instead of creating a new surface, this action modifies
  26. /// the input surface by extending its given edges.
  27. /// </summary>
  28. ///
  29. class ACDB_PORT AcDbAssocExtendSurfaceActionBody : public AcDbAssocPathBasedSurfaceActionBody
  30. {
  31. public:
  32. ACRX_DECLARE_MEMBERS(AcDbAssocExtendSurfaceActionBody);
  33. /// <summary> Default constructor. </summary>
  34. /// <param name="createImpObject"> See AcDbAssocCreateImpObject explanation. </param>
  35. ///
  36. explicit AcDbAssocExtendSurfaceActionBody(AcDbAssocCreateImpObject createImpObject = kAcDbAssocCreateImpObject);
  37. /// <summary><para>
  38. /// Set extension distance
  39. /// </para><para>
  40. /// the same parameter can be set through class AcDbAssocAction by calling method
  41. /// setValueParam with name "kExtendDistanceParamName".
  42. /// </para></summary>
  43. /// <param name="distance"> New value of the extension distance, must be positive. </param>
  44. /// <param name="expression"> Expression of the parameter, if the value is controlled by other parameters</param>
  45. /// <param name="evaluatorId"> The id of the expression evaluator that is used to parse the expression, if an expression is used. </param>
  46. /// <returns> Acad::ErrorStatus. </returns>
  47. ///
  48. Acad::ErrorStatus setDistance(double distance, const AcString& expression = AcString(),
  49. const AcString& evaluatorId = AcString());
  50. /// <summary><para>
  51. /// Get extension distance and its possible expression
  52. /// </para><para>
  53. /// the same parameter can be accessed through class AcDbAssocAction by calling method
  54. /// getValueParam with name "kExtendDistanceParamName".
  55. /// </para></summary>
  56. /// <param name="expression"> Expression of the parameter, empty string if no expression is being used. </param>
  57. /// <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>
  58. /// <returns> Extension distance. </returns>
  59. ///
  60. double distance(AcString& expression = dummyString(), AcString& evaluatorId = dummyString()) const;
  61. /// <summary>
  62. /// Create an instance of AcDbAssocExtendSurfaceActionBody
  63. /// </summary>
  64. /// <param name="resultingSurfaceId"> Resulting surface id, in append mode, it will ge the new surface id, for merge mode, it should be the id of the input surface. </param>
  65. /// <param name="extendEdges"> Extension edges of input surface. </param>
  66. /// <param name="distance"> Extension distance. </param>
  67. /// <param name="option"> Extension options, specify the mode of extend operation (append, merge etc.), it should be the same as argument "extOption" in AcDbSurface::extendEdges(). </param>
  68. /// <param name="bEnabled"> Specify if the action is fully associative. Only applies in append mode. If True, the resulting surface will
  69. /// <param name="createdActionId"> Id of created action. </param>
  70. /// always automatically regenerate itself when any input surfaces are changed. If false, it will be
  71. /// non-associative, which means when input surfaces are detached from the resulting surface, this
  72. /// action will be erased and the resulting surface will not regenerate and become a generic surface. </param>
  73. /// <returns> Acad::ErrorStatus. </returns>
  74. ///
  75. static Acad::ErrorStatus createInstance( const AcDbObjectId& resultingSurfaceId,
  76. const AcArray<AcDbEdgeRef>& extendEdges,
  77. double distance,
  78. AcDbSurface::EdgeExtensionType option,
  79. bool bEnabled,
  80. AcDbObjectId& createdActionId );
  81. }; // class AcDbAssocExtendSurfaceActionBody
  82. #pragma pack (pop)