gessint.h 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. //
  2. //////////////////////////////////////////////////////////////////////////////
  3. //
  4. // Copyright 2015 Autodesk, Inc. All rights reserved.
  5. //
  6. // Use of this software is subject to the terms of the Autodesk license
  7. // agreement provided at the time of installation or download, or which
  8. // otherwise accompanies this software in either electronic or hard copy form.
  9. //
  10. //////////////////////////////////////////////////////////////////////////////
  11. //
  12. // Description: class AcGeSurfSurfInt to hold data for intersections
  13. // of two surfaces.
  14. #ifndef AC_GESSINT_H
  15. #define AC_GESSINT_H
  16. #include "adesk.h"
  17. #include "geent3d.h"
  18. #include "gegbl.h"
  19. #include "gegblabb.h"
  20. #pragma pack (push, 8)
  21. class AcGeCurve3d;
  22. class AcGeCurve2d;
  23. class AcGeSurface;
  24. // The intersection class constructor references surface objects, but the
  25. // intersection object does not own them. The surface objects are linked to the
  26. // intersection object. On deletion or modification of one of them, internal
  27. // intersection results are marked as invalid and to be re-computed.
  28. //
  29. // Computation of the intersection does not happen on construction or set(), but
  30. // on demand from one of the query functions..
  31. //
  32. // Any output geometry from an intersection object is owned by the caller. The
  33. // const base objects returned by surface1() and surface2() are not considered
  34. // output objects.
  35. //
  36. class
  37. GX_DLLEXPIMPORT
  38. AcGeSurfSurfInt : public AcGeEntity3d
  39. {
  40. public:
  41. // Constructors.
  42. //
  43. AcGeSurfSurfInt ();
  44. AcGeSurfSurfInt (
  45. const AcGeSurface& srf1,
  46. const AcGeSurface& srf2,
  47. const AcGeTol& tol = AcGeContext::gTol );
  48. AcGeSurfSurfInt (const AcGeSurfSurfInt& src);
  49. // General query functions.
  50. //
  51. const AcGeSurface *surface1 () const;
  52. const AcGeSurface *surface2 () const;
  53. AcGeTol tolerance () const;
  54. // Intersection query methods.
  55. //
  56. int numResults (AcGe::AcGeIntersectError& err) const;
  57. // Counts the number of intersection results of any dimension.
  58. AcGeCurve3d* intCurve (int intNum, Adesk::Boolean isExternal, AcGe::AcGeIntersectError& err) const;
  59. // Returns NULL if the dimension of this intersection is not 1.
  60. AcGeCurve2d* intParamCurve(int num, Adesk::Boolean isExternal, Adesk::Boolean isFirst, AcGe::AcGeIntersectError& err) const;
  61. // Returns NULL if the dimension of this intersection is not 1.
  62. // if isFirst returns parameter curve on 1st surface, otherwise returns parameter curve on 2nd surface.
  63. AcGePoint3d intPoint (int intNum, AcGe::AcGeIntersectError& err) const;
  64. // Invalid return if the dimension of this intersection is not 0.
  65. void getIntPointParams (int intNum,
  66. AcGePoint2d& param1, AcGePoint2d& param2, AcGe::AcGeIntersectError& err) const;
  67. void getIntConfigs (int intNum, AcGe::ssiConfig& surf1Left, AcGe::ssiConfig& surf1Right,
  68. AcGe::ssiConfig& surf2Left, AcGe::ssiConfig& surf2Right,
  69. AcGe::ssiType& intType, int& dim, AcGe::AcGeIntersectError& err ) const;
  70. int getDimension (int intNum, AcGe::AcGeIntersectError& err) const;
  71. AcGe::ssiType getType(int intNum, AcGe::AcGeIntersectError& err ) const;
  72. // Set functions.
  73. //
  74. AcGeSurfSurfInt& set (const AcGeSurface& srf1,
  75. const AcGeSurface& srf2,
  76. const AcGeTol& tol = AcGeContext::gTol);
  77. // Assignment operator.
  78. //
  79. AcGeSurfSurfInt& operator = (const AcGeSurfSurfInt& crvInt);
  80. };
  81. #pragma pack (pop)
  82. #endif