dbLoftOptions.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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. //
  12. // DESCRIPTION:
  13. //
  14. // The AcDbSurface class is the interface class for representing
  15. // ASM surfaces inside AutoCAD.
  16. #pragma once
  17. #ifndef DBLOFTOPTIONS_H
  18. #define DBLOFTOPTIONS_H
  19. #include "dbmain.h"
  20. #include "dbsubeid.h"
  21. #include "gepnt3d.h"
  22. #include "gevec3d.h"
  23. #include "dbbody.h"
  24. #pragma pack(push, 8)
  25. // Utility class for setting options used by createLoftedSurface().
  26. class AcDbLoftOptions
  27. {
  28. public:
  29. AcDbLoftOptions ();
  30. AcDbLoftOptions ( const AcDbLoftOptions& src );
  31. ~AcDbLoftOptions ();
  32. // Assignment operator.
  33. AcDbLoftOptions& operator = ( const AcDbLoftOptions& src );
  34. bool operator == (const AcDbLoftOptions&) const;
  35. enum NormalOption {
  36. kNoNormal,
  37. kFirstNormal,
  38. kLastNormal,
  39. kEndsNormal,
  40. kAllNormal,
  41. kUseDraftAngles
  42. };
  43. // Get/set start draft angle.
  44. double draftStart () const;
  45. void setDraftStart ( double ang );
  46. // Get/set end draft angle.
  47. double draftEnd () const;
  48. void setDraftEnd ( double ang );
  49. // Get/set start draft magnitude.
  50. double draftStartMag () const;
  51. void setDraftStartMag ( double val );
  52. // Get/set end draft magnitude.
  53. double draftEndMag () const;
  54. void setDraftEndMag ( double val );
  55. // Get/set arc-length parameterization.
  56. bool arcLengthParam () const;
  57. void setArcLengthParam ( bool val );
  58. // Get/set twist option.
  59. bool noTwist () const;
  60. void setNoTwist ( bool val );
  61. // Get/set align option.
  62. bool alignDirection () const;
  63. void setAlignDirection ( bool val );
  64. // Get/set simplify option.
  65. bool simplify () const;
  66. void setSimplify ( bool val );
  67. // Get/set closed option.
  68. bool closed () const;
  69. void setClosed ( bool val );
  70. // Get/set periodic option.
  71. bool periodic () const;
  72. void setPeriodic ( bool val );
  73. // Get/set ruled option.
  74. bool ruled () const;
  75. void setRuled ( bool val );
  76. // Get/set virtual guide option.
  77. bool virtualGuide () const;
  78. void setVirtualGuide ( bool val );
  79. // Get/set plane normal option.
  80. AcDbLoftOptions::NormalOption normal () const;
  81. void setNormal ( AcDbLoftOptions::NormalOption val );
  82. // Set loft options from current values of system variables.
  83. Acad::ErrorStatus setOptionsFromSysvars ();
  84. // Set system variables from loft options.
  85. Acad::ErrorStatus setSysvarsFromOptions ();
  86. // Check for valid combinations of options.
  87. Acad::ErrorStatus checkOptions ( bool displayErrorMessages = false );
  88. // Utility functions.
  89. Acad::ErrorStatus checkLoftCurves (
  90. AcArray<AcDbEntity*>& crossSectionCurves,
  91. AcArray<AcDbEntity*>& guideCurves,
  92. AcDbEntity* pPathCurve,
  93. bool& allOpen, bool& allClosed, bool& allPlanar,
  94. bool displayErrorMessages = false );
  95. Acad::ErrorStatus checkCrossSectionCurves (
  96. AcArray<AcDbEntity*>& crossSectionCurves,
  97. bool& allOpen, bool& allClosed, bool& allPlanar,
  98. bool displayErrorMessages = false );
  99. Acad::ErrorStatus checkGuideCurves ( AcArray<AcDbEntity*>& guideCurves,
  100. bool displayErrorMessages = false );
  101. Acad::ErrorStatus checkPathCurve ( AcDbEntity *pPathCurve,
  102. bool displayErrorMessages = false );
  103. private:
  104. void *mpImpLoftOptions;
  105. friend class AcDbImpLoftOptions;
  106. };
  107. #pragma pack(pop)
  108. #endif // DBLOFTOPTIONS_H