AcConstrainedGeometry.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751
  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. #pragma once
  11. #include "AcDbAssocPersSubentIdPE.h"
  12. #include "AcConstraintGroupNode.h"
  13. #include "AcGeomConstraint.h"
  14. #include "genurb3d.h"
  15. #include "acdb.h"
  16. #pragma pack (push, 8)
  17. // Forward class declarations.
  18. //
  19. class AcConstrainedRigidSet;
  20. class AcConstrainedGeometry;
  21. /// <summary>
  22. /// This class represents a constrained geometry node in the owning AcDbAssoc2dConstraintGroup.
  23. /// It is the base class for all the kind of supported geometries.
  24. /// </summary>
  25. ///
  26. class ACDB_PORT AcConstrainedGeometry : public AcConstraintGroupNode
  27. {
  28. public:
  29. ACRX_DECLARE_MEMBERS(AcConstrainedGeometry);
  30. /// <summary>
  31. /// Returns Boolean indicating if this constrained geometry is read-only --
  32. /// cannot be modified or transformed, in other words, it is fixed.
  33. /// </summary>
  34. /// <returns> Boolean. </returns>
  35. ///
  36. virtual bool isReadOnly() const;
  37. /// <summary>
  38. /// Returns AcDbObjectId of the AcDbAssocGeomDependency object referenced
  39. /// by this constrained geometry. It maybe Null for some kind of constrained geometry.
  40. /// </summary>
  41. /// <returns> AcDbObjectId. </returns>
  42. ///
  43. AcDbObjectId geomDependencyId() const;
  44. /// <summary>
  45. /// Returns pointer to owning AcConstrainedRigidSet object which this constrained geometry
  46. /// belongs to. One constrained geometry can only stay in one rigid set.
  47. /// If this geometry is not in a rigid set, NULL is returned.
  48. /// </summary>
  49. /// <returns> pointer to AcConstrainedRigidSet. </returns>
  50. ///
  51. AcConstrainedRigidSet* getOwningRigidSet() const;
  52. // Get the list of Constraints referencing this constrained geometry
  53. /// <summary>
  54. /// Returns the array of pointer to AcGeomConstraint objects which
  55. /// reference this constrained geometry. For a bounded line, arc or
  56. /// bounded ellipse, the array also contains the Coincident constraints
  57. /// between its implicit points and this constrained geometry.
  58. /// </summary>
  59. /// <returns> Return Acad::eOk if successful. </returns>
  60. ///
  61. Acad::ErrorStatus getConnectedConstraints(AcArray<AcGeomConstraint*>& apConstraints) const;
  62. /// <summary>
  63. /// Returns the array of pointer to AcGeomConstraint objects between this constrained geometry
  64. /// and the other constrained geometry pOtherConsGeom.
  65. /// </summary>
  66. /// <param name="pOtherConsGeom">
  67. /// The pointer to the other AcConstrainedGeometry object.
  68. /// </param>
  69. /// <param name="apConstraints">
  70. /// The returned array of pointer to AcGeomConstraint objects.
  71. /// </param>
  72. /// <returns> Returns Acad::eOk if successful. </returns>
  73. ///
  74. Acad::ErrorStatus getCommonConstraints(AcConstrainedGeometry* pOtherConsGeom, AcArray<AcGeomConstraint*>& apConstraints) const;
  75. /// <summary>
  76. /// Returns the array of pointer to AcConstrainedGeometry objects to which
  77. /// this constrained geometry is indirectly connected through the common constraints.
  78. /// </summary>
  79. /// <param name="apConsGeoms">
  80. /// The returned array of pointer to AcConstrainedGeometry objects.
  81. /// </param>
  82. /// <returns> Returns Acad::eOk if successful. </returns>
  83. ///
  84. Acad::ErrorStatus getConnectedGeometries(AcArray<AcConstrainedGeometry*>& apConsGeoms) const;
  85. /// <summary>
  86. /// Returns an array of AcDbFullSubentPaths of the subentities of the AutoCAD
  87. /// AcDbEntities that correspond to this constrained geometry. Notice that the
  88. /// output argument is an array, because there may be more than one subentity
  89. /// corresponding to the AcConstrainedGeometry, but in the great majority of
  90. /// cases there will be exactly one subentity.
  91. /// </summary>
  92. /// <param name="subentPaths">
  93. /// The returned array of AcDbFullSubentPaths, usually containing exactly one item.
  94. /// </param>
  95. ///
  96. Acad::ErrorStatus getFullSubentPaths(AcDbFullSubentPathArray& subentPaths) const;
  97. protected:
  98. /// <summary> Protected default constructor. </summary>
  99. ///
  100. AcConstrainedGeometry();
  101. };
  102. /// <summary>
  103. /// This class represents a constrained point node in the owning AcDbAssoc2dConstraintGroup.
  104. /// Usually It holds a reference to a AcDbAssocGeomDependency object which may be
  105. /// the insertion point of a block reference or a grip point of a custom entity.
  106. /// </summary>
  107. ///
  108. class ACDB_PORT AcConstrainedPoint: public AcConstrainedGeometry
  109. {
  110. public:
  111. ACRX_DECLARE_MEMBERS(AcConstrainedPoint);
  112. /// <summary>
  113. /// Default constructor.
  114. /// </summary>
  115. /// <param name="bCreateImp">
  116. /// Input Boolean indicating whether the implementation object should be created.
  117. /// The default value is true.
  118. /// </param>
  119. ///
  120. explicit AcConstrainedPoint(bool bCreateImp = true);
  121. /// <summary>
  122. /// constructor.
  123. /// </summary>
  124. /// <param name="geomDependencyId">
  125. /// Input AcDbObjectId indicating the AcDbAssocGeomDependency object
  126. /// to which this constrained line is holding on.
  127. /// </param>
  128. ///
  129. AcConstrainedPoint(AcDbObjectId geomDependencyId);
  130. /// <summary>
  131. /// Returns the point position.
  132. /// Relative to the work plane of the owning AcDbAssoc2dConstraintGroup object.
  133. /// </summary>
  134. /// <returns> AcGePoint3d. </returns>
  135. ///
  136. virtual AcGePoint3d point() const ;
  137. };
  138. /// <summary><para>
  139. /// This class represents a constrained implicit point node in the owning AcDbAssoc2dConstraintGroup.
  140. /// A constrained implicit point is always associated with a constrained curve, it may the start point,
  141. /// end point, center point or define point (only valid for spline control point now) of the curve.
  142. /// </para><para>
  143. /// A constrained implicit point does not hold a reference to a AcDbAssocGeomDependency object.
  144. /// </para></summary>
  145. ///
  146. class ACDB_PORT AcConstrainedImplicitPoint: public AcConstrainedPoint
  147. {
  148. public:
  149. ACRX_DECLARE_MEMBERS(AcConstrainedImplicitPoint);
  150. /// <summary> Default constructor. </summary>
  151. ///
  152. explicit AcConstrainedImplicitPoint(bool bCreateImp = true);
  153. /// <summary>
  154. /// Constructor.
  155. /// </summary>
  156. /// <param name="constrCurvId">
  157. /// Input Id indicating the constrained curve to which
  158. /// this implicit point belongs.
  159. /// </param>
  160. /// <param name="ptype">
  161. /// Input ImplicitPointType indicating the type of this implicit point.
  162. /// </param>
  163. /// <param name="index">
  164. /// Input int indicating the define point index of this implicit point.
  165. /// It is only valid when the point type is kDefineImplicit.
  166. /// Default value is -1 (invalid index).
  167. /// </param>
  168. ///
  169. AcConstrainedImplicitPoint(AcGraphNode::Id constrCurvId, AcDb::ImplicitPointType ptype, int index = -1);
  170. /// <summary>
  171. /// Returns the type of this implicit point.
  172. /// </summary>
  173. /// <returns> ImplicitPointType. </returns>
  174. ///
  175. AcDb::ImplicitPointType pointType() const;
  176. /// <summary>
  177. /// Returns the define point index of this implicit point.
  178. /// </summary>
  179. /// <returns> When the point type is not kDefineImplicit, -1 is returned. </returns>
  180. ///
  181. int pointIndex() const;
  182. /// <summary>
  183. /// Returns Id of the constrained curve to which
  184. /// this implicit point belongs.
  185. /// </summary>
  186. /// <returns> AcGraphNode::Id. </returns>
  187. ///
  188. AcGraphNode::Id constrainedCurveId() const;
  189. /// <summary>
  190. /// Returns the point position.
  191. /// Relative to the work plane of the owning AcDbAssoc2dConstraintGroup object.
  192. /// </summary>
  193. /// <returns> AcGePoint3d. </returns>
  194. ///
  195. virtual AcGePoint3d point() const;
  196. };
  197. /// <summary>
  198. /// This class represents a constrained curve node in the owning AcDbAssoc2dConstraintGroup.
  199. /// </summary>
  200. ///
  201. class ACDB_PORT AcConstrainedCurve : public AcConstrainedGeometry
  202. {
  203. public:
  204. ACRX_DECLARE_MEMBERS(AcConstrainedCurve);
  205. /// <summary>
  206. /// Returns true if this constrained curve is bounded.
  207. /// </summary>
  208. /// <returns> true for bounded curve, otherwise false. </returns>
  209. ///
  210. virtual bool isBounded() const;
  211. /// <summary><para>
  212. /// Returns the array of pointer to AcConstrainedImplicitPoint objects which
  213. /// belong to this constrained curve.
  214. /// </para><para>
  215. /// An unbounded line (xline) does not have constrained implicit point.
  216. /// </para></summary>
  217. /// <param name="apImplicitPoints">
  218. /// The returned array of pointer to AcConstrainedImplicitPoint objects.
  219. /// </param>
  220. /// <returns> void. </returns>
  221. ///
  222. virtual void getConstrainedImplicitPoints(AcArray<AcConstrainedImplicitPoint*>& apImplicitPoints) const;
  223. protected:
  224. /// <summary> Protected default constructor. </summary>
  225. ///
  226. explicit AcConstrainedCurve(){}
  227. };
  228. /// <summary>
  229. /// This class represents a constrained unbounded line node in the owning AcDbAssoc2dConstraintGroup.
  230. /// </summary>
  231. ///
  232. class ACDB_PORT AcConstrainedLine: public AcConstrainedCurve
  233. {
  234. public:
  235. ACRX_DECLARE_MEMBERS(AcConstrainedLine);
  236. /// <summary>
  237. /// Default constructor.
  238. /// </summary>
  239. /// <param name="bCreateImp">
  240. /// Input Boolean indicating whether the implementation object should be created.
  241. /// The default value is true.
  242. /// </param>
  243. ///
  244. explicit AcConstrainedLine(bool bCreateImp = true);
  245. /// <summary>
  246. /// constructor.
  247. /// </summary>
  248. /// <param name="geomDependencyId">
  249. /// Input AcDbObjectId indicating the AcDbAssocGeomDependency object
  250. /// to which this constrained line is holding on.
  251. /// </param>
  252. ///
  253. AcConstrainedLine(AcDbObjectId geomDependencyId);
  254. /// <summary>
  255. /// Returns an arbitrary point on the unbounded line.
  256. /// Relative to the work plane of the owning AcDbAssoc2dConstraintGroup object.
  257. /// </summary>
  258. /// <returns> AcGePoint3d. </returns>
  259. ///
  260. AcGePoint3d pointOnLine() const;
  261. /// <summary>
  262. /// Returns direction unit vector of the unbounded line.
  263. /// Relative to the work plane of the owning AcDbAssoc2dConstraintGroup object.
  264. /// </summary>
  265. /// <returns> AcGeVector3d. </returns>
  266. ///
  267. AcGeVector3d direction() const;
  268. };
  269. /// <summary>
  270. /// This class represents a constrained unbounded construction line node in the owning AcDbAssoc2dConstraintGroup.
  271. /// It does not take any initial value and its position is decided by the constraints applied on it.
  272. /// </summary>
  273. ///
  274. class ACDB_PORT AcConstrainedConstructionLine: public AcConstrainedLine
  275. {
  276. public:
  277. ACRX_DECLARE_MEMBERS(AcConstrainedConstructionLine);
  278. protected:
  279. /// <summary> Protected default constructor. </summary>
  280. ///
  281. explicit AcConstrainedConstructionLine();
  282. };
  283. /// <summary>
  284. /// This class represents a constrained unbounded construction line node in the owning AcDbAssoc2dConstraintGroup.
  285. /// Internally it is made coincident to two AcConstrainedPoint objects.
  286. /// </summary>
  287. ///
  288. class ACDB_PORT AcConstrained2PointsConstructionLine: public AcConstrainedConstructionLine
  289. {
  290. public:
  291. ACRX_DECLARE_MEMBERS(AcConstrained2PointsConstructionLine);
  292. /// <summary>
  293. /// Default constructor.
  294. /// </summary>
  295. ///
  296. explicit AcConstrained2PointsConstructionLine(bool bCreateImp = true);
  297. /// <summary>
  298. /// constructor.
  299. /// </summary>
  300. /// <param name="point1">
  301. /// Input first 3D point.
  302. /// Relative to the work plane of the owning AcDbAssoc2dConstraintGroup object.
  303. /// </param>
  304. /// <param name="point2">
  305. /// Input second 3D point.
  306. /// Relative to the work plane of the owning AcDbAssoc2dConstraintGroup object.
  307. /// </param>
  308. ///
  309. explicit AcConstrained2PointsConstructionLine(const AcGePoint3d& point1, const AcGePoint3d& point2);
  310. };
  311. /// <summary>
  312. /// This class represents a constrained datum unbounded line node in the owning AcDbAssoc2dConstraintGroup.
  313. /// It is read-only and for reference as datum line, e.g. X datum line and Y datum line.
  314. /// </summary>
  315. ///
  316. class ACDB_PORT AcConstrainedDatumLine: public AcConstrainedConstructionLine
  317. {
  318. public:
  319. ACRX_DECLARE_MEMBERS(AcConstrainedDatumLine);
  320. /// <summary>
  321. /// Default constructor.
  322. /// </summary>
  323. ///
  324. explicit AcConstrainedDatumLine(bool bCreateImp = true);
  325. /// <summary>
  326. /// constructor.
  327. /// </summary>
  328. /// <param name="pointOnLine">
  329. /// Input any 3D point.
  330. /// Relative to the work plane of the owning AcDbAssoc2dConstraintGroup object.
  331. /// </param>
  332. /// <param name="direction">
  333. /// Input any 3D vector(must not be zero length).
  334. /// Relative to the work plane of the owning AcDbAssoc2dConstraintGroup object.
  335. /// </param>
  336. ///
  337. explicit AcConstrainedDatumLine(const AcGePoint3d& pointOnLine, const AcGeVector3d& direction);
  338. };
  339. /// <summary>
  340. /// This class represents a constrained bounded line node in the owning AcDbAssoc2dConstraintGroup.
  341. /// </summary>
  342. ///
  343. class ACDB_PORT AcConstrainedBoundedLine: public AcConstrainedLine
  344. {
  345. public:
  346. ACRX_DECLARE_MEMBERS(AcConstrainedBoundedLine);
  347. /// <summary>
  348. /// Default constructor.
  349. /// </summary>
  350. ///
  351. explicit AcConstrainedBoundedLine(bool bCreateImp = true);
  352. /// <summary>
  353. /// constructor.
  354. /// </summary>
  355. /// <param name="geomDependencyId">
  356. /// Input AcDbObjectId indicating the AcDbAssocGeomDependency object
  357. /// to which this constrained line is holding on.
  358. /// </param>
  359. /// <param name="bRay">
  360. /// Input Boolean indicating whether this bounded line is a ray.
  361. /// </param>
  362. ///
  363. explicit AcConstrainedBoundedLine(AcDbObjectId geomDependencyId, bool bRay);
  364. /// <summary>
  365. /// Returns Boolean indicating whether this bounded line is a ray - a partially bounded
  366. /// line. In the case that this returns true, the start point represents the
  367. /// single bounding point, and the ray is considered to point away from this
  368. /// point in the direction specified by direction().
  369. /// </summary>
  370. /// <returns> Returns true if it is a ray. </returns>
  371. ///
  372. bool isRay() const;
  373. /// <summary>
  374. /// Returns the start point of the bounded line.
  375. /// Relative to the work plane of the owning AcDbAssoc2dConstraintGroup object.
  376. /// </summary>
  377. /// <returns> AcGePoint3d. </returns>
  378. ///
  379. AcGePoint3d startPoint() const;
  380. /// <summary>
  381. /// Returns the start point of the bounded line. It is invalid for ray.
  382. /// Relative to the work plane of the owning AcDbAssoc2dConstraintGroup object.
  383. /// </summary>
  384. /// <returns> AcGePoint3d. </returns>
  385. ///
  386. AcGePoint3d endPoint() const;
  387. /// <summary>
  388. /// Returns the mid point of the bounded line. It is invalid for ray.
  389. /// Relative to the work plane of the owning AcDbAssoc2dConstraintGroup object.
  390. /// </summary>
  391. /// <returns> AcGePoint3d. </returns>
  392. ///
  393. AcGePoint3d midPoint() const;
  394. };
  395. /// <summary>
  396. /// This class represents a constrained circle node in the owning AcDbAssoc2dConstraintGroup.
  397. /// </summary>
  398. ///
  399. class ACDB_PORT AcConstrainedCircle: public AcConstrainedCurve
  400. {
  401. public:
  402. ACRX_DECLARE_MEMBERS(AcConstrainedCircle);
  403. /// <summary>
  404. /// Default constructor.
  405. /// </summary>
  406. /// <param name="bCreateImp">
  407. /// Input Boolean indicating whether the implementation object should be created.
  408. /// The default value is true.
  409. /// </param>
  410. ///
  411. explicit AcConstrainedCircle(bool bCreateImp = true);
  412. /// <summary>
  413. /// constructor.
  414. /// </summary>
  415. /// <param name="geomDependencyId">
  416. /// Input AcDbObjectId indicating the AcDbAssocGeomDependency object
  417. /// to which this constrained circle is holding on.
  418. /// </param>
  419. ///
  420. explicit AcConstrainedCircle(AcDbObjectId geomDependencyId);
  421. /// <summary>
  422. /// Returns the radius of the constrained circle.
  423. /// </summary>
  424. /// <returns> double. </returns>
  425. ///
  426. double radius() const;
  427. /// <summary>
  428. /// Returns the center point of the constrained circle.
  429. /// Relative to the work plane of the owning AcDbAssoc2dConstraintGroup object.
  430. /// </summary>
  431. /// <returns> AcGePoint3d. </returns>
  432. ///
  433. AcGePoint3d centerPoint() const;
  434. };
  435. /// <summary>
  436. /// This class represents a constrained arc node in the owning AcDbAssoc2dConstraintGroup.
  437. /// </summary>
  438. ///
  439. class ACDB_PORT AcConstrainedArc: public AcConstrainedCircle
  440. {
  441. public:
  442. ACRX_DECLARE_MEMBERS(AcConstrainedArc);
  443. /// <summary>
  444. /// Default constructor.
  445. /// </summary>
  446. ///
  447. explicit AcConstrainedArc(bool bCreateImp = true);
  448. /// <summary>
  449. /// constructor.
  450. /// </summary>
  451. /// <param name="geomDependencyId">
  452. /// Input AcDbObjectId indicating the AcDbAssocGeomDependency object
  453. /// to which this constrained arc is holding on.
  454. /// </param>
  455. ///
  456. explicit AcConstrainedArc(AcDbObjectId geomDependencyId);
  457. /// <summary>
  458. /// Returns the start point of the constrained arc.
  459. /// Relative to the work plane of the owning AcDbAssoc2dConstraintGroup object.
  460. /// </summary>
  461. /// <returns> AcGePoint3d. </returns>
  462. ///
  463. AcGePoint3d startPoint() const;
  464. /// <summary>
  465. /// Returns the end point of the constrained arc.
  466. /// Relative to the work plane of the owning AcDbAssoc2dConstraintGroup object.
  467. /// </summary>
  468. /// <returns> AcGePoint3d. </returns>
  469. ///
  470. AcGePoint3d endPoint() const;
  471. /// <summary>
  472. /// Returns the mid point of the constrained arc.
  473. /// Relative to the work plane of the owning AcDbAssoc2dConstraintGroup object.
  474. /// </summary>
  475. /// <returns> AcGePoint3d. </returns>
  476. ///
  477. AcGePoint3d midPoint() const;
  478. };
  479. /// <summary>
  480. /// This class represents a constrained ellipse node in the owning AcDbAssoc2dConstraintGroup.
  481. /// </summary>
  482. ///
  483. class ACDB_PORT AcConstrainedEllipse: public AcConstrainedCurve
  484. {
  485. public:
  486. ACRX_DECLARE_MEMBERS(AcConstrainedEllipse);
  487. /// <summary>
  488. /// Default constructor.
  489. /// </summary>
  490. /// <param name="bCreateImp">
  491. /// Input Boolean indicating whether the implementation object should be created.
  492. /// The default value is true.
  493. /// </param>
  494. ///
  495. explicit AcConstrainedEllipse(bool bCreateImp = true);
  496. /// <summary>
  497. /// constructor.
  498. /// </summary>
  499. /// <param name="geomDependencyId">
  500. /// Input AcDbObjectId indicating the AcDbAssocGeomDependency object
  501. /// to which this constrained ellipse is holding on.
  502. /// </param>
  503. ///
  504. explicit AcConstrainedEllipse(AcDbObjectId geomDependencyId);
  505. /// <summary>
  506. /// Returns direction unit vector of the major axis of the constrained ellipse.
  507. /// Relative to the work plane of the owning AcDbAssoc2dConstraintGroup object.
  508. /// </summary>
  509. /// <returns> AcGeVector3d. </returns>
  510. ///
  511. AcGeVector3d direction() const;
  512. /// <summary>
  513. /// Returns major radius of the constrained ellipse.
  514. /// The major radius may be smaller than minor radius, this is different from AcGeEllipArc3d.
  515. /// </summary>
  516. /// <returns> double. </returns>
  517. ///
  518. double majorRadius() const;
  519. /// <summary>
  520. /// Returns minor radius of the constrained ellipse.
  521. /// The minor radius may be larger than major radius, this is different from AcGeEllipArc3d.
  522. /// </summary>
  523. /// <returns> double. </returns>
  524. ///
  525. double minorRadius() const;
  526. /// <summary>
  527. /// Returns the center point of the constrained ellipse.
  528. /// Relative to the work plane of the owning AcDbAssoc2dConstraintGroup object.
  529. /// </summary>
  530. /// <returns> AcGePoint3d. </returns>
  531. ///
  532. AcGePoint3d centerPoint() const;
  533. };
  534. /// <summary>
  535. /// This class represents a constrained ellipse arc node in the owning AcDbAssoc2dConstraintGroup.
  536. /// </summary>
  537. ///
  538. class ACDB_PORT AcConstrainedBoundedEllipse : public AcConstrainedEllipse
  539. {
  540. public:
  541. ACRX_DECLARE_MEMBERS(AcConstrainedBoundedEllipse);
  542. /// <summary>
  543. /// Default constructor.
  544. /// </summary>
  545. ///
  546. explicit AcConstrainedBoundedEllipse(bool bCreateImp = true);
  547. /// <summary>
  548. /// constructor.
  549. /// </summary>
  550. /// <param name="geomDependencyId">
  551. /// Input AcDbObjectId indicating the AcDbAssocGeomDependency object
  552. /// to which this constrained bounded ellipse is holding on.
  553. /// </param>
  554. ///
  555. explicit AcConstrainedBoundedEllipse(AcDbObjectId geomDependencyId);
  556. /// <summary>
  557. /// Returns the start point of the constrained bounded ellipse.
  558. /// Relative to the work plane of the owning AcDbAssoc2dConstraintGroup object.
  559. /// </summary>
  560. /// <returns> AcGePoint3d. </returns>
  561. ///
  562. AcGePoint3d startPoint() const;
  563. /// <summary>
  564. /// Returns the end point of the constrained bounded ellipse.
  565. /// Relative to the work plane of the owning AcDbAssoc2dConstraintGroup object.
  566. /// </summary>
  567. /// <returns> AcGePoint3d. </returns>
  568. ///
  569. AcGePoint3d endPoint() const;
  570. };
  571. /// <summary>
  572. /// This class represents a constrained NURBS spline node in the owning AcDbAssoc2dConstraintGroup.
  573. /// </summary>
  574. ///
  575. class ACDB_PORT AcConstrainedSpline: public AcConstrainedCurve
  576. {
  577. public:
  578. ACRX_DECLARE_MEMBERS(AcConstrainedSpline);
  579. /// <summary>
  580. /// Default constructor.
  581. /// </summary>
  582. ///
  583. explicit AcConstrainedSpline(bool bCreateImp = true);
  584. /// <summary>
  585. /// constructor.
  586. /// </summary>
  587. /// <param name="geomDependencyId">
  588. /// Input AcDbObjectId indicating the AcDbAssocGeomDependency object
  589. /// to which this constrained spline is holding on.
  590. /// </param>
  591. /// <param name="spline">
  592. /// Input AcGeNurbCurve3d indicating the AcGe representation of this constrained spline
  593. /// Relative to the work plane of the owning AcDbAssoc2dConstraintGroup object.
  594. /// </param>
  595. ///
  596. explicit AcConstrainedSpline(AcDbObjectId geomDependencyId, const AcGeNurbCurve3d& spline);
  597. /// <summary>
  598. /// Returns the AcGeNurbCurve3d representation of the constrained spline.
  599. /// Relative to the work plane of the owning AcDbAssoc2dConstraintGroup object.
  600. /// </summary>
  601. /// <returns> AcGeNurbCurve3d. </returns>
  602. ///
  603. const AcGeNurbCurve3d nurbSpline() const;
  604. /// <summary>
  605. /// Returns the number of define point of the constrained spline.
  606. /// Currently, only spline control points are supported. For closed
  607. /// spline, the number of define point is number of control point minus 1.
  608. /// </summary>
  609. /// <returns> int. </returns>
  610. ///
  611. int numOfDefinePoints() const;
  612. /// <summary>
  613. /// Returns the define point of the constrained spline.
  614. /// Relative to the work plane of the owning AcDbAssoc2dConstraintGroup object.
  615. /// </summary>
  616. /// <returns> AcGePoint3d. </returns>
  617. ///
  618. AcGePoint3d definePointAt(int index) const;
  619. };
  620. /// <summary>
  621. /// This class represents a constrained rigid set node in the owning AcDbAssoc2dConstraintGroup.
  622. /// </summary>
  623. ///
  624. class ACDB_PORT AcConstrainedRigidSet : public AcConstrainedGeometry
  625. {
  626. public:
  627. ACRX_DECLARE_MEMBERS(AcConstrainedRigidSet);
  628. /// <summary>
  629. /// Default constructor.
  630. /// </summary>
  631. ///
  632. explicit AcConstrainedRigidSet(bool bCreateImp = true);
  633. /// <summary>
  634. /// constructor.
  635. /// </summary>
  636. /// <param name="bScalable">
  637. /// Input boolean indicating whether this rigid set can be uniformly scaled or not.
  638. /// </param>
  639. /// <param name="trans">
  640. /// Input AcGeMatrix3d indicating the initial transform of this rigid set
  641. /// Relative to the work plane of the owning AcDbAssoc2dConstraintGroup object.
  642. /// </param>
  643. ///
  644. explicit AcConstrainedRigidSet(bool bScalable, const AcGeMatrix3d& trans);
  645. /// <summary>
  646. /// Returns the number of constrained geometries contained.
  647. /// </summary>
  648. /// <returns> int. </returns>
  649. ///
  650. int numOfConstrainedGeoms() const;
  651. /// <summary>
  652. /// Returns pointer to the constrained geometry.
  653. /// </summary>
  654. /// <returns> AcConstrainedGeometry*. </returns>
  655. ///
  656. AcConstrainedGeometry* getConstrainedGeomAt(int index) const;
  657. /// <summary>
  658. /// Returns transform of this rigid set.
  659. /// Relative to the work plane of the owning AcDbAssoc2dConstraintGroup object.
  660. /// </summary>
  661. /// <returns> AcGeMatrix3d. </returns>
  662. ///
  663. AcGeMatrix3d transform() const;
  664. };
  665. #pragma pack (pop)