dbBlendOptions.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. //
  2. //
  3. //////////////////////////////////////////////////////////////////////////////
  4. //
  5. // Copyright 2015 Autodesk, Inc. All rights reserved.
  6. //
  7. // Use of this software is subject to the terms of the Autodesk license
  8. // agreement provided at the time of installation or download, or which
  9. // otherwise accompanies this software in either electronic or hard copy form.
  10. //
  11. //////////////////////////////////////////////////////////////////////////////
  12. //
  13. //
  14. // DESCRIPTION:
  15. //
  16. // The AcDbBlendOptions class is used to encapsulate options for
  17. // blend surface.
  18. #pragma once
  19. #ifndef DBBLENDOPTIONS_H
  20. #define DBBLENDOPTIONS_H
  21. #include "acdb.h"
  22. #pragma pack(push, 8)
  23. /// <summary>Utility class to specify options for blend surface. </summary>
  24. ///
  25. class ACDB_PORT AcDbBlendOptions
  26. {
  27. public:
  28. /// <summary> Default constructor. </summary>
  29. ///
  30. AcDbBlendOptions ();
  31. /// <summary> Default destructor. </summary>
  32. ///
  33. ~AcDbBlendOptions ();
  34. /// <summary>
  35. /// <para>The drive mode property defines which section(s) "drive" the creation of the planes </para>
  36. /// <para>containing the planar guides. Any of the two input sections can be selected for </para>
  37. /// <para>that role, or both of them can be used at the same time (the default value). </para>
  38. /// <para>The implementation uses the driving sections in conjunction with the coplanar point </para>
  39. /// <para>and direction (if supplied).</para>
  40. /// </summary>
  41. ///
  42. enum DriveModeType {
  43. kDriveModeFirst = 0,
  44. kDriveModeSecond = 1,
  45. kDriveModeBoth = 2
  46. };
  47. /// <summary>Assignment operator for AcDbBlendOptions.</summary>
  48. /// <param name="src">Input specifying source AcDbBlendOptions object</param>
  49. /// <returns>Return AcDbBlendOptions object</returns>
  50. ///
  51. AcDbBlendOptions& operator = ( const AcDbBlendOptions& src );
  52. /// <summary>
  53. /// <para>The simplify option allows the application to replace the output ASM procedural </para>
  54. /// <para>blend spline surface with an analytic surface, but only if the analytic surface </para>
  55. /// <para>is an exact match. This option is enabled by default.</para>
  56. /// </summary>
  57. /// <returns>Return true or false. The default value is true. </returns>
  58. ///
  59. bool simplify () const;
  60. /// <summary>
  61. /// <para>The simplify option allows the application to replace the output ASM procedural </para>
  62. /// <para>blend spline surface with an analytic surface, but only if the analytic surface </para>
  63. /// <para>is an exact match. This option is enabled by default.</para>
  64. /// </summary>
  65. /// <param name="val"> Input specifying true or false </param>
  66. /// <returns> Return Acad::eOk if successful. </returns>
  67. Acad::ErrorStatus setSimplify ( bool val );
  68. /// <summary>
  69. /// <para>The solid option allows the implementation to stitch the output surface to the </para>
  70. /// <para>input section curves in order to produce a solid body. This function is reserved </para>
  71. /// <para>for future use. Currently, blend surface always output an surface. It cannot </para>
  72. /// <para>output solid.</para>
  73. /// </summary>
  74. /// <returns>Return true or false.</returns>
  75. ///
  76. bool solid () const;
  77. /// <summary>
  78. /// <para>The solid option allows the implementation to stitch the output surface to the </para>
  79. /// <para>input section curves in order to produce a solid body. This function is reserved </para>
  80. /// <para>for future use. Currently, blend surface always output an surface. It cannot </para>
  81. /// <para>output solid.</para>
  82. /// </summary>
  83. /// <param name="val">Input specifying true or false</param>
  84. /// <returns>Return Acad::eOk if successful.</returns>
  85. ///
  86. Acad::ErrorStatus setSolid ( bool val );
  87. /// <summary>
  88. /// <para>The quality option controls how many planar curves (aka planar guides) blending </para>
  89. /// <para>between the input sections are made by the implementation to constrain the </para>
  90. /// <para>output surface. More planar guides will result in a blend surface that has a </para>
  91. /// <para>better shape; however, the representation of the surface becomes more complex </para>
  92. /// <para>which results in larger storage requirements and larger evaluation times. The </para>
  93. /// <para>default value is 5. The value of 0 has a special meaning: In this case the </para>
  94. /// <para>output surface will coincide with the standard loft output for the same input </para>
  95. /// <para>sections and might have a significantly different shape from the surface </para>
  96. /// <para>produced for a quality value >=1.</para>
  97. /// </summary>
  98. /// <returns>Return an unsigned integer</returns>
  99. ///
  100. unsigned int quality () const;
  101. /// <summary>
  102. /// <para>The quality option controls how many planar curves (aka planar guides) blending </para>
  103. /// <para>between the input sections are made by the implementation to constrain the </para>
  104. /// <para>output surface. More planar guides will result in a blend surface that has a </para>
  105. /// <para>better shape; however, the representation of the surface becomes more complex </para>
  106. /// <para>which results in larger storage requirements and larger evaluation times. The </para>
  107. /// <para>default value is 5. The value of 0 has a special meaning: In this case the </para>
  108. /// <para>output surface will coincide with the standard loft output for the same input </para>
  109. /// <para>sections and might have a significantly different shape from the surface </para>
  110. /// <para>produced for a quality value >=1.</para>
  111. /// </summary>
  112. /// <param name="val">Input specifying a non-negative integer value for quality</param>
  113. /// <returns>Return Acad::eOk if successful</returns>
  114. ///
  115. Acad::ErrorStatus setQuality ( unsigned int val );
  116. /// <summary>
  117. /// <para>The coplanar point is an optional property that can be supplied to constrain the </para>
  118. /// <para>set of planes containing the planar guides made by the implementation. If set, </para>
  119. /// <para>all guide planes will contain it. By default no coplanar point is set. This </para>
  120. /// <para>option is useful in conjunction with the coplanar direction option to define an </para>
  121. /// <para>axis contained by all guide planes. An example where such an axis is useful is a </para>
  122. /// <para>blend operation between involving a cone: The customer application might prefer </para>
  123. /// <para>that all guides planes to contain the cone axis.</para>
  124. /// </summary>
  125. /// <returns>Return an AcGePoint3d point</returns>
  126. ///
  127. AcGePoint3d* coplanarPoint () const;
  128. /// <summary>
  129. /// <para>The coplanar point is an optional property that can be supplied to constrain the </para>
  130. /// <para>set of planes containing the planar guides made by the implementation. If set, </para>
  131. /// <para>all guide planes will contain it. By default no coplanar point is set. This </para>
  132. /// <para>option is useful in conjunction with the coplanar direction option to define an </para>
  133. /// <para>axis contained by all guide planes. An example where such an axis is useful is a </para>
  134. /// <para>blend operation between involving a cone: The customer application might prefer </para>
  135. /// <para>that all guides planes to contain the cone axis.</para>
  136. /// </summary>
  137. /// <param name="pPt">Input specifying an AcGePoint3d point</param>
  138. /// <returns>Return Acad::eOk if successful</returns>
  139. ///
  140. Acad::ErrorStatus setCoplanarPoint ( const AcGePoint3d* pPt );
  141. /// <summary>
  142. /// <para>The coplanar direction is an optional property that can be supplied to constrain </para>
  143. /// <para>the set of planes containing the planar guides made by the implementation. If </para>
  144. /// <para>set, all guide planes will contain it (i.e. are parallel to it). By default no </para>
  145. /// <para>coplanar direction is set.</para>
  146. /// </summary>
  147. /// <returns>Return an AcGeVector3d vector</returns>
  148. ///
  149. AcGeVector3d* coplanarDirection () const;
  150. /// <summary>
  151. /// <para>The coplanar direction is an optional property that can be supplied to constrain </para>
  152. /// <para>the set of planes containing the planar guides made by the implementation. If </para>
  153. /// <para>set, all guide planes will contain it (i.e. are parallel to it). By default no </para>
  154. /// <para>coplanar direction is set.</para>
  155. /// </summary>
  156. /// <param name="pDir">Input specifying AcGeVector3d vector for coplanar direction</param>
  157. /// <returns>Return Acad::eOk if successful</returns>
  158. ///
  159. Acad::ErrorStatus setCoplanarDirection ( const AcGeVector3d* pDir );
  160. /// <summary>
  161. /// <para>The drive mode property defines which section(s) "drive" the creation of the </para>
  162. /// <para>planes containing the planar guides. Any of the two input sections can be </para>
  163. /// <para>selected for that role, or both of them can be used at the same time (the </para>
  164. /// <para>default value). The implementation uses the driving sections in conjunction with </para>
  165. /// <para>the coplanar point and direction (if supplied).</para>
  166. /// </summary>
  167. /// <returns>Return 0,1 or 2 representing kDriveModeFirst, kDriveModeSecond or DriveModeBoth respectively.</returns>
  168. ///
  169. AcDbBlendOptions::DriveModeType driveMode () const;
  170. /// <summary>
  171. /// <para>The drive mode property defines which section(s) "drive" the creation of the </para>
  172. /// <para>planes containing the planar guides. Any of the two input sections can be </para>
  173. /// <para>selected for that role, or both of them can be used at the same time (the </para>
  174. /// <para>default value). The implementation uses the driving sections in conjunction with </para>
  175. /// <para>the coplanar point and direction (if supplied).</para>
  176. /// </summary>
  177. /// <param name="val">Input integer of value 0, 1, or 2 representing kDriveModeFirst, kDriveModeSecond or DriveModeBoth respectively.</param>
  178. /// <returns>Return Acad::eOk if successful</returns>
  179. ///
  180. Acad::ErrorStatus setDriveMode( AcDbBlendOptions::DriveModeType val );
  181. private:
  182. void *mpImpBlendOptions;
  183. friend class AcDbImpBlendOptions;
  184. };
  185. #pragma pack(pop)
  186. #endif // DBBLENDOPTIONS_H