AcDbAssocOffsetSurfaceActionBody.h 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. //////////////////////////////////////////////////////////////////////////////
  14. #pragma once
  15. #include "AcDbAssocSurfaceActionBody.h"
  16. #pragma pack (push, 8)
  17. /// <summary>
  18. /// Action that sets the contents of AcDbSurface entity create by surface offset operation.
  19. /// The action can be fully associative or semi-associative. If fully associative, the resulting
  20. /// surface will always automatically regenerate when any input data is changed. If semi-associative,
  21. /// when the geometry of input surfaces is changed, this action will be erased and
  22. /// the resulting surface will not regenerate and become a generic surface.
  23. /// </summary>
  24. ///
  25. class ACDB_PORT AcDbAssocOffsetSurfaceActionBody : public AcDbAssocSurfaceActionBody
  26. {
  27. public:
  28. ACRX_DECLARE_MEMBERS(AcDbAssocOffsetSurfaceActionBody);
  29. /// <summary> Default constructor. </summary>
  30. /// <param name="createImpObject"> See AcDbAssocCreateImpObject explanation. </param>
  31. ///
  32. explicit AcDbAssocOffsetSurfaceActionBody(AcDbAssocCreateImpObject createImpObject = kAcDbAssocCreateImpObject);
  33. /// <summary>
  34. /// Set offset distance
  35. /// </summary>
  36. /// the same parameter can be set through class AcDbAssocAction by calling method
  37. /// setValueParam with name "kOffsetDistanceParamName".
  38. /// <param name="distance"> New value of the extension distance, must be non-zero. </param>
  39. /// <param name="expression"> Expression of the parameter, if the value is controlled by other parameters</param>
  40. /// <param name="evaluatorId"> The id of the expression evaluator that is used to parse the expression, if an expression is used. </param>
  41. /// <returns> Acad::ErrorStatus. </returns>
  42. ///
  43. Acad::ErrorStatus setDistance(double distance, const AcString& expression = AcString(),
  44. const AcString& evaluatorId = AcString());
  45. /// <summary><para>
  46. /// Get offset distance and its possible expression
  47. /// </para><para>
  48. /// the same parameter can be accessed through class AcDbAssocAction by calling method
  49. /// getValueParam with name "kOffsetDistanceParamName".
  50. /// </para></summary>
  51. /// <param name="expression"> Expression of the parameter, empty string if no expression is being used. </param>
  52. /// <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>
  53. /// <returns> Offset distance. </returns>
  54. ///
  55. double distance(AcString& expression = dummyString(), AcString& evaluatorId = dummyString()) const;
  56. /// <summary>
  57. /// Create an instance of AcDbAssocOffsetSurfaceActionBody
  58. /// </summary>
  59. /// <param name="resultingSurfaceId"> Resulting offset surface id. </param>
  60. /// <param name="inputSurfaceId1"> Id of input surface that used to create the new offset surface. </param>
  61. /// <param name="distance"> Offset distance that used to create the new offset surface. </param>
  62. /// <param name="createdActionId"> Id of created action. </param>
  63. /// <param name="bEnabled"> Specify if the action is fully associative. if True, the resulting surface will
  64. /// always automatically regenerate itself when input data is changed. If false, it will be
  65. /// semi-associative, which means when the geometry input surface is changed, this
  66. /// action will be erased and the resulting surface will not regenerate and become a generic surface. </param>
  67. /// <returns> Acad::ErrorStatus. </returns>
  68. ///
  69. static Acad::ErrorStatus createInstance( const AcDbObjectId& resultingSurfaceId,
  70. const AcDbObjectId& inputSurfaceId,
  71. double distance,
  72. bool bEnabled,
  73. AcDbObjectId& createdActionId);
  74. }; // class AcDbAssocOffsetSurfaceActionBody
  75. #pragma pack (pop)