dbmline.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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: Exported AcDbMline Entity class
  13. // dbmline.h - multi-line entity
  14. #ifndef AD_DBMLINE_H
  15. #define AD_DBMLINE_H
  16. #include "dbmain.h"
  17. #pragma pack(push, 8)
  18. struct Mline
  19. {
  20. typedef Adesk::Int8 MlineJustification;
  21. enum {
  22. kTop = 0,
  23. kZero = 1,
  24. kBottom = 2
  25. };
  26. enum {
  27. kOpen = 0,
  28. kClosed = 1,
  29. kMerged = 2
  30. };
  31. };
  32. class AcGePlane;
  33. class AcDbMline: public AcDbEntity
  34. {
  35. public:
  36. ACDB_DECLARE_MEMBERS(AcDbMline);
  37. AcDbMline();
  38. virtual ~AcDbMline();
  39. Acad::ErrorStatus setStyle(const AcDbObjectId &newStyleId);
  40. AcDbObjectId style() const;
  41. Acad::ErrorStatus setJustification(Mline::MlineJustification newJust);
  42. Mline::MlineJustification justification() const;
  43. Acad::ErrorStatus setScale(double newScale);
  44. double scale() const;
  45. AcGeVector3d normal () const;
  46. Acad::ErrorStatus setNormal(const AcGeVector3d & newNormal);
  47. Acad::ErrorStatus appendSeg(const AcGePoint3d& newVertex);
  48. Acad::ErrorStatus removeLastSeg(AcGePoint3d& lastVertex);
  49. Acad::ErrorStatus moveVertexAt(int index, const AcGePoint3d& newPosition);
  50. Acad::ErrorStatus setClosedMline(bool closed);
  51. bool closedMline() const;
  52. void setSupressStartCaps(bool supressIt);
  53. bool supressStartCaps() const;
  54. void setSupressEndCaps(bool supressIt);
  55. bool supressEndCaps() const;
  56. int numVertices() const;
  57. int element(const AcGePoint3d & pt) const;
  58. AcGePoint3d vertexAt(int index) const;
  59. AcGeVector3d axisAt(int index) const;
  60. AcGeVector3d miterAt(int index) const;
  61. Acad::ErrorStatus getParametersAt(int index,
  62. AcGeVoidPointerArray& params) const;
  63. Acad::ErrorStatus setParametersAt(int index,
  64. AcGeVoidPointerArray& params);
  65. Acad::ErrorStatus getClosestPointTo(
  66. const AcGePoint3d& givenPoint,
  67. AcGePoint3d& pointOnCurve,
  68. bool extend,
  69. bool excludeCaps = false) const;
  70. Acad::ErrorStatus getClosestPointTo(
  71. const AcGePoint3d& givenPoint,
  72. const AcGeVector3d& normal,
  73. AcGePoint3d& pointOnCurve,
  74. bool extend,
  75. bool excludeCaps = false) const;
  76. void getPlane(AcGePlane&) const;
  77. protected:
  78. virtual Acad::ErrorStatus subGetClassID(CLSID* pClsid) const;
  79. };
  80. #pragma pack(pop)
  81. #endif