CFx SDK Documentation  2020SP3
Db3dPolyline.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_3D_POLYLINE_
28 #define _OD_DB_3D_POLYLINE_
29 
30 #include "TD_PackPush.h"
31 
32 #include "DbCurve.h"
33 #include "DbObjectIterator.h"
34 
36 class OdDbSequenceEnd;
37 
46 
51 namespace OdDb
52 {
54  {
55  k3dSimplePoly = 0, // Simple polyline.
56  k3dQuadSplinePoly = 1, // Quadratic B-spline fit (DXF 80, bit 0x08; DXF 75 == 5).
57  k3dCubicSplinePoly = 2 // Cubic B-spline-fit (DXF 80, bit 0x08; DXF 75 == 6).
58  };
59 }
60 
69 {
70 public:
71 
73 
75 
79  void makeClosed();
80 
84  void makeOpen();
85 
100 
117  OdDb::Poly3dType polyType);
118 
125  void straighten();
126 
145  OdDb3dPolylineVertex* pVertex);
146 
168  const OdDbObjectId& indexVertId,
169  OdDb3dPolylineVertex* pVertex);
170 
192  const OdDb3dPolylineVertex* pIndexVert,
193  OdDb3dPolylineVertex* pVertex);
194 
206  OdDbObjectId vertId,
207  OdDb::OpenMode mode,
208  bool openErasedOne = false);
209 
223  OdDb::OpenMode mode);
224 
230 
231  virtual void dxfOut(
232  OdDbDxfFiler* pFiler) const;
233 
234  virtual OdResult dxfIn(
235  OdDbDxfFiler* pFiler);
236 
238  OdDbDwgFiler* pFiler);
239 
240  virtual void dwgOutFields(
241  OdDbDwgFiler* pFiler) const;
242 
244  OdDbDxfFiler* pFiler);
245 
246  virtual void dxfOutFields(
247  OdDbDxfFiler* pFiler) const;
248 
250  OdDbDxfFiler* pFiler);
251 
252  virtual void dxfOutFields_R12(
253  OdDbDxfFiler* pFiler) const;
254 
256  void* pClsid) const;
257 
258  void subClose();
259 
261  OdRxObjectPtrArray& entitySet) const;
262 
264  OdRxObjectPtrArray& entitySet) const;
265 
267  const OdGeMatrix3d& xfm);
268 
269  virtual bool subWorldDraw(
270  OdGiWorldDraw* pWd) const;
271 
272  //FELIX_CHANGE_BEGIN
274  OdGeExtents3d& extents) const;
275  //FELIX_CHANGE_END
276 
277  virtual bool isPlanar() const;
278 
280  OdGePlane& plane,
281  OdDb::Planarity& planarity) const;
282 
283 
284  /* OdDbCurveMethods */
285 
289  virtual bool isClosed() const;
290 
291  virtual bool isPeriodic() const;
292 
294  double& startParam) const;
295 
297  double& endParam) const;
298 
300  OdGePoint3d& startPoint) const;
301 
303  OdGePoint3d& endPoint) const;
304 
306  double param,
307  OdGePoint3d& pointOnCurve) const;
308 
310  const OdGePoint3d& pointOnCurve,
311  double& param) const;
312 
313  virtual OdResult getDistAtParam( double param, double& dist ) const;
314 
315  virtual OdResult getParamAtDist( double dist, double& param ) const;
316 
318  double param,
319  OdGeVector3d& firstDeriv) const;
320 
322  double param,
323  OdGeVector3d& secondDeriv) const;
324 
325  virtual OdResult getArea(
326  double& area) const;
327 
330 
331 
348 
356 
367  OdResult splineFit(OdDb::Poly3dType splineType, OdInt16 splineSegs);
369  OdGsMarker gsMark,
370  const OdGePoint3d& ,
371  const OdGeMatrix3d& ,
372  OdDbFullSubentPathArray& subentPaths,
373  const OdDbObjectIdArray* pEntAndInsertStack ) const;
375  OdGsMarkerArray& gsMarkers) const;
376 
378 
379  virtual OdResult getOdGeCurve(OdGeCurve3d*& pGeCurve, const OdGeTol& tol = OdGeContext::gTol) const;
380  virtual OdResult setFromOdGeCurve(const OdGeCurve3d& geCurve, OdGeVector3d *normal = NULL, const OdGeTol& tol = OdGeContext::gTol);
381 
389 
390  virtual OdInt32 findVertexIndex(const OdDbVertex* vert) const;
391 };
392 
397 
398 #include "TD_PackPop.h"
399 
400 #endif
401 
OdDb3dPolyline::ODDB_DECLARE_MEMBERS
ODDB_DECLARE_MEMBERS(OdDb3dPolyline)
OdDb::k3dCubicSplinePoly
@ k3dCubicSplinePoly
Definition: Db3dPolyline.h:57
OdResult
OdResult
Definition: OdResult.h:29
OdDbCurve::getFirstDeriv
virtual OdResult getFirstDeriv(double param, OdGeVector3d &firstDeriv) const =0
OdDb3dPolylineVertexPtr
OdSmartPtr< OdDb3dPolylineVertex > OdDb3dPolylineVertexPtr
Definition: Db3dPolyline.h:36
OdGePlane
Definition: GePlane.h:45
OdDb3dPolyline::dxfInFields
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
OdDb3dPolyline::TD_USING
TD_USING(OdDbCurve::getFirstDeriv)
OdGeVector3d
Definition: GeVector3d.h:54
NULL
#define NULL
Definition: GsProperties.h:177
OdDb3dPolyline::getEndPoint
virtual OdResult getEndPoint(OdGePoint3d &endPoint) const
OdDbSequenceEndPtr
OdSmartPtr< OdDbSequenceEnd > OdDbSequenceEndPtr
Definition: Db3dPolyline.h:45
OdDb3dPolyline::openSequenceEnd
OdDbSequenceEndPtr openSequenceEnd(OdDb::OpenMode mode)
OdDb::Planarity
Planarity
Definition: DbEntity.h:74
tol
tol
Definition: DimVarDefs.h:2287
OdDb3dPolyline::setFromOdGeCurve
virtual OdResult setFromOdGeCurve(const OdGeCurve3d &geCurve, OdGeVector3d *normal=NULL, const OdGeTol &tol=OdGeContext::gTol)
OdDb3dPolyline::getPointAtParam
virtual OdResult getPointAtParam(double param, OdGePoint3d &pointOnCurve) const
type
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
OdDb3dPolyline::dwgInFields
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
OdDb3dPolyline::reverseCurve
virtual OdResult reverseCurve()
OdDb3dPolyline::splineFit
OdResult splineFit(OdDb::Poly3dType splineType, OdInt16 splineSegs)
OdDb3dPolyline::insertVertexAt
OdDbObjectId insertVertexAt(const OdDb3dPolylineVertex *pIndexVert, OdDb3dPolylineVertex *pVertex)
OdDbObjectId
Definition: DbObjectId.h:99
OdDb3dPolyline::vertexIterator
OdDbObjectIteratorPtr vertexIterator() const
OdDbCurve::getSecondDeriv
virtual OdResult getSecondDeriv(double param, OdGeVector3d &secondDeriv) const
OdDb::k3dSimplePoly
@ k3dSimplePoly
Definition: Db3dPolyline.h:55
OdDbFullSubentPath
Definition: DbSubentId.h:49
OdDb3dPolyline::subExplode
virtual OdResult subExplode(OdRxObjectPtrArray &entitySet) const
OdArray< OdRxObjectPtr >
OdDb3dPolyline::getArea
virtual OdResult getArea(double &area) const
OdDb3dPolyline::makeClosed
void makeClosed()
OdDb3dPolyline::getOdGeCurve
virtual OdResult getOdGeCurve(OdGeCurve3d *&pGeCurve, const OdGeTol &tol=OdGeContext::gTol) const
TD_PackPop.h
OdDb3dPolyline
Definition: Db3dPolyline.h:69
OdDb::Poly3dType
Poly3dType
Definition: Db3dPolyline.h:54
OdGsMarker
ptrdiff_t OdGsMarker
Definition: OdPlatformSettings.h:889
OdDb3dPolyline::subGetClassID
virtual OdResult subGetClassID(void *pClsid) const
OdDbSequenceEnd
Definition: DbSequenceEnd.h:55
OdGeMatrix3d
Definition: GeMatrix3d.h:73
OdInt16
short OdInt16
Definition: OdPlatformSettings.h:756
OdDb3dPolyline::isPlanar
virtual bool isPlanar() const
OdDb3dPolyline::subGetSubentPathsAtGsMarker
OdResult subGetSubentPathsAtGsMarker(OdDb::SubentType type, OdGsMarker gsMark, const OdGePoint3d &, const OdGeMatrix3d &, OdDbFullSubentPathArray &subentPaths, const OdDbObjectIdArray *pEntAndInsertStack) const
OdDb3dPolyline::getParamAtDist
virtual OdResult getParamAtDist(double dist, double &param) const
OdDb3dPolyline::getFirstDeriv
virtual OdResult getFirstDeriv(double param, OdGeVector3d &firstDeriv) const
OdDb3dPolyline::subGetGeomExtents
virtual OdResult subGetGeomExtents(OdGeExtents3d &extents) const
OdDb3dPolyline::subSubentPtr
OdDbEntityPtr subSubentPtr(const OdDbFullSubentPath &path) const
OdSmartPtr
Definition: SmartPtr.h:58
OdGePoint3d
Definition: GePoint3d.h:55
OdDb3dPolylinePtr
OdSmartPtr< OdDb3dPolyline > OdDb3dPolylinePtr
Definition: Db3dPolyline.h:396
OdDb::SubentType
SubentType
Definition: DbBaseSubentId.h:38
OdDb3dPolyline::subTransformBy
virtual OdResult subTransformBy(const OdGeMatrix3d &xfm)
DbCurve.h
OdInt32
int OdInt32
Definition: OdPlatformSettings.h:782
OdDb3dPolyline::subClose
void subClose()
OdDb3dPolyline::straighten
void straighten()
OdDb3dPolyline::OdDb3dPolyline
OdDb3dPolyline()
OdDb3dPolyline::insertVertexAt
OdDbObjectId insertVertexAt(const OdDbObjectId &indexVertId, OdDb3dPolylineVertex *pVertex)
OdDb3dPolyline::dxfOut
virtual void dxfOut(OdDbDxfFiler *pFiler) const
OdDb::k3dQuadSplinePoly
@ k3dQuadSplinePoly
Definition: Db3dPolyline.h:56
OdDb3dPolyline::appendVertex
OdDbObjectId appendVertex(OdDb3dPolylineVertex *pVertex)
OdDb3dPolyline::explodeGeometry
virtual OdResult explodeGeometry(OdRxObjectPtrArray &entitySet) const
OdDb3dPolyline::findVertexIndex
virtual OdInt32 findVertexIndex(const OdDbVertex *vert) const
OdDbDxfFiler
Definition: DbFiler.h:194
OdDb3dPolyline::dxfInFields_R12
virtual OdResult dxfInFields_R12(OdDbDxfFiler *pFiler)
OdDb3dPolyline::subGetGsMarkersAtSubentPath
OdResult subGetGsMarkersAtSubentPath(const OdDbFullSubentPath &subPath, OdGsMarkerArray &gsMarkers) const
OdDb3dPolyline::makeOpen
void makeOpen()
TD_PackPush.h
OdDb3dPolyline::dxfIn
virtual OdResult dxfIn(OdDbDxfFiler *pFiler)
OdDbVertex
Definition: DbVertex.h:56
OdDb3dPolyline::getPlane
virtual OdResult getPlane(OdGePlane &plane, OdDb::Planarity &planarity) const
OdDb3dPolyline::getDistAtParam
virtual OdResult getDistAtParam(double param, double &dist) const
OdGiWorldDraw
Definition: GiWorldDraw.h:44
OdDb3dPolyline::setPolyType
void setPolyType(OdDb::Poly3dType polyType)
OdDb3dPolyline::dwgOutFields
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
OdDb::OpenMode
OpenMode
Definition: DbObjectId.h:54
OdDb3dPolyline::getStartParam
virtual OdResult getStartParam(double &startParam) const
OdDb3dPolyline::getEndParam
virtual OdResult getEndParam(double &endParam) const
OdDb3dPolyline::subWorldDraw
virtual bool subWorldDraw(OdGiWorldDraw *pWd) const
OdDb3dPolyline::getParamAtPoint
virtual OdResult getParamAtPoint(const OdGePoint3d &pointOnCurve, double &param) const
OdGeCurve3d
Definition: GeCurve3d.h:56
OdDb3dPolyline::openVertex
OdDb3dPolylineVertexPtr openVertex(OdDbObjectId vertId, OdDb::OpenMode mode, bool openErasedOne=false)
OdDbCurve
Definition: DbCurve.h:53
OdDb3dPolylineVertex
Definition: Db3dPolylineVertex.h:43
OdGeContext::gTol
static GE_STATIC_EXPORT OdGeTol gTol
Definition: GeGbl.h:60
OdGeExtents3d
Definition: GeExtents3d.h:45
OdDb3dPolyline::polyType
OdDb::Poly3dType polyType() const
OdDb
Definition: Db2dPolyline.h:50
OdDb3dPolyline::getStartPoint
virtual OdResult getStartPoint(OdGePoint3d &startPoint) const
OdDb3dPolyline::dxfOutFields_R12
virtual void dxfOutFields_R12(OdDbDxfFiler *pFiler) const
OdDb3dPolyline::isClosed
virtual bool isClosed() const
DbObjectIterator.h
TOOLKIT_EXPORT
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdDb3dPolyline::convertToPolyType
OdResult convertToPolyType(OdDb::Poly3dType newVal)
OdDb3dPolyline::splineFit
OdResult splineFit()
OdGeTol
Definition: GeTol.h:49
OdDb3dPolyline::TD_USING
TD_USING(OdDbCurve::getSecondDeriv)
OdDb3dPolyline::dxfOutFields
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
OdDb3dPolyline::getSecondDeriv
virtual OdResult getSecondDeriv(double param, OdGeVector3d &secondDeriv) const
OdDb3dPolyline::isPeriodic
virtual bool isPeriodic() const
OdDbDwgFiler
Definition: DbFiler.h:1031