CFx SDK Documentation  2022 SP0
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 
OdSmartPtr< OdDbSequenceEnd > OdDbSequenceEndPtr
Definition: Db3dPolyline.h:45
OdSmartPtr< OdDb3dPolylineVertex > OdDb3dPolylineVertexPtr
Definition: Db3dPolyline.h:36
OdSmartPtr< OdDb3dPolyline > OdDb3dPolylinePtr
Definition: Db3dPolyline.h:396
#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
OdResult
Definition: OdResult.h:29
virtual bool isClosed() const
virtual OdResult getDistAtParam(double param, double &dist) const
virtual OdResult getEndPoint(OdGePoint3d &endPoint) const
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
OdDb3dPolylineVertexPtr openVertex(OdDbObjectId vertId, OdDb::OpenMode mode, bool openErasedOne=false)
OdDbSequenceEndPtr openSequenceEnd(OdDb::OpenMode mode)
virtual bool isPlanar() const
virtual OdResult getStartParam(double &startParam) const
OdResult splineFit(OdDb::Poly3dType splineType, OdInt16 splineSegs)
OdResult subGetSubentPathsAtGsMarker(OdDb::SubentType type, OdGsMarker gsMark, const OdGePoint3d &, const OdGeMatrix3d &, OdDbFullSubentPathArray &subentPaths, const OdDbObjectIdArray *pEntAndInsertStack) const
OdResult subGetGsMarkersAtSubentPath(const OdDbFullSubentPath &subPath, OdGsMarkerArray &gsMarkers) const
OdDbObjectIteratorPtr vertexIterator() const
OdDb::Poly3dType polyType() const
OdDbEntityPtr subSubentPtr(const OdDbFullSubentPath &path) const
void setPolyType(OdDb::Poly3dType polyType)
virtual OdResult getFirstDeriv(double param, OdGeVector3d &firstDeriv) const
virtual OdResult getStartPoint(OdGePoint3d &startPoint) const
ODDB_DECLARE_MEMBERS(OdDb3dPolyline)
virtual OdResult dxfIn(OdDbDxfFiler *pFiler)
virtual OdResult getPointAtParam(double param, OdGePoint3d &pointOnCurve) const
OdResult splineFit()
virtual OdResult getEndParam(double &endParam) const
virtual OdResult dxfInFields_R12(OdDbDxfFiler *pFiler)
OdResult convertToPolyType(OdDb::Poly3dType newVal)
OdDbObjectId insertVertexAt(const OdDbObjectId &indexVertId, OdDb3dPolylineVertex *pVertex)
virtual OdResult subGetClassID(void *pClsid) const
virtual OdResult getParamAtPoint(const OdGePoint3d &pointOnCurve, double &param) const
virtual void dxfOutFields_R12(OdDbDxfFiler *pFiler) const
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
virtual OdResult getSecondDeriv(double param, OdGeVector3d &secondDeriv) const
virtual OdResult subGetGeomExtents(OdGeExtents3d &extents) const
virtual bool isPeriodic() const
virtual OdResult getPlane(OdGePlane &plane, OdDb::Planarity &planarity) const
virtual OdInt32 findVertexIndex(const OdDbVertex *vert) const
virtual OdResult subTransformBy(const OdGeMatrix3d &xfm)
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
TD_USING(OdDbCurve::getSecondDeriv)
OdDbObjectId appendVertex(OdDb3dPolylineVertex *pVertex)
virtual OdResult getOdGeCurve(OdGeCurve3d *&pGeCurve, const OdGeTol &tol=OdGeContext::gTol) const
TD_USING(OdDbCurve::getFirstDeriv)
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
OdDbObjectId insertVertexAt(const OdDb3dPolylineVertex *pIndexVert, OdDb3dPolylineVertex *pVertex)
virtual OdResult getArea(double &area) const
virtual OdResult setFromOdGeCurve(const OdGeCurve3d &geCurve, OdGeVector3d *normal=NULL, const OdGeTol &tol=OdGeContext::gTol)
virtual OdResult reverseCurve()
virtual bool subWorldDraw(OdGiWorldDraw *pWd) const
virtual void dxfOut(OdDbDxfFiler *pFiler) const
virtual OdResult explodeGeometry(OdRxObjectPtrArray &entitySet) const
virtual OdResult getParamAtDist(double dist, double &param) const
virtual OdResult subExplode(OdRxObjectPtrArray &entitySet) 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
Poly3dType
Definition: Db3dPolyline.h:54
@ k3dQuadSplinePoly
Definition: Db3dPolyline.h:56
@ k3dCubicSplinePoly
Definition: Db3dPolyline.h:57
@ k3dSimplePoly
Definition: Db3dPolyline.h:55
Planarity
Definition: DbEntity.h:74
OpenMode
Definition: DbObjectId.h:54
static GE_STATIC_EXPORT OdGeTol gTol
Definition: GeGbl.h:60