CFx SDK Documentation  2022 SP0
DbCurve.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_DBCURVE_H
28 #define OD_DBCURVE_H
29 
30 #include "TD_PackPush.h"
31 
32 #include "DbEntity.h"
33 #include "DbVertex.h"
34 
35 class OdDbSpline;
37 
38 class OdDbCurveImpl;
39 class OdDbCurve;
40 
53 {
54 public:
56 
58 
62  virtual bool isClosed() const;
63 
67  virtual bool isPeriodic() const;
68 
78  double& startParam) const = 0;
79 
89  double& endParam) const = 0;
90 
100  OdGePoint3d& startPoint) const = 0;
101 
111  OdGePoint3d& endPoint) const = 0;
112 
123  double param,
124  OdGePoint3d& pointOnCurve) const = 0;
125 
136  const OdGePoint3d& pointOnCurve,
137  double& param) const = 0;
138 
149  double param,
150  double& dist) const = 0;
151 
163  double dist,
164  double& param) const = 0;
165 
175  const OdGePoint3d& pointOnCurve,
176  double& dist)const;
177 
188  double dist,
189  OdGePoint3d& pointOnCurve) const;
190 
201  double param,
202  OdGeVector3d& firstDeriv) const = 0;
203 
214  const OdGePoint3d& pointOnCurve,
215  OdGeVector3d& firstDeriv) const;
216 
227  double param,
228  OdGeVector3d& secondDeriv) const;
229 
240  const OdGePoint3d& pointOnCurve,
241  OdGeVector3d& secondDeriv) const;
242 
254  const OdGePoint3d& givenPoint,
255  OdGePoint3d& pointOnCurve,
256  bool extend = false) const;
257 
276  const OdGePoint3d& givenPoint,
277  const OdGeVector3d& normal,
278  OdGePoint3d& pointOnCurve,
279  bool extend = false) const;
280 
281 
289  virtual OdResult getSpline (
290  OdDbSplinePtr* spline) const;
291 
300  virtual OdResult extend(
301  double param);
302 
312  virtual OdResult
313  extend(bool extendStart,
314  const OdGePoint3d& toPoint);
315 
323  virtual OdResult getArea(
324  double& area) const;
325 
335  virtual OdResult getOrthoProjectedCurve(const OdGePlane& projPlane,
336  OdDbCurvePtr* pProjCurve) const;
337 
348  virtual OdResult getProjectedCurve(const OdGePlane& projPlane,
349  const OdGeVector3d& projDirection, OdDbCurvePtr* pProjCurve) const;
350 
360  virtual OdResult getOffsetCurves(double offsetDistance,
361  OdRxObjectPtrArray& offsetCurves) const;
362 
375  const OdGeVector3d& normal, double offsetDistance,
376  OdRxObjectPtrArray& offsetCurves) const;
377 
388  OdRxObjectPtrArray& curveSegments) const;
389 
400  virtual OdResult getSplitCurves (const OdGePoint3dArray& points,
401  OdRxObjectPtrArray& curveSegments) const;
402 
404 
413  virtual OdResult getOdGeCurve ( OdGeCurve3d*& pGeCurve, const OdGeTol& tol = OdGeContext::gTol ) const;
414 
415 
428  static OdResult createFromOdGeCurve ( const OdGeCurve3d& geCurve, OdDbCurve*& pDbCurve,
429  OdGeVector3d *normal = NULL,
430  const OdGeTol& tol = OdGeContext::gTol );
431 
442  virtual OdResult setFromOdGeCurve ( const OdGeCurve3d& geCurve,
443  OdGeVector3d *normal = NULL,
444  const OdGeTol& tol = OdGeContext::gTol );
445 
446 
447  virtual OdInt32 findVertexIndex(const OdDbVertex* vert) const { return 0; }
448 };
449 
450 #include "TD_PackPop.h"
451 
452 #endif
453 
OdSmartPtr< OdDbCurve > OdDbCurvePtr
Definition: DbCurve.h:39
OdSmartPtr< OdDbSpline > OdDbSplinePtr
Definition: DbCurve.h:35
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
tol
Definition: DimVarDefs.h:2287
#define NULL
Definition: GsProperties.h:177
int OdInt32
OdResult
Definition: OdResult.h:29
virtual OdResult getClosestPointTo(const OdGePoint3d &givenPoint, const OdGeVector3d &normal, OdGePoint3d &pointOnCurve, bool extend=false) const
virtual OdResult getSecondDeriv(const OdGePoint3d &pointOnCurve, OdGeVector3d &secondDeriv) const
virtual OdResult getOdGeCurve(OdGeCurve3d *&pGeCurve, const OdGeTol &tol=OdGeContext::gTol) const
virtual OdResult getOffsetCurves(double offsetDistance, OdRxObjectPtrArray &offsetCurves) const
virtual OdResult getDistAtPoint(const OdGePoint3d &pointOnCurve, double &dist) const
virtual bool isClosed() const
virtual OdResult getOffsetCurvesGivenPlaneNormal(const OdGeVector3d &normal, double offsetDistance, OdRxObjectPtrArray &offsetCurves) const
virtual OdResult getParamAtDist(double dist, double &param) const =0
virtual OdResult reverseCurve()
virtual OdInt32 findVertexIndex(const OdDbVertex *vert) const
Definition: DbCurve.h:447
virtual OdResult getParamAtPoint(const OdGePoint3d &pointOnCurve, double &param) const =0
virtual OdResult extend(bool extendStart, const OdGePoint3d &toPoint)
virtual OdResult getArea(double &area) const
virtual OdResult getSecondDeriv(double param, OdGeVector3d &secondDeriv) const
virtual OdResult setFromOdGeCurve(const OdGeCurve3d &geCurve, OdGeVector3d *normal=NULL, const OdGeTol &tol=OdGeContext::gTol)
virtual OdResult getPointAtParam(double param, OdGePoint3d &pointOnCurve) const =0
virtual OdResult getStartParam(double &startParam) const =0
static OdResult createFromOdGeCurve(const OdGeCurve3d &geCurve, OdDbCurve *&pDbCurve, OdGeVector3d *normal=NULL, const OdGeTol &tol=OdGeContext::gTol)
virtual bool isPeriodic() const
virtual OdResult getOrthoProjectedCurve(const OdGePlane &projPlane, OdDbCurvePtr *pProjCurve) const
virtual OdResult getSplitCurves(const OdGePoint3dArray &points, OdRxObjectPtrArray &curveSegments) const
virtual OdResult getSplitCurves(const OdGeDoubleArray &params, OdRxObjectPtrArray &curveSegments) const
virtual OdResult getStartPoint(OdGePoint3d &startPoint) const =0
virtual OdResult getEndParam(double &endParam) const =0
virtual OdResult extend(double param)
virtual OdResult getEndPoint(OdGePoint3d &endPoint) const =0
virtual OdResult getFirstDeriv(double param, OdGeVector3d &firstDeriv) const =0
virtual OdResult getPointAtDist(double dist, OdGePoint3d &pointOnCurve) const
virtual OdResult getProjectedCurve(const OdGePlane &projPlane, const OdGeVector3d &projDirection, OdDbCurvePtr *pProjCurve) const
virtual OdResult getSpline(OdDbSplinePtr *spline) const
virtual OdResult getFirstDeriv(const OdGePoint3d &pointOnCurve, OdGeVector3d &firstDeriv) const
ODDB_DECLARE_MEMBERS(OdDbCurve)
virtual OdResult getClosestPointTo(const OdGePoint3d &givenPoint, OdGePoint3d &pointOnCurve, bool extend=false) const
virtual OdResult getDistAtParam(double param, double &dist) const =0
Definition: GeTol.h:49
GLenum GLint * params
Definition: gles2_ext.h:184
static GE_STATIC_EXPORT OdGeTol gTol
Definition: GeGbl.h:60