geell3d.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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. // DESCRIPTION:
  12. //
  13. // This file contains the class AcGeEllipArc3d - A mathematical entity
  14. // used to represent an ellipse arc in 3-space.
  15. #ifndef AC_GEELL3D_H
  16. #define AC_GEELL3D_H
  17. #include "gecurv3d.h"
  18. #include "gevec3d.h"
  19. #include "gepnt3d.h"
  20. #include "geintrvl.h"
  21. #include "geponc3d.h"
  22. #include "geplane.h"
  23. #pragma pack (push, 8)
  24. class AcGeEllipArc2d;
  25. class AcGeCircArc3d;
  26. class AcGeLineEnt3d;
  27. class AcGePlanarEnt;
  28. class
  29. GE_DLLEXPIMPORT
  30. AcGeEllipArc3d : public AcGeCurve3d
  31. {
  32. public:
  33. AcGeEllipArc3d();
  34. AcGeEllipArc3d(const AcGeEllipArc3d& ell);
  35. AcGeEllipArc3d(const AcGeCircArc3d& arc);
  36. AcGeEllipArc3d(const AcGePoint3d& cent, const AcGeVector3d& majorAxis,
  37. const AcGeVector3d& minorAxis, double majorRadius,
  38. double minorRadius);
  39. AcGeEllipArc3d(const AcGePoint3d& cent, const AcGeVector3d& majorAxis,
  40. const AcGeVector3d& minorAxis, double majorRadius,
  41. double minorRadius, double ang1, double ang2);
  42. // Return the point on this object that is closest to the other object.
  43. //
  44. AcGePoint3d closestPointToPlane(const AcGePlanarEnt& plane,
  45. AcGePoint3d& pointOnPlane,
  46. const AcGeTol& = AcGeContext::gTol) const;
  47. // Intersection with other geometric objects.
  48. //
  49. Adesk::Boolean intersectWith (const AcGeLinearEnt3d& line, int& intn,
  50. AcGePoint3d& p1, AcGePoint3d& p2,
  51. const AcGeTol& tol = AcGeContext::gTol) const;
  52. Adesk::Boolean intersectWith (const AcGePlanarEnt& plane, int& numOfIntersect,
  53. AcGePoint3d& p1, AcGePoint3d& p2,
  54. const AcGeTol& tol = AcGeContext::gTol) const;
  55. // Projection-intersection with other geometric objects.
  56. //
  57. Adesk::Boolean projIntersectWith(const AcGeLinearEnt3d& line,
  58. const AcGeVector3d& projDir, int &numInt,
  59. AcGePoint3d& pntOnEllipse1,
  60. AcGePoint3d& pntOnEllipse2,
  61. AcGePoint3d& pntOnLine1,
  62. AcGePoint3d& pntOnLine2,
  63. const AcGeTol& tol = AcGeContext::gTol) const;
  64. // Plane of the ellipse
  65. //
  66. void getPlane (AcGePlane& plane) const;
  67. // Inquiry Methods
  68. //
  69. Adesk::Boolean isCircular (const AcGeTol& tol = AcGeContext::gTol) const;
  70. // Test if point is inside full ellipse
  71. //
  72. Adesk::Boolean isInside (const AcGePoint3d& pnt,
  73. const AcGeTol& tol = AcGeContext::gTol) const;
  74. // Definition of ellipse
  75. //
  76. AcGePoint3d center () const;
  77. double minorRadius () const;
  78. double majorRadius () const;
  79. AcGeVector3d minorAxis () const;
  80. AcGeVector3d majorAxis () const;
  81. AcGeVector3d normal () const;
  82. double startAng () const;
  83. double endAng () const;
  84. AcGePoint3d startPoint () const;
  85. AcGePoint3d endPoint () const;
  86. AcGeEllipArc3d& setCenter (const AcGePoint3d& cent);
  87. AcGeEllipArc3d& setMinorRadius(double rad);
  88. AcGeEllipArc3d& setMajorRadius(double rad);
  89. AcGeEllipArc3d& setAxes (const AcGeVector3d& majorAxis, const AcGeVector3d& minorAxis);
  90. AcGeEllipArc3d& setAngles (double startAngle, double endAngle);
  91. AcGeEllipArc3d& set (const AcGePoint3d& cent,
  92. const AcGeVector3d& majorAxis,
  93. const AcGeVector3d& minorAxis,
  94. double majorRadius, double minorRadius);
  95. AcGeEllipArc3d& set (const AcGePoint3d& cent,
  96. const AcGeVector3d& majorAxis,
  97. const AcGeVector3d& minorAxis,
  98. double majorRadius, double minorRadius,
  99. double startAngle, double endAngle);
  100. AcGeEllipArc3d& set (const AcGeCircArc3d&);
  101. // Assignment operator.
  102. //
  103. AcGeEllipArc3d& operator = (const AcGeEllipArc3d& ell);
  104. };
  105. #pragma pack (pop)
  106. #endif