AcDbAssocFaceActionParam.h 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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: Jiri Kripac March 2009
  12. //
  13. //////////////////////////////////////////////////////////////////////////////
  14. #pragma once
  15. #include "AcDbAssocActionParam.h"
  16. #include "AcDbGeomRef.h"
  17. #pragma pack (push, 8)
  18. /// <summary>
  19. /// Action parameter that keeps reference to a face. It uses AcDbAssocGeomDependency
  20. /// to define a persistent reference to a face subentity of an AcDbEntity. Alternatively,
  21. /// it may directly keep the face geometry in the action parameter in the form
  22. /// of an ASM body, instead of referencing some other AcDbEntity.
  23. /// </summary>
  24. ///
  25. class ACDB_PORT AcDbAssocFaceActionParam : public AcDbAssocActionParam
  26. {
  27. public:
  28. ACRX_DECLARE_MEMBERS(AcDbAssocFaceActionParam);
  29. /// <summary> Default constructor. </summary>
  30. /// <param name="createImpObject"> See AcDbAssocCreateImpObject explanation. </param>
  31. ///
  32. explicit AcDbAssocFaceActionParam(AcDbAssocCreateImpObject createImpObject = kAcDbAssocCreateImpObject);
  33. /// <summary><para>
  34. /// The input AcDbFaceRef is a non-persistent reference to a face geometry,
  35. /// the AcDbAssocEdgeActionParam will make a persistent reference to that face.
  36. /// </para><para>
  37. /// Refer to AcDbAssocGeomDependency class that is used to create a persistent
  38. /// dependency on the referenced face subentity. If it is constant geometry
  39. /// in the form of a face of an ASM body, no dependency is created.
  40. /// </para></summary>
  41. /// <param name="faceRef">
  42. /// Reference to a "face" subentity of an entity, or constant geometry in the
  43. /// form of a face of an ASM body. See AcDbFaceRef for details.
  44. /// </param>
  45. /// <param name="isReadDependency"> Read-dependency on the entity should be created. </param>
  46. /// <param name="isWriteDependency"> Write-dependency on the entity should be created. </param>
  47. /// <param name="dependencyOrder">
  48. /// Specifies position of the created dependency in the ordered list of
  49. /// dependencies on the entity. See AcDbAssocDependency::setOrder(int) method.
  50. /// </param>
  51. /// <returns> Acad::ErrorStatus. </returns>
  52. ///
  53. virtual Acad::ErrorStatus setFaceRef(const AcDbFaceRef& faceRef, bool isReadDependency = true, bool isWriteDependency = false, int dependencyOrder = 0);
  54. /// <summary> <para>
  55. /// Returns references to the transient subentities of an AcDbEntity, that
  56. /// correspond to the persistent subentity that this face action parameter
  57. /// references. It can also be a constant geometry in the form of a face of
  58. /// an ASM body. See AcDbFaceRef for details.
  59. /// </para><para>
  60. /// When a single face (such as face of a solid or surface) is referenced by
  61. /// this AcDbAssocFaceActionParam and some parameters of the solid/surface
  62. /// are changed and the solid/surface is re-evaluated from its actions, this
  63. /// single face may then correspond to any number of faces, because the original
  64. /// face might have gotten split, merged, or even may have disappeared. That
  65. /// is why the output is an array of FaceRefs, but in typical case the array
  66. /// will contain just a single element.
  67. /// </para><para>
  68. /// Refer to AcDbAssocGeomDependency class that is used to create a persistent
  69. /// dependency on the referenced face subentity.
  70. /// </para></summary>
  71. /// <param name="faceRefs">
  72. /// References to the transient subentities of an AcDbEntity, that correspond
  73. /// to the persistent subentity that this face action parameter references.
  74. /// See AcDbFaceRef for details.
  75. /// </param>
  76. /// <returns> Acad::ErrorStatus. </returns>
  77. ///
  78. virtual Acad::ErrorStatus getFaceRef(AcArray<AcDbFaceRef>& faceRefs) const;
  79. /// <summary><para>
  80. /// Sets new geometry of the referenced subentity of the AcDbEntity the action parameter
  81. /// depends on via an AcDbAssocDependency or AcDbAssocGeomDependency.
  82. /// If the action parameter currently references more than one subentity of the AcDbEntity
  83. /// (e.g. because the original single subentity was split into several subentities),
  84. /// it returns eNotApplicable. This is because the most common use case is to set the
  85. /// subentity geometry if only a single subentity is referenced by the action parameter.
  86. /// </para><para>
  87. /// If client code needs to set geometry of the individual subentities the action parameter
  88. /// references, it needs to do it manually through the dependencies of the action parameter.
  89. /// </para></summary>
  90. /// <param name="pNewFaceSurface"> New surface of the face subentity (copied, not reused). </param>
  91. /// <returns> Acad::ErrorStatus. </returns>
  92. ///
  93. virtual Acad::ErrorStatus setFaceSubentityGeometry(const AcGeSurface* pNewFaceSurface);
  94. /// <summary>
  95. /// If this action parameter depends on an AcDbEntity via an AcDbAssocGeomDependency,
  96. /// it returns AcDbCompoundObjectId of the entity this dependency depends on.
  97. /// </summary>
  98. /// <param name="compoundId">
  99. /// The AcDbCompoundObjectId of the entity this action parameter depends on,
  100. /// or an empty compound object id if the action parameter does not depend
  101. /// on any entity.
  102. /// </param>
  103. /// <returns> Acad::ErrorStatus. </returns>
  104. ///
  105. Acad::ErrorStatus getDependentOnCompoundObject(AcDbCompoundObjectId& compoundId) const;
  106. };
  107. #pragma pack (pop)