CFx SDK Documentation  2020SP3
DbPolyline.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 
24 
25 
26 
27 #ifndef OD_DBPL_H
28 #define OD_DBPL_H
29 
30 #include "TD_PackPush.h"
31 
32 #include "DbCurve.h"
33 #include "Db2dPolyline.h"
34 
35 class OdDb2dPolyline;
36 class OdGeLineSeg2d;
37 class OdGeLineSeg3d;
38 class OdGeCircArc2d;
39 class OdGeCircArc3d;
40 
63 {
64 public:
66 
68 
101  OdDbEntity* pSource,
102  bool transferId = true);
103 
129  OdDb2dPolyline* pDest,
130  bool transferId = true);
131 
139  unsigned int vertexIndex,
140  OdGePoint2d& point2d) const;
141 
149  unsigned int vertexIndex,
150  OdGePoint3d& point3d) const;
151 
152 
153  enum SegType
154  {
155  kLine, // Straight segment with length > 0.
156  kArc, // Arc segment with length > 0.
157  kCoincident, // Segment with length == 0.
158  kPoint, // Polyline with 1 vertex.
159  kEmpty // Polyline with 0 vertices.
160  };
161 
179  unsigned int segmentIndex) const;
180 
187  unsigned int segmentIndex,
188  OdGeLineSeg2d& line2d) const;
189 
196  unsigned int segmentIndex,
197  OdGeLineSeg3d& line3d) const;
198 
205  unsigned int segmentIndex,
206  OdGeCircArc2d& arc2d) const;
207 
214  unsigned int segmentIndex,
215  OdGeCircArc3d& arc3d) const;
216 
229  virtual bool onSegAt(
230  unsigned int segmentIndex,
231  const OdGePoint2d& point2d,
232  double& param) const;
233 
239  void setClosed(
240  bool closed);
241 
255  bool plinegen);
256 
266  double elevation);
267 
275  double thickness);
276 
282  double constantWidth);
283 
288  void setNormal(
289  const OdGeVector3d& normal);
290 
294  bool isOnlyLines() const;
295 
306  bool hasPlinegen() const;
307 
314  double elevation() const;
315 
322  double thickness() const;
323 
327  double getConstantWidth() const;
328 
333 
351  unsigned int vertexIndex,
352  const OdGePoint2d& point2d,
353  double bulge = 0.,
354  double startWidth = -1.,
355  double endWidth = -1.,
356  OdInt32 vertexIdentifier = 0);
357 
363  unsigned int vertexIndex);
364 
368  unsigned int numVerts() const;
369 
370 
379  double getBulgeAt(
380  unsigned int index) const;
381 
388  unsigned int index) const;
389 
398  unsigned int segmentIndex,
399  double& startWidth,
400  double& endWidth) const;
401 
408  unsigned int vertexIndex,
409  const OdGePoint2d& point2d);
410 
422  unsigned int index,
423  double bulge);
424 
432  unsigned int index,
433  OdInt32 suggestedId);
434 
443  unsigned int index,
444  double startWidth,
445  double endWidth);
446 
454 
459 
472  void reset(
473  bool reuse,
474  unsigned int numVerts);
475 
479  bool hasBulges() const;
480 
484  bool hasVertexIdentifiers() const;
485 
489  bool hasWidth() const;
490 
492  const OdGeMatrix3d& mat, OdDbEntityPtr& pCopy) const ODRX_OVERRIDE;
493 
495  const OdGeMatrix3d& xfm) ODRX_OVERRIDE;
496 
497  virtual bool subWorldDraw(
498  OdGiWorldDraw* pWd) const ODRX_OVERRIDE;
499 
500  //FELIX_CHANGE_BEGIN
502  OdGeExtents3d& extents) const ODRX_OVERRIDE;
503  //FELIX_CHANGE_END
504 
505  virtual void subViewportDraw(
506  OdGiViewportDraw* pVd) const ODRX_OVERRIDE;
507 
509  OdDbDwgFiler* pFiler) ODRX_OVERRIDE;
510 
511  virtual void dwgOutFields(
512  OdDbDwgFiler* pFiler) const ODRX_OVERRIDE;
513 
515  OdDbDxfFiler* pFiler) ODRX_OVERRIDE;
516 
518  OdDbDxfFiler* pFiler) ODRX_OVERRIDE;
519 
520  virtual void dxfOutFields(
521  OdDbDxfFiler* pFiler) const ODRX_OVERRIDE;
522 
524  void* pClsid) const ODRX_OVERRIDE;
525 
526  virtual bool isPlanar() const ODRX_OVERRIDE;
527 
528  virtual OdResult getPlane(
529  OdGePlane& plane,
530  OdDb::Planarity& planarity) const;
531 
532 
533 
538  virtual bool isClosed() const;
539 
540  virtual bool isPeriodic() const;
541 
542  virtual OdResult getStartParam(
543  double& startParam) const;
544 
545  virtual OdResult getEndParam (
546  double& endParam) const;
547 
548  virtual OdResult getStartPoint(
549  OdGePoint3d& startPoint) const;
550 
551  virtual OdResult getEndPoint(
552  OdGePoint3d& endPoint) const;
553 
554  virtual OdResult getPointAtParam(
555  double param,
556  OdGePoint3d& pointOnCurve) const;
557 
558  virtual OdResult getParamAtPoint(
559  const OdGePoint3d& pointOnCurve,
560  double& param) const;
561 
562  virtual OdResult getFirstDeriv (
563  double param,
564  OdGeVector3d& firstDeriv) const;
565 
566  virtual OdResult getSecondDeriv (
567  double param,
568  OdGeVector3d& secondDeriv) const;
569 
570  virtual OdResult getArea(
571  double& area) const;
572 
573  TD_USING(OdDbCurve::getFirstDeriv);
574  TD_USING(OdDbCurve::getSecondDeriv);
575 
576  virtual OdResult getDistAtParam( double param, double& dist ) const;
577 
578  virtual OdResult getParamAtDist( double dist, double& param ) const;
579 
580  virtual OdResult subExplode(
581  OdRxObjectPtrArray& entitySet) const;
582 
583  virtual OdResult explodeGeometry(
584  OdRxObjectPtrArray& entitySet) const;
585 
586  virtual OdResult subGetSubentPathsAtGsMarker(OdDb::SubentType type,
587  OdGsMarker gsMark,
588  const OdGePoint3d& pickPoint,
589  const OdGeMatrix3d& viewXform,
590  OdDbFullSubentPathArray& subentPaths,
591  const OdDbObjectIdArray* pEntAndInsertStack) const;
592 
593  virtual OdResult subGetGsMarkersAtSubentPath( const OdDbFullSubentPath& subPath,
594  OdGsMarkerArray& gsMarkers) const;
595 
596  virtual OdDbEntityPtr subSubentPtr(const OdDbFullSubentPath& path) const;
597 
598  virtual OdResult reverseCurve();
599 
603  OdGeMatrix3d getEcs( ) const;
604 
605  virtual OdResult getOdGeCurve(OdGeCurve3d*& pGeCurve, const OdGeTol& tol = OdGeContext::gTol) const;
606  virtual OdResult setFromOdGeCurve(const OdGeCurve3d& geCurve, OdGeVector3d *normal = NULL, const OdGeTol& tol = OdGeContext::gTol);
607 };
608 
613 
614 #include "TD_PackPop.h"
615 
616 #endif //OD_DBPL_H
617 
OdResult
OdResult
Definition: OdResult.h:29
OdDbPolyline::kLine
@ kLine
Definition: DbPolyline.h:155
OdGePlane
Definition: GePlane.h:45
OdDbPolyline::OdDbPolyline
OdDbPolyline()
OdDbPolyline::convertTo
OdResult convertTo(OdDb2dPolyline *pDest, bool transferId=true)
OdGeVector3d
Definition: GeVector3d.h:54
NULL
#define NULL
Definition: GsProperties.h:177
OdDbPolyline::getArcSegAt
void getArcSegAt(unsigned int segmentIndex, OdGeCircArc2d &arc2d) const
OdDbPolyline::maximizeMemory
void maximizeMemory()
OdDbPolyline::setConstantWidth
void setConstantWidth(double constantWidth)
OdDb::Planarity
Planarity
Definition: DbEntity.h:74
tol
tol
Definition: DimVarDefs.h:2287
OdDbPolyline::setBulgeAt
void setBulgeAt(unsigned int index, double bulge)
OdDbPolyline::minimizeMemory
void minimizeMemory()
type
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
OdDbPolyline
Definition: DbPolyline.h:63
OdDbPolyline::getBulgeAt
double getBulgeAt(unsigned int index) const
OdDbPolyline::hasPlinegen
bool hasPlinegen() const
OdDbPolyline::dwgOutFields
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const ODRX_OVERRIDE
OdDbPolyline::getArcSegAt
void getArcSegAt(unsigned int segmentIndex, OdGeCircArc3d &arc3d) const
OdDbPolyline::ODDB_DECLARE_MEMBERS
ODDB_DECLARE_MEMBERS(OdDbPolyline)
OdDbPolyline::hasWidth
bool hasWidth() const
OdDbFullSubentPath
Definition: DbSubentId.h:49
OdDbPolyline::kPoint
@ kPoint
Definition: DbPolyline.h:158
OdDbPolyline::isOnlyLines
bool isOnlyLines() const
TD_USING
#define TD_USING(a)
Definition: OdPlatform.h:597
OdArray< OdRxObjectPtr >
OdGsMarker
ptrdiff_t OdGsMarker
Definition: OdPlatformSettings.h:889
OdDbPolyline::getPointAt
void getPointAt(unsigned int vertexIndex, OdGePoint3d &point3d) const
OdDbPolyline::dxfInFields_R12
virtual OdResult dxfInFields_R12(OdDbDxfFiler *pFiler) ODRX_OVERRIDE
OdGeMatrix3d
Definition: GeMatrix3d.h:73
OdDbPolyline::subWorldDraw
virtual bool subWorldDraw(OdGiWorldDraw *pWd) const ODRX_OVERRIDE
OdGeLineSeg2d
Definition: GeLineSeg2d.h:42
index
GLuint index
Definition: gles2_ext.h:265
OdDbPolyline::setVertexIdentifierAt
void setVertexIdentifierAt(unsigned int index, OdInt32 suggestedId)
OdDbPolyline::subViewportDraw
virtual void subViewportDraw(OdGiViewportDraw *pVd) const ODRX_OVERRIDE
OdDbPolyline::normal
OdGeVector3d normal() const
OdDbPolyline::kArc
@ kArc
Definition: DbPolyline.h:156
OdDbPolyline::getConstantWidth
double getConstantWidth() const
OdDbPolyline::setClosed
void setClosed(bool closed)
OdGeCircArc2d
Definition: GeCircArc2d.h:47
OdSmartPtr< OdDbEntity >
OdGePoint3d
Definition: GePoint3d.h:55
OdDbPolyline::setPointAt
void setPointAt(unsigned int vertexIndex, const OdGePoint2d &point2d)
DbCurve.h
OdInt32
int OdInt32
Definition: OdPlatformSettings.h:782
OdDbPolyline::getLineSegAt
void getLineSegAt(unsigned int segmentIndex, OdGeLineSeg2d &line2d) const
OdDbPolyline::getPointAt
void getPointAt(unsigned int vertexIndex, OdGePoint2d &point2d) const
OdDbPolyline::setThickness
void setThickness(double thickness)
OdDbDxfFiler
Definition: DbFiler.h:194
OdDbPolyline::segType
SegType segType(unsigned int segmentIndex) const
OdDbPolyline::subGetGeomExtents
virtual OdResult subGetGeomExtents(OdGeExtents3d &extents) const ODRX_OVERRIDE
OdDbPolyline::convertFrom
OdResult convertFrom(OdDbEntity *pSource, bool transferId=true)
OdDbPolyline::setWidthsAt
void setWidthsAt(unsigned int index, double startWidth, double endWidth)
OdDbPolyline::hasBulges
bool hasBulges() const
OdDbPolyline::removeVertexAt
void removeVertexAt(unsigned int vertexIndex)
TD_PackPush.h
OdGiTools::arc2d
void arc2d(OdGiGeometry &geom, const OdGePoint2d &p1, const OdGePoint2d &p2, const OdGePoint2d &p3, double z=0.0)
Definition: FMGiTools.h:43
OdDbPolyline::kCoincident
@ kCoincident
Definition: DbPolyline.h:157
OdDbPolyline::subGetClassID
virtual OdResult subGetClassID(void *pClsid) const ODRX_OVERRIDE
OdGiWorldDraw
Definition: GiWorldDraw.h:44
OdDb2dPolyline
Definition: Db2dPolyline.h:68
OdDbPolyline::getVertexIdentifierAt
OdInt32 getVertexIdentifierAt(unsigned int index) const
OdDbEntity
Definition: DbEntity.h:90
OdDbPolyline::numVerts
unsigned int numVerts() const
OdDbPolyline::setElevation
void setElevation(double elevation)
OdGeCurve3d
Definition: GeCurve3d.h:56
OdGeContext
Definition: GeGbl.h:54
OdDbCurve
Definition: DbCurve.h:53
OdDbPolyline::addVertexAt
void addVertexAt(unsigned int vertexIndex, const OdGePoint2d &point2d, double bulge=0., double startWidth=-1., double endWidth=-1., OdInt32 vertexIdentifier=0)
OdDbPolyline::elevation
double elevation() const
OdGeExtents3d
Definition: GeExtents3d.h:45
Db2dPolyline.h
OdDbPolyline::isPlanar
virtual bool isPlanar() const ODRX_OVERRIDE
OdGeLineSeg3d
Definition: GeLineSeg3d.h:44
OdDb
Definition: Db2dPolyline.h:50
OdDbPolyline::SegType
SegType
Definition: DbPolyline.h:154
OdDbPolyline::getLineSegAt
void getLineSegAt(unsigned int segmentIndex, OdGeLineSeg3d &line3d) const
OdDbPolyline::dxfOutFields
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const ODRX_OVERRIDE
TOOLKIT_EXPORT
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
ODRX_OVERRIDE
#define ODRX_OVERRIDE
Definition: OdPlatformSettings.h:114
OdDbPolyline::getWidthsAt
void getWidthsAt(unsigned int segmentIndex, double &startWidth, double &endWidth) const
SubentType
SubentType
Definition: DbManagerSubentData.h:38
OdDbPolyline::thickness
double thickness() const
OdGeTol
Definition: GeTol.h:49
OdDbPolyline::setPlinegen
void setPlinegen(bool plinegen)
OdDbPolyline::subGetTransformedCopy
virtual OdResult subGetTransformedCopy(const OdGeMatrix3d &mat, OdDbEntityPtr &pCopy) const ODRX_OVERRIDE
OdDbPolyline::subTransformBy
virtual OdResult subTransformBy(const OdGeMatrix3d &xfm) ODRX_OVERRIDE
OdDbPolyline::onSegAt
virtual bool onSegAt(unsigned int segmentIndex, const OdGePoint2d &point2d, double &param) const
OdGeCircArc3d
Definition: GeCircArc3d.h:48
OdDbPolyline::hasVertexIdentifiers
bool hasVertexIdentifiers() const
OdDbPolyline::reset
void reset(bool reuse, unsigned int numVerts)
OdDbDwgFiler
Definition: DbFiler.h:1031
OdGiViewportDraw
Definition: GiViewportDraw.h:50
OdDbPolyline::dwgInFields
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler) ODRX_OVERRIDE
OdDbPolyline::setNormal
void setNormal(const OdGeVector3d &normal)
OdDbPolyline::dxfInFields
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler) ODRX_OVERRIDE
OdGePoint2d
Definition: GePoint2d.h:60