gecint3d.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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: class AcGeCurveCurveInt3d to hold data for intersectios
  12. // of two 3d curves
  13. #ifndef AC_GECINT3D_H
  14. #define AC_GECINT3D_H
  15. #include "adesk.h"
  16. #include "geent3d.h"
  17. #include "geponc3d.h"
  18. #include "geintrvl.h"
  19. #pragma pack (push, 8)
  20. class AcGeCurve3d;
  21. class
  22. GE_DLLEXPIMPORT
  23. AcGeCurveCurveInt3d : public AcGeEntity3d
  24. {
  25. public:
  26. // Constructors.
  27. //
  28. AcGeCurveCurveInt3d ();
  29. AcGeCurveCurveInt3d (const AcGeCurve3d& curve1, const AcGeCurve3d& curve2,
  30. const AcGeVector3d& planeNormal =
  31. AcGeVector3d::kIdentity,
  32. const AcGeTol& tol = AcGeContext::gTol );
  33. AcGeCurveCurveInt3d (const AcGeCurve3d& curve1, const AcGeCurve3d& curve2,
  34. const AcGeInterval& range1, const AcGeInterval& range2,
  35. const AcGeVector3d& planeNormal=AcGeVector3d::kIdentity,
  36. const AcGeTol& tol = AcGeContext::gTol);
  37. AcGeCurveCurveInt3d (const AcGeCurveCurveInt3d& src);
  38. // General query functions.
  39. //
  40. const AcGeCurve3d *curve1 () const;
  41. const AcGeCurve3d *curve2 () const;
  42. void getIntRanges (AcGeInterval& range1,
  43. AcGeInterval& range2) const;
  44. AcGeVector3d planeNormal () const;
  45. AcGeTol tolerance () const;
  46. // Intersection query methods.
  47. //
  48. int numIntPoints () const;
  49. AcGePoint3d intPoint (int intNum) const;
  50. void getIntParams (int intNum,
  51. double& param1, double& param2) const;
  52. void getPointOnCurve1 (int intNum, AcGePointOnCurve3d& pntOnCrv) const;
  53. void getPointOnCurve2 (int intNum, AcGePointOnCurve3d& pntOnCrv) const;
  54. void getIntConfigs (int intNum, AcGe::AcGeXConfig& config1wrt2,
  55. AcGe::AcGeXConfig& config2wrt1) const;
  56. Adesk::Boolean isTangential (int intNum) const;
  57. Adesk::Boolean isTransversal (int intNum) const;
  58. double intPointTol (int intNum) const;
  59. int overlapCount () const;
  60. Adesk::Boolean overlapDirection () const;
  61. void getOverlapRanges (int overlapNum,
  62. AcGeInterval& range1,
  63. AcGeInterval& range2) const;
  64. // Curves change their places
  65. //
  66. void changeCurveOrder ();
  67. // Order with respect to parameter on the first/second curve.
  68. //
  69. AcGeCurveCurveInt3d& orderWrt1 ();
  70. AcGeCurveCurveInt3d& orderWrt2 ();
  71. // Set functions.
  72. //
  73. AcGeCurveCurveInt3d& set (const AcGeCurve3d& curve1,
  74. const AcGeCurve3d& curve2,
  75. const AcGeVector3d& planeNormal =
  76. AcGeVector3d::kIdentity,
  77. const AcGeTol& tol = AcGeContext::gTol);
  78. AcGeCurveCurveInt3d& set (const AcGeCurve3d& curve1,
  79. const AcGeCurve3d& curve2,
  80. const AcGeInterval& range1,
  81. const AcGeInterval& range2,
  82. const AcGeVector3d& planeNormal =
  83. AcGeVector3d::kIdentity,
  84. const AcGeTol& tol = AcGeContext::gTol);
  85. // Assignment operator.
  86. //
  87. AcGeCurveCurveInt3d& operator = (const AcGeCurveCurveInt3d& src);
  88. };
  89. #pragma pack (pop)
  90. #endif