gecbndry.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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:
  13. //
  14. // This files implements the class AcGeCurveBoundary, which represents
  15. // the geometric content typically associated with a face loop.
  16. // A face loop is represented as arrays of 3d curves (edge geometry),
  17. // sense of edges, 2d curves (coedge geometry in the surfae parameter
  18. // space), sense of coedges.
  19. // In general, there is a one-to-one correspondence among all arrays that
  20. // are present. However, certain elements of either curve arrays could
  21. // be NULL. For example, the four tuple (curve3d, NULL, kFalse, kTrue)
  22. // is legal. In this case, the boolean sense on curve 2d is may or may
  23. // not be meaningless, depending on the symantics of the usage of this
  24. // class (consider that in ACIS, the sense of the coedge is relative to
  25. // the edge, and not the parameter space curve).
  26. //
  27. // Loop degeneracies are represented as follows.
  28. // 1. Entire loop degenerate to a single model space point, which is
  29. // represented by the tuple (numElements = 1, position3d, curve2d).
  30. // The curve2d may be NULL. The edge sense, and the curve2d sense are
  31. // irrelevant. isDegenerate() method allows the dermination of this
  32. // condition on a loop.
  33. // 2. Loop consisting of one or more model space degeneracies.
  34. // This case is represented as the general case with those edges that are
  35. // degenerate represented by position3d. This implies that in the
  36. // general case, model space geometry of a curve boundary may consist of
  37. // curve3d and/or position3d pointers. Consequently, this geometry is
  38. // obtained by the user as entity3d pointers. The degeneracy of a
  39. // constituent edge can be detected by the type of the model space
  40. // geometry.
  41. //
  42. // This class also supports the ownership of its geometry. Being the
  43. // owner of its geometry would cause it to remove the geometry on
  44. // destruction of an instance of the class.
  45. //
  46. #ifndef AC_GECBNDRY_H
  47. #define AC_GECBNDRY_H
  48. #include "gegbl.h"
  49. #pragma pack (push, 8)
  50. class AcGeCurve2d;
  51. class AcGeEntity3d;
  52. class AcGePosition3d;
  53. class AcGeImpCurveBoundary;
  54. class
  55. GX_DLLEXPIMPORT
  56. AcGeCurveBoundary
  57. {
  58. public:
  59. AcGeCurveBoundary();
  60. AcGeCurveBoundary(int numberOfCurves, const AcGeEntity3d *const * crv3d,
  61. const AcGeCurve2d *const * crv2d,
  62. Adesk::Boolean* orientation3d,
  63. Adesk::Boolean* orientation2d,
  64. Adesk::Boolean makeCopy = Adesk::kTrue);
  65. AcGeCurveBoundary(const AcGeCurveBoundary&);
  66. ~AcGeCurveBoundary();
  67. // Assignment.
  68. //
  69. AcGeCurveBoundary& operator = (const AcGeCurveBoundary& src);
  70. // Query the data.
  71. //
  72. Adesk::Boolean isDegenerate () const;
  73. Adesk::Boolean isDegenerate (AcGePosition3d& degenPoint, AcGeCurve2d** paramCurve) const;
  74. int numElements () const;
  75. void getContour (int& n, AcGeEntity3d*** crv3d,
  76. AcGeCurve2d*** paramGeometry,
  77. Adesk::Boolean** orientation3d,
  78. Adesk::Boolean** orientation2d) const;
  79. AcGeCurveBoundary& set (int numElements, const AcGeEntity3d *const * crv3d,
  80. const AcGeCurve2d *const * crv2d,
  81. Adesk::Boolean* orientation3d,
  82. Adesk::Boolean* orientation2d,
  83. Adesk::Boolean makeCopy = Adesk::kTrue);
  84. // Curve ownership.
  85. //
  86. Adesk::Boolean isOwnerOfCurves() const;
  87. AcGeCurveBoundary& setToOwnCurves ();
  88. protected:
  89. friend class AcGeImpCurveBoundary;
  90. AcGeImpCurveBoundary *mpImpBnd;
  91. int mDelBnd;
  92. };
  93. #pragma pack (pop)
  94. #endif