CFx SDK Documentation  2023 SP0
Db2dPolyline.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_DB_2DPOLYLINE_
28 #define _OD_DB_2DPOLYLINE_
29 
30 #include "TD_PackPush.h"
31 
32 #include "DbCurve.h"
33 #include "DbObjectIterator.h"
34 #include "Db2dVertex.h"
35 
36 class OdGePoint3d;
37 class OdDbSequenceEnd;
38 template <class T> class OdSmartPtr;
39 
44 
49 namespace OdDb
50 {
52  {
53  k2dSimplePoly = 0, // Simple polyline.
54  k2dFitCurvePoly = 1, // Curve fit (DXF 70, bit 0x04).
55  k2dQuadSplinePoly = 2, // Quadratic B-spline fit (DXF 80, bit 0x08; DXF 75 == 5).
56  k2dCubicSplinePoly = 3 // Cubic B-spline-fit (DXF 80, bit 0x08; DXF 75 == 6).
57  };
58 }
68 {
69 public:
70 
72 
74 
90 
108  OdDb::Poly2dType polyType);
109 
113  void makeClosed();
114 
118  void makeOpen();
119 
123  double defaultStartWidth() const;
124 
130  double defaultStartWidth);
131 
135  double defaultEndWidth() const;
136 
142  double defaultEndWidth);
143 
150  double thickness() const;
151 
159  double thickness);
160 
165 
170  void setNormal(
171  const OdGeVector3d& normal);
172 
179  double elevation() const;
180 
190  double elevation);
191 
200 
209 
218 
225  void straighten();
226 
245  OdDb2dVertex* pVertex);
246 
268  const OdDbObjectId& indexVertId,
269  OdDb2dVertex* pVertex);
270 
292  const OdDb2dVertex* pIndexVert,
293  OdDb2dVertex* pVertex);
294 
306  OdDbObjectId vertId,
307  OdDb::OpenMode mode,
308  bool openErasedOne = false);
309 
323  OdDb::OpenMode mode);
324 
330 
337  const OdDb2dVertex& vertex) const;
338 
339  virtual bool subWorldDraw(
340  OdGiWorldDraw* pWd) const;
341 
342  //FELIX_CHANGE_BEGIN
344  OdGeExtents3d& extents) const;
345  //FELIX_CHANGE_END
346 
348  OdDbDwgFiler* pFiler);
349 
350  virtual void dwgOutFields(
351  OdDbDwgFiler* pFiler) const;
352 
354  OdDbDxfFiler* pFiler);
355 
356  virtual void dxfOutFields(
357  OdDbDxfFiler* pFiler) const;
358 
360  OdDbDxfFiler* pFiler);
361 
362  virtual void dxfOutFields_R12(
363  OdDbDxfFiler* pFiler) const;
364 
365  virtual void dxfOut(
366  OdDbDxfFiler* pFiler) const;
367 
368  virtual OdResult dxfIn(
369  OdDbDxfFiler* pFiler);
370 
371  virtual void subClose();
372 
374  OdRxObjectPtrArray& entitySet) const ODRX_OVERRIDE;
375 
377  OdRxObjectPtrArray& entitySet) const ODRX_OVERRIDE;
378 
380  const OdGeMatrix3d& xfm) ODRX_OVERRIDE;
381 
383  void* pClsid) const ODRX_OVERRIDE;
384 
385  virtual bool isPlanar() const;
386 
387  virtual OdResult getArea(
388  double& area) const;
389 
391  OdGePlane& plane,
392  OdDb::Planarity& planarity) const;
393 
394 
395  // OdDbCurveMethods
396 
400  virtual bool isClosed() const;
401 
402  virtual bool isPeriodic() const;
403 
405  double& startParam) const;
406 
408  double& endParam) const;
409 
411  OdGePoint3d& startPoint) const;
412 
414  OdGePoint3d& endPoint) const;
415 
417  double param,
418  OdGePoint3d& pointOnCurve) const;
419 
421  const OdGePoint3d& pointOnCurve,
422  double& param) const;
423 
424  virtual OdResult getDistAtParam( double param, double& dist ) const;
425 
426  virtual OdResult getParamAtDist( double dist, double& param ) const;
427 
429  double param,
430  OdGeVector3d& firstDeriv) const;
431 
433  double param,
434  OdGeVector3d& secondDeriv) const;
435 
438 
456 
463 
471 
482  OdResult splineFit(OdDb::Poly2dType splineType, OdInt16 splineSegs);
483 
485  OdGsMarker gsMark,
486  const OdGePoint3d& ,
487  const OdGeMatrix3d& ,
488  OdDbFullSubentPathArray& subentPaths,
489  const OdDbObjectIdArray* pEntAndInsertStack ) const;
491  OdGsMarkerArray& gsMarkers) const;
492 
494 
499 
500  virtual OdResult getOdGeCurve(OdGeCurve3d*& pGeCurve, const OdGeTol& tol = OdGeContext::gTol) const;
501  virtual OdResult setFromOdGeCurve(const OdGeCurve3d& geCurve, OdGeVector3d *normal = NULL, const OdGeTol& tol = OdGeContext::gTol);
502 
510 
511  virtual OdInt32 findVertexIndex(const OdDbVertex* vert) const;
512 };
517 
518 
519 /*
520 
521 inline void OdDb2dPolyline::extend(double)
522 {
523  return OdeNotApplicable;
524 }
525 */
526 #include "TD_PackPop.h"
527 
528 #endif
529 
OdSmartPtr< OdDbSequenceEnd > OdDbSequenceEndPtr
Definition: Db2dPolyline.h:38
OdSmartPtr< OdDb2dPolyline > OdDb2dPolylinePtr
Definition: Db2dPolyline.h:516
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
tol
Definition: DimVarDefs.h:2287
#define NULL
Definition: GsProperties.h:177
ptrdiff_t OdGsMarker
short OdInt16
int OdInt32
#define ODRX_OVERRIDE
OdResult
Definition: OdResult.h:29
virtual OdResult getEndParam(double &endParam) const
virtual OdResult getDistAtParam(double param, double &dist) const
OdDb2dVertexPtr openVertex(OdDbObjectId vertId, OdDb::OpenMode mode, bool openErasedOne=false)
double thickness() const
void setPolyType(OdDb::Poly2dType polyType)
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
virtual bool isPeriodic() const
virtual OdResult getFirstDeriv(double param, OdGeVector3d &firstDeriv) const
void setElevation(double elevation)
TD_USING(OdDbCurve::getSecondDeriv)
OdResult splineFit(OdDb::Poly2dType splineType, OdInt16 splineSegs)
virtual void dxfOut(OdDbDxfFiler *pFiler) const
virtual OdResult subTransformBy(const OdGeMatrix3d &xfm) ODRX_OVERRIDE
virtual void subClose()
double defaultStartWidth() const
TD_USING(OdDbCurve::getFirstDeriv)
virtual OdResult getSecondDeriv(double param, OdGeVector3d &secondDeriv) const
virtual OdResult getStartParam(double &startParam) const
OdResult splineFit()
virtual OdResult setFromOdGeCurve(const OdGeCurve3d &geCurve, OdGeVector3d *normal=NULL, const OdGeTol &tol=OdGeContext::gTol)
virtual bool isClosed() const
void setDefaultStartWidth(double defaultStartWidth)
OdDbEntityPtr subSubentPtr(const OdDbFullSubentPath &path) const
virtual OdResult getOdGeCurve(OdGeCurve3d *&pGeCurve, const OdGeTol &tol=OdGeContext::gTol) const
OdGeMatrix3d getEcs() const
virtual OdResult getStartPoint(OdGePoint3d &startPoint) const
virtual OdResult getArea(double &area) const
double elevation() const
OdResult subGetSubentPathsAtGsMarker(OdDb::SubentType type, OdGsMarker gsMark, const OdGePoint3d &, const OdGeMatrix3d &, OdDbFullSubentPathArray &subentPaths, const OdDbObjectIdArray *pEntAndInsertStack) const
virtual OdResult subGetGeomExtents(OdGeExtents3d &extents) const
virtual OdResult getPointAtParam(double param, OdGePoint3d &pointOnCurve) const
ODDB_DECLARE_MEMBERS(OdDb2dPolyline)
OdResult convertToPolyType(OdDb::Poly2dType newVal)
virtual OdResult getParamAtPoint(const OdGePoint3d &pointOnCurve, double &param) const
OdDbObjectIteratorPtr vertexIterator() const
OdDbObjectId appendVertex(OdDb2dVertex *pVertex)
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
OdDbObjectId insertVertexAt(const OdDb2dVertex *pIndexVert, OdDb2dVertex *pVertex)
virtual bool isPlanar() const
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
bool isLinetypeGenerationOn() const
void setLinetypeGenerationOn()
void setLinetypeGenerationOff()
virtual bool subWorldDraw(OdGiWorldDraw *pWd) const
OdGePoint3d vertexPosition(const OdDb2dVertex &vertex) const
virtual OdResult reverseCurve()
OdDbObjectId insertVertexAt(const OdDbObjectId &indexVertId, OdDb2dVertex *pVertex)
void setDefaultEndWidth(double defaultEndWidth)
OdDb::Poly2dType polyType() const
virtual OdResult subGetClassID(void *pClsid) const ODRX_OVERRIDE
OdDbSequenceEndPtr openSequenceEnd(OdDb::OpenMode mode)
OdResult curveFit()
virtual OdResult subExplode(OdRxObjectPtrArray &entitySet) const ODRX_OVERRIDE
virtual OdResult getPlane(OdGePlane &plane, OdDb::Planarity &planarity) const
virtual OdResult getEndPoint(OdGePoint3d &endPoint) const
virtual void dxfOutFields_R12(OdDbDxfFiler *pFiler) const
virtual OdResult explodeGeometry(OdRxObjectPtrArray &entitySet) const ODRX_OVERRIDE
double defaultEndWidth() const
void setThickness(double thickness)
OdGeVector3d normal() const
virtual OdInt32 findVertexIndex(const OdDbVertex *vert) const
void setNormal(const OdGeVector3d &normal)
OdResult subGetGsMarkersAtSubentPath(const OdDbFullSubentPath &subPath, OdGsMarkerArray &gsMarkers) const
virtual OdResult dxfIn(OdDbDxfFiler *pFiler)
virtual OdResult dxfInFields_R12(OdDbDxfFiler *pFiler)
virtual OdResult getParamAtDist(double dist, double &param) const
virtual OdResult getSecondDeriv(double param, OdGeVector3d &secondDeriv) const
virtual OdResult getFirstDeriv(double param, OdGeVector3d &firstDeriv) const =0
Definition: GeTol.h:49
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
Poly2dType
Definition: Db2dPolyline.h:52
@ k2dQuadSplinePoly
Definition: Db2dPolyline.h:55
@ k2dSimplePoly
Definition: Db2dPolyline.h:53
@ k2dFitCurvePoly
Definition: Db2dPolyline.h:54
@ k2dCubicSplinePoly
Definition: Db2dPolyline.h:56
Planarity
Definition: DbEntity.h:74
OpenMode
Definition: DbObjectId.h:54
static GE_STATIC_EXPORT OdGeTol gTol
Definition: GeGbl.h:60