CFx SDK Documentation  2020SP3
GeNurbCurve2d.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 #ifndef OD_GENURB2d_H
26 #define OD_GENURB2d_H
28 #include "Ge/GeSplineEnt2d.h"
29 #include "OdPlatformSettings.h"
30 
31 class OdGeNurbCurve2dImpl;
32 class OdGePolyline2d;
33 class OdGeEllipArc2d;
34 class OdGeLineSeg2d;
35 class OdGeKnotVector;
36 
37 #include "TD_PackPush.h"
38 
50 {
51 public:
52 
53 
70  const OdGeNurbCurve2d& source);
72  int degree,
73  const OdGeKnotVector& knots,
74  const OdGePoint2dArray& controlPoints,
75  bool isPeriodic = false);
77  int degree,
78  const OdGeKnotVector& knots,
79  const OdGePoint2dArray& controlPoints,
80  const OdGeDoubleArray& weights,
81  bool isPeriodic = false);
83  int degree,
84  const OdGePolyline2d& fitPolyline,
85  bool isPeriodic = false);
87  const OdGePoint2dArray& fitPoints,
88  const OdGeVector2d& startTangent,
89  const OdGeVector2d& endTangent,
90  bool startTangentDefined = true,
91  bool endTangentDefined = true,
92  const OdGeTol& fitTolerance = OdGeContext::gTol);
94  const OdGePoint2dArray& fitPoints,
95  const OdGeTol& fitTolerance = OdGeContext::gTol);
97  const OdGePoint2dArray& fitPoints,
98  const OdGeVector2dArray& fitTangents,
99  const OdGeTol& fitTolerance = OdGeContext::gTol,
100  bool isPeriodic = false);
102  const OdGeEllipArc2d& ellipse);
104  const OdGeLineSeg2d& linSeg);
105 
107  const OdGePoint2dArray& fitPoints,
108  const OdGeVector2d& startTangent,
109  const OdGeVector2d& endTangent,
110  bool startTangentDefined,
111  bool endTangentDefined,
112  OdGeKnotParameterization knotParam,
113  const OdGeTol& fitTol = OdGeContext::gTol);
114 
115 
116  int numFitPoints() const;
117 
126  int index,
127  OdGePoint2d& point) const;
128 
137  OdGeTol& fitTolerance) const;
138 
147  OdGeVector2d& startTangent,
148  OdGeVector2d& endTangent) const;
149 
164  OdGePoint2dArray& fitPoints,
165  OdGeTol& fitTolerance,
166  bool& tangentsExist,
167  OdGeVector2d& startTangent,
168  OdGeVector2d& endTangent) const;
169 
188  OdGePoint2dArray& fitPoints,
189  OdGeTol& fitTolerance,
190  bool& tangentsExist,
191  OdGeVector2d& startTangent,
192  OdGeVector2d& endTangent,
193  OdGeKnotParameterization& knotParam) const;
194 
204 
219  int& degree,
220  bool& rational,
221  bool& periodic,
222  OdGeKnotVector& knots,
223  OdGePoint2dArray& controlPoints,
224  OdGeDoubleArray& weights) const;
225 
232  int numWeights() const;
233 
239  double weightAt(
240  int weightIndex) const;
241 
248  bool evalMode() const;
249 
255  const OdGeTol& tol = OdGeContext::gTol) const;
256 
262  const OdGeTol& tol = OdGeContext::gTol) const;
263 
271  int index,
272  const OdGePoint2d& point);
273 
282  int index,
283  const OdGePoint2d& point);
284 
294  int index);
295 
305  const OdGeTol& fitTol = OdGeContext::gTol);
306 
317  const OdGeVector2d& startTangent,
318  const OdGeVector2d& endTangent);
319 
329 
339  const OdGePoint2dArray& fitPoints,
340  const OdGeVector2d& startTangent,
341  const OdGeVector2d& endTangent,
342  const OdGeTol& fitTol = OdGeContext::gTol);
343 
353  const OdGeKnotVector& fitKnots,
354  const OdGePoint2dArray& fitPoints,
355  const OdGeVector2d& startTangent,
356  const OdGeVector2d& endTangent,
357  const OdGeTol& fitTol = OdGeContext::gTol,
358  bool isPeriodic = false);
359 
367  int degree,
368  const OdGePoint2dArray& fitPoints,
369  const OdGeTol& fitTol = OdGeContext::gTol);
370 
380  const OdGePoint2dArray& fitPoints,
381  const OdGeVector2d& startTangent,
382  const OdGeVector2d& endTangent,
383  OdGeKnotParameterization knotParam,
384  const OdGeTol& fitTol = OdGeContext::gTol);
385 
393  bool purgeFitData();
394 
401  double newKnot);
402 
409  double newKnot);
410 
418  int controlPointIndex,
419  double weight);
420 
428  bool evalMode = false);
429 
437  const OdGeNurbCurve2d& curve);
438 
446  double newStartParam,
447  double newEndParam);
448 
460  double weight = 1.0);
461 
469 
477 
485 
493 
501  int plusDegree);
502 
504  const OdGeNurbCurve2d& spline);
505 
519  bool addControlPointAt(double newKnot, const OdGePoint2d& point, double weight = 1.0);
520 
530 
531 
533  // Overrides :
534 
536  // TD Special :
537 
550  const OdGeLine2d &line2d,
551  OdGePoint2dArray &pnts2d,
552  const OdGeTol& tol = OdGeContext::gTol,
553  OdGeDoubleArray *params = NULL) const;
554 
572  void set(
573  int degree,
574  const OdGeKnotVector& knots,
575  const OdGePoint2dArray& controlPoints,
576  const OdGeDoubleArray& weights,
577  bool isPeriodic = false);
578 
579 protected:
580  friend class OdDbGeEdgesDwgIO;
581  friend class OdDbGeEdgesDxfIO;
582 
583  void set(int degree, const OdGeKnotVector& knots,
584  const OdGePoint2dArray& cntrlPnts, const OdGeDoubleArray& weights, bool isPeriodic,
585  const OdGePoint2dArray& fitPoints,
586  const OdGeVector2d& startTangent,
587  const OdGeVector2d& endTangent);
588 };
589 
590 #include "TD_PackPop.h"
591 
592 #endif
593 
OdDbGeEdgesDxfIO
Definition: DbGeEdgesDxfIO.h:48
NULL
#define NULL
Definition: GsProperties.h:177
OdGeNurbCurve2d::deleteFitPointAt
bool deleteFitPointAt(int index)
OdGeNurbCurve2d::OdGeNurbCurve2d
OdGeNurbCurve2d(const OdGePoint2dArray &fitPoints, const OdGeTol &fitTolerance=OdGeContext::gTol)
OdGeNurbCurve2d::OdGeNurbCurve2d
OdGeNurbCurve2d(const OdGeEllipArc2d &ellipse)
tol
tol
Definition: DimVarDefs.h:2287
OdGeNurbCurve2d::purgeFitData
bool purgeFitData()
OdGeNurbCurve2d
Definition: GeNurbCurve2d.h:50
OdGeNurbCurve2d::OdGeNurbCurve2d
OdGeNurbCurve2d(const OdGePoint2dArray &fitPoints, const OdGeVector2d &startTangent, const OdGeVector2d &endTangent, bool startTangentDefined, bool endTangentDefined, OdGeKnotParameterization knotParam, const OdGeTol &fitTol=OdGeContext::gTol)
OdGeNurbCurve2d::addKnot
OdGeNurbCurve2d & addKnot(double newKnot)
source
GLsizei GLsizei GLchar * source
Definition: gles2_ext.h:282
OdGeNurbCurve2d::setEvalMode
OdGeNurbCurve2d & setEvalMode(bool evalMode=false)
OdGeNurbCurve2d::addControlPointAt
bool addControlPointAt(double newKnot, const OdGePoint2d &point, double weight=1.0)
OdGeNurbCurve2d::getFitTolerance
bool getFitTolerance(OdGeTol &fitTolerance) const
OdArray< OdGePoint2d, OdMemoryAllocator< OdGePoint2d > >
TD_PackPop.h
OdGeNurbCurve2d::OdGeNurbCurve2d
OdGeNurbCurve2d(const OdGePoint2dArray &fitPoints, const OdGeVector2d &startTangent, const OdGeVector2d &endTangent, bool startTangentDefined=true, bool endTangentDefined=true, const OdGeTol &fitTolerance=OdGeContext::gTol)
OdGeNurbCurve2d::OdGeNurbCurve2d
OdGeNurbCurve2d(int degree, const OdGeKnotVector &knots, const OdGePoint2dArray &controlPoints, bool isPeriodic=false)
OdGeLineSeg2d
Definition: GeLineSeg2d.h:42
index
GLuint index
Definition: gles2_ext.h:265
OdGeNurbCurve2d::setFitPointAt
bool setFitPointAt(int index, const OdGePoint2d &point)
OdGe::OdGeKnotParameterization
OdGeKnotParameterization
Definition: Ge.h:281
OdGeNurbCurve2d::OdGeNurbCurve2d
OdGeNurbCurve2d(const OdGePoint2dArray &fitPoints, const OdGeVector2dArray &fitTangents, const OdGeTol &fitTolerance=OdGeContext::gTol, bool isPeriodic=false)
OdGeNurbCurve2d::setFitKnotParameterization
bool setFitKnotParameterization(OdGeKnotParameterization knotParam)
OdGeNurbCurve2d::makeOpen
OdGeNurbCurve2d & makeOpen()
OdGeNurbCurve2d::getFitTangents
bool getFitTangents(OdGeVector2d &startTangent, OdGeVector2d &endTangent) const
OdGeNurbCurve2d::getFitKnotParameterization
bool getFitKnotParameterization(OdGeKnotParameterization &knotParam) const
OdGePolyline2d
Definition: GePolyline2d.h:40
OdGeSplineEnt2d
Definition: GeSplineEnt2d.h:41
OdGeNurbCurve2d::intersectWith
bool intersectWith(const OdGeLine2d &line2d, OdGePoint2dArray &pnts2d, const OdGeTol &tol=OdGeContext::gTol, OdGeDoubleArray *params=NULL) const
OdGeNurbCurve2d::getParamsOfC1Discontinuity
bool getParamsOfC1Discontinuity(OdGeDoubleArray &params, const OdGeTol &tol=OdGeContext::gTol) const
OdGeLine2d
Definition: GeLine2d.h:43
OdGeNurbCurve2d::setFitData
OdGeNurbCurve2d & setFitData(const OdGeKnotVector &fitKnots, const OdGePoint2dArray &fitPoints, const OdGeVector2d &startTangent, const OdGeVector2d &endTangent, const OdGeTol &fitTol=OdGeContext::gTol, bool isPeriodic=false)
OdGeNurbCurve2d::OdGeNurbCurve2d
OdGeNurbCurve2d(int degree, const OdGeKnotVector &knots, const OdGePoint2dArray &controlPoints, const OdGeDoubleArray &weights, bool isPeriodic=false)
OdGeNurbCurve2d::getFitData
bool getFitData(OdGePoint2dArray &fitPoints, OdGeTol &fitTolerance, bool &tangentsExist, OdGeVector2d &startTangent, OdGeVector2d &endTangent) const
OdGeNurbCurve2d::getFitData
bool getFitData(OdGePoint2dArray &fitPoints, OdGeTol &fitTolerance, bool &tangentsExist, OdGeVector2d &startTangent, OdGeVector2d &endTangent, OdGeKnotParameterization &knotParam) const
OdGeNurbCurve2d::getFitPointAt
bool getFitPointAt(int index, OdGePoint2d &point) const
OdGeNurbCurve2d::weightAt
double weightAt(int weightIndex) const
OdGeNurbCurve2d::deleteControlPointAt
bool deleteControlPointAt(int index)
OdGeNurbCurve2d::makeNonPeriodic
OdGeNurbCurve2d & makeNonPeriodic()
OdGeNurbCurve2d::evalMode
bool evalMode() const
OdGeNurbCurve2d::setFitData
OdGeNurbCurve2d & setFitData(const OdGePoint2dArray &fitPoints, const OdGeVector2d &startTangent, const OdGeVector2d &endTangent, const OdGeTol &fitTol=OdGeContext::gTol)
OdGeNurbCurve2d::setFitData
OdGeNurbCurve2d & setFitData(int degree, const OdGePoint2dArray &fitPoints, const OdGeTol &fitTol=OdGeContext::gTol)
OdGeNurbCurve2d::OdGeNurbCurve2d
OdGeNurbCurve2d(const OdGeLineSeg2d &linSeg)
OdGeNurbCurve2d::set
void set(int degree, const OdGeKnotVector &knots, const OdGePoint2dArray &cntrlPnts, const OdGeDoubleArray &weights, bool isPeriodic, const OdGePoint2dArray &fitPoints, const OdGeVector2d &startTangent, const OdGeVector2d &endTangent)
OdPlatformSettings.h
OdGeVector2d
Definition: GeVector2d.h:51
OdGeNurbCurve2d::getParamsOfG1Discontinuity
bool getParamsOfG1Discontinuity(OdGeDoubleArray &params, const OdGeTol &tol=OdGeContext::gTol) const
TD_PackPush.h
OdGeNurbCurve2d::numFitPoints
int numFitPoints() const
OdGeNurbCurve2d::set
void set(int degree, const OdGeKnotVector &knots, const OdGePoint2dArray &controlPoints, const OdGeDoubleArray &weights, bool isPeriodic=false)
OdGeNurbCurve2d::setFitTangents
bool setFitTangents(const OdGeVector2d &startTangent, const OdGeVector2d &endTangent)
OdGeKnotVector
Definition: GeKnotVector.h:44
params
GLenum GLint * params
Definition: gles2_ext.h:184
OdGeNurbCurve2d::addFitPointAt
bool addFitPointAt(int index, const OdGePoint2d &point)
OdGeNurbCurve2d::OdGeNurbCurve2d
OdGeNurbCurve2d()
OdGeNurbCurve2d::OdGeNurbCurve2d
OdGeNurbCurve2d(const OdGeNurbCurve2d &source)
OdGeNurbCurve2d::joinWith
OdGeNurbCurve2d & joinWith(const OdGeNurbCurve2d &curve)
OdGeContext::gTol
static GE_STATIC_EXPORT OdGeTol gTol
Definition: GeGbl.h:60
GE_TOOLKIT_EXPORT
#define GE_TOOLKIT_EXPORT
Definition: GeExport.h:49
OdGeNurbCurve2d::insertKnot
OdGeNurbCurve2d & insertKnot(double newKnot)
OdGeNurbCurve2d::hardTrimByParams
OdGeNurbCurve2d & hardTrimByParams(double newStartParam, double newEndParam)
OdDbGeEdgesDwgIO
Definition: DbGeEdgesDwgIO.h:49
OdGeNurbCurve2d::numWeights
int numWeights() const
OdGeNurbCurve2d::setWeightAt
OdGeSplineEnt2d & setWeightAt(int controlPointIndex, double weight)
OdGeNurbCurve2d::getDefinitionData
void getDefinitionData(int &degree, bool &rational, bool &periodic, OdGeKnotVector &knots, OdGePoint2dArray &controlPoints, OdGeDoubleArray &weights) const
OdGeNurbCurve2d::elevateDegree
OdGeNurbCurve2d & elevateDegree(int plusDegree)
OdGeNurbCurve2d::OdGeNurbCurve2d
OdGeNurbCurve2d(int degree, const OdGePolyline2d &fitPolyline, bool isPeriodic=false)
OdGeSplineEnt2d::operator=
OdGeSplineEnt2d & operator=(const OdGeSplineEnt2d &spline)
OdGeNurbCurve2d::makePeriodic
OdGeNurbCurve2d & makePeriodic()
OdGeTol
Definition: GeTol.h:49
OdGeNurbCurve2d::setFitData
OdGeNurbCurve2d & setFitData(const OdGePoint2dArray &fitPoints, const OdGeVector2d &startTangent, const OdGeVector2d &endTangent, OdGeKnotParameterization knotParam, const OdGeTol &fitTol=OdGeContext::gTol)
OdGeNurbCurve2d::setFitTolerance
bool setFitTolerance(const OdGeTol &fitTol=OdGeContext::gTol)
OdGeNurbCurve2d::makeRational
OdGeNurbCurve2d & makeRational(double weight=1.0)
OdGeEllipArc2d
Definition: GeEllipArc2d.h:58
OdGeNurbCurve2d::makeClosed
OdGeNurbCurve2d & makeClosed()
OdGePoint2d
Definition: GePoint2d.h:60